From 00ca22a7d70f7b3cbf0547b2480639061e38700b Mon Sep 17 00:00:00 2001 From: Jerjou Date: Tue, 19 Jul 2016 20:15:43 -0700 Subject: [PATCH 001/488] Add Cloud Natural Language API sample. (#155) * Add Cloud Natural Language API sample. This sample makes a request to analyze the entities in text. Change-Id: I387cff7ac70c6f3c00a5b213527b4bd71c6c44dc * Update package.json * Do it right this time --- .../google-cloud-language/samples/README.md | 79 +++++++++++++++++++ .../samples/package.json | 18 +++++ 2 files changed, 97 insertions(+) create mode 100644 packages/google-cloud-language/samples/README.md create mode 100644 packages/google-cloud-language/samples/package.json diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md new file mode 100644 index 00000000000..2d7fe494e1f --- /dev/null +++ b/packages/google-cloud-language/samples/README.md @@ -0,0 +1,79 @@ +# Cloud Natural Language API Sample + +These samples demonstrate the use of the +[Google Cloud Natural Language API](https://cloud.google.com/natural-language/docs/). + +`analyze.js` is a command-line program that demonstrates how different methods +of the API can be called. + +## Setup + +Please follow the [Set Up Your Project](https://cloud-dot-devsite.googleplex.com/natural-language/docs/getting-started#set_up_your_project) +steps in the Quickstart doc to create a project and enable the +Cloud Natural Language API. Following those steps, make sure that you +[Set Up a Service Account](https://cloud.google.com/natural-language/docs/common/auth#set_up_a_service_account), +and export the following environment variable: + +``` +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-project-credentials.json +``` + +## Run locally + +First install the needed dependencies. + +``` +npm install +``` + +To run: + +``` +node analyze.js +``` + +For example, the following command returns all entities found in the text: + +``` +node analyze.js entities "President Obama is speaking at the White House." +``` + +``` +{ + "entities": [ + { + "name": "Obama", + "type": "PERSON", + "metadata": { + "wikipedia_url": "http://en.wikipedia.org/wiki/Barack_Obama" + }, + "salience": 0.84503114, + "mentions": [ + { + "text": { + "content": "Obama", + "beginOffset": 10 + } + } + ] + }, + { + "name": "White House", + "type": "LOCATION", + "metadata": { + "wikipedia_url": "http://en.wikipedia.org/wiki/White_House" + }, + "salience": 0.15496887, + "mentions": [ + { + "text": { + "content": "White House", + "beginOffset": 35 + } + } + ] + } + ], + "language": "en" +} +``` diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json new file mode 100644 index 00000000000..f1fe11ce5f2 --- /dev/null +++ b/packages/google-cloud-language/samples/package.json @@ -0,0 +1,18 @@ +{ + "name": "cloud-natural-language-api-samples", + "version": "1.0.0", + "description": "Samples for using the Google Cloud Natural Language API.", + "repository": { + "type": "git", + "url": "git://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" + }, + "main": "analyze.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "googleapis": "^11.0.0" + }, + "author": "Google, Inc.", + "license": "Apache-2.0" +} From 82fd222b0904473b1bbdafe92ff3e9d7b010abfb Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 20 Jul 2016 15:42:45 -0700 Subject: [PATCH 002/488] Update READMEs. --- .../google-cloud-language/samples/README.md | 124 +++++++++--------- 1 file changed, 65 insertions(+), 59 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 2d7fe494e1f..0d662310751 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -1,79 +1,85 @@ -# Cloud Natural Language API Sample +Google Cloud Platform logo -These samples demonstrate the use of the -[Google Cloud Natural Language API](https://cloud.google.com/natural-language/docs/). +# Google Cloud Natural Language API Node.js Samples -`analyze.js` is a command-line program that demonstrates how different methods -of the API can be called. +[Cloud Natural Language API][language_docs] provides natural language +understanding technologies to developers, including sentiment analysis, entity +recognition, and syntax analysis. This API is part of the larger Cloud Machine +Learning API. + +[language_docs]: https://cloud.google.com/natural-language/docs/ + +## Table of Contents + +* [Setup](#setup) +* [Samples](#samples) + * [analyze.js](#analyze) ## Setup -Please follow the [Set Up Your Project](https://cloud-dot-devsite.googleplex.com/natural-language/docs/getting-started#set_up_your_project) -steps in the Quickstart doc to create a project and enable the -Cloud Natural Language API. Following those steps, make sure that you -[Set Up a Service Account](https://cloud.google.com/natural-language/docs/common/auth#set_up_a_service_account), -and export the following environment variable: +1. Please follow the [Set Up Your Project][quickstart] steps in the Quickstart +doc to create a project and enable the Cloud Natural Language API. +1. Read [Prerequisites][prereq] and [How to run a sample][run] first. +1. Install dependencies: + + npm install -``` -export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-project-credentials.json -``` +[quickstart]: https://cloud.google.com/natural-language/docs/getting-started#set_up_your_project +[prereq]: ../README.md#prerequisities +[run]: ../README.md#how-to-run-a-sample -## Run locally +## Samples -First install the needed dependencies. +### Analyze -``` -npm install -``` +View the [source code][analyze_code]. -To run: +__Run the sample:__ -``` -node analyze.js -``` +Usage: `node analyze ` For example, the following command returns all entities found in the text: -``` -node analyze.js entities "President Obama is speaking at the White House." -``` +Example: + + node analyze entities "President Obama is speaking at the White House." -``` -{ - "entities": [ { - "name": "Obama", - "type": "PERSON", - "metadata": { - "wikipedia_url": "http://en.wikipedia.org/wiki/Barack_Obama" - }, - "salience": 0.84503114, - "mentions": [ + "entities": [ { - "text": { - "content": "Obama", - "beginOffset": 10 - } - } - ] - }, - { - "name": "White House", - "type": "LOCATION", - "metadata": { - "wikipedia_url": "http://en.wikipedia.org/wiki/White_House" - }, - "salience": 0.15496887, - "mentions": [ + "name": "Obama", + "type": "PERSON", + "metadata": { + "wikipedia_url": "http://en.wikipedia.org/wiki/Barack_Obama" + }, + "salience": 0.84503114, + "mentions": [ + { + "text": { + "content": "Obama", + "beginOffset": 10 + } + } + ] + }, { - "text": { - "content": "White House", - "beginOffset": 35 - } + "name": "White House", + "type": "LOCATION", + "metadata": { + "wikipedia_url": "http://en.wikipedia.org/wiki/White_House" + }, + "salience": 0.15496887, + "mentions": [ + { + "text": { + "content": "White House", + "beginOffset": 35 + } + } + ] } - ] + ], + "language": "en" } - ], - "language": "en" -} -``` + +[analyze_code]: analyze.js From 0caba5f4d2221f118eee976f91d19912dc99e3cc Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 3 Aug 2016 15:51:39 -0700 Subject: [PATCH 003/488] Refactored tests (#159) * Refactor tests. * Tweak build. * Tweak build. * More tests. * Tweak build. * Tweak build. * Fix build. * Fix build. * Speed up build. * Fix build. * Remove extra dep. * Investigate why 0.12 fails. * Scripts. * More tests. * Upgrades * Upgrades * Update readme --- .../samples/package.json | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index f1fe11ce5f2..ba0b599c625 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -1,18 +1,17 @@ { - "name": "cloud-natural-language-api-samples", - "version": "1.0.0", - "description": "Samples for using the Google Cloud Natural Language API.", - "repository": { - "type": "git", - "url": "git://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" - }, - "main": "analyze.js", + "name": "nodejs-docs-samples-language", + "version": "0.0.1", + "private": true, + "license": "Apache Version 2.0", + "author": "Google Inc.", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "mocha -R spec -t 120000 --require intelli-espower-loader ../test/_setup.js test/*.test.js", + "system-test": "mocha -R spec -t 120000 --require intelli-espower-loader ../system-test/_setup.js system-test/*.test.js" }, "dependencies": { - "googleapis": "^11.0.0" + "googleapis": "^12.0.0" }, - "author": "Google, Inc.", - "license": "Apache-2.0" + "devDependencies": { + "mocha": "^2.5.3" + } } From 9d7af29863aab7ddb6e3defee89e212d429e8a5c Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 8 Aug 2016 14:44:23 -0400 Subject: [PATCH 004/488] Introduce Natural Language API (#1440) * language: implement API --- packages/google-cloud-language/package.json | 77 ++ .../google-cloud-language/src/document.js | 758 ++++++++++++++++ packages/google-cloud-language/src/index.js | 432 +++++++++ .../system-test/language.js | 463 ++++++++++ .../google-cloud-language/test/document.js | 832 ++++++++++++++++++ packages/google-cloud-language/test/index.js | 303 +++++++ 6 files changed, 2865 insertions(+) create mode 100644 packages/google-cloud-language/package.json create mode 100644 packages/google-cloud-language/src/document.js create mode 100644 packages/google-cloud-language/src/index.js create mode 100644 packages/google-cloud-language/system-test/language.js create mode 100644 packages/google-cloud-language/test/document.js create mode 100644 packages/google-cloud-language/test/index.js diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json new file mode 100644 index 00000000000..4bc72b4e34d --- /dev/null +++ b/packages/google-cloud-language/package.json @@ -0,0 +1,77 @@ +{ + "name": "@google-cloud/language", + "version": "0.1.0", + "author": "Google Inc.", + "description": "Google Cloud Natural Language Client Library for Node.js", + "contributors": [ + { + "name": "Burcu Dogan", + "email": "jbd@google.com" + }, + { + "name": "Johan Euphrosine", + "email": "proppy@google.com" + }, + { + "name": "Patrick Costello", + "email": "pcostell@google.com" + }, + { + "name": "Ryan Seys", + "email": "ryan@ryanseys.com" + }, + { + "name": "Silvano Luciani", + "email": "silvano@google.com" + }, + { + "name": "Stephen Sawchuk", + "email": "sawchuk@gmail.com" + } + ], + "main": "./src/index.js", + "files": [ + "./src/*", + "AUTHORS", + "CONTRIBUTORS", + "COPYING" + ], + "repository": "googlecloudplatform/gcloud-node", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google cloud natural language", + "google cloud language", + "natural language", + "language" + ], + "dependencies": { + "@google-cloud/common": "^0.1.0", + "@google-cloud/storage": "^0.1.0", + "arrify": "^1.0.1", + "extend": "^3.0.0", + "google-proto-files": "^0.4.0", + "is": "^3.0.1", + "propprop": "^0.3.1", + "string-format-obj": "^1.0.0" + }, + "devDependencies": { + "mocha": "^2.1.0", + "proxyquire": "^1.7.10" + }, + "scripts": { + "publish": "../../scripts/publish.sh", + "test": "mocha test/*.js", + "system-test": "mocha system-test/*.js --no-timeouts --bail" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=0.12.0" + } +} diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js new file mode 100644 index 00000000000..278941feb50 --- /dev/null +++ b/packages/google-cloud-language/src/document.js @@ -0,0 +1,758 @@ +/*! + * Copyright 2016 Google Inc. All Rights Reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * @module language/document + */ + +'use strict'; + +var arrify = require('arrify'); +var extend = require('extend'); +var File = require('@google-cloud/storage').File; +var format = require('string-format-obj'); +var is = require('is'); +var prop = require('propprop'); + +/*! Developer Documentation + * + * @param {module:language} language - The parent Language object. + * @param {object=} config - Configuration object. + */ +/* + * Create a Natural Language Document object. From this object, you will be able + * to run multiple detections. + * + * @constructor + * @alias module:language/document + * + * @example + * var gcloud = require('google-cloud'); + * + * var language = gcloud.language({ + * projectId: 'grape-spaceship-123' + * }); + * + * var textToAnalyze = [ + * 'Google is an American multinational technology company specializing in', + * 'Internet-related services and products.' + * ].join(' '); + * + * var document = language.document(textToAnalyze); + */ +function Document(language, config) { + var content = config.content || config; + + // `reqOpts` is the payload passed to each `request()`. This object is used as + // the default for all API requests made with this Document. + this.reqOpts = { + document: {} + }; + + if (config.encoding) { + var encodingType = config.encoding.toUpperCase().replace(/[ -]/g, ''); + this.reqOpts.encodingType = encodingType; + } + + if (config.language) { + this.reqOpts.document.language = config.language; + } + + if (config.type) { + this.reqOpts.document.type = config.type.toUpperCase(); + + if (this.reqOpts.document.type === 'TEXT') { + this.reqOpts.document.type = 'PLAIN_TEXT'; + } + } else { + // Default to plain text. + this.reqOpts.document.type = 'PLAIN_TEXT'; + } + + if (content instanceof File) { + this.reqOpts.document.gcsContentUri = format('gs://{bucket}/{file}', { + bucket: encodeURIComponent(content.bucket.id), + file: encodeURIComponent(content.id) + }); + } else { + this.reqOpts.document.content = content; + } + + this.request = language.request.bind(language); +} + +/** + * The parts of speech that will be recognized by the Natural Language API. + * + * @private + * @type {object} + */ +Document.PART_OF_SPEECH = { + UNKNOWN: 'Unknown', + ADJ: 'Adjective', + ADP: 'Adposition (preposition and postposition)', + ADV: 'Adverb', + CONJ: 'Conjunction', + DET: 'Determiner', + NOUN: 'Noun (common and proper)', + NUM: 'Cardinal number', + PRON: 'Pronoun', + PRT: 'Particle or other function word', + PUNCT: 'Punctuation', + VERB: 'Verb (all tenses and modes)', + X: 'Other: foreign words, typos, abbreviations', + AFFIX: 'Affix' +}; + +/** + * Run an annotation of the text from the document. + * + * By default, all annotation types are requested: + * + * - The sentiment of the document (positive or negative) + * - The entities of the document (people, places, things, etc.) + * - The syntax of the document (adjectives, nouns, verbs, etc.) + * + * See the examples below for how to request a subset of those types. + * + * If you only need one type of annotation, you may appreciate one of these + * other methods from our API: + * + * - {module:language#detectEntities} + * - {module:language#detectSentiment} + * + * @resource [documents.annotateText API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText} + * + * @param {object=} options - Configuration object. + * @param {boolean} options.entities - Detect the entities from this document. + * By default, all features (`entities`, `sentiment`, and `syntax`) are + * enabled. By overriding any of these values, all defaults are switched to + * `false`. + * @param {number} options.sentiment - Detect the sentiment from this document. + * By default, all features (`entities`, `sentiment`, and `syntax`) are + * enabled. By overriding any of these values, all defaults are switched to + * `false`. + * @param {boolean} options.syntax - Detect the syntax from this document. By + * default, all features (`entities`, `sentiment`, and `syntax`) are + * enabled. By overriding any of these values, all defaults are switched to + * `false`. + * @param {boolean} options.verbose - Enable verbose mode for more detailed + * results. Default: `false` + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error occurred while making this request. + * @param {object} callback.annotation - The formatted API response. + * @param {string} callback.annotation.language - The language detected from the + * text. + * @param {number} callback.annotation.sentiment - A value in the range of + * `-100` to `100`. Large numbers represent more positive sentiments. + * @param {object} callback.annotation.entities - The recognized entities from + * the text, grouped by the type of entity. + * @param {string[]} callback.annotation.entities.art - Art entities detected + * from the text. This is only present if detections of this type were + * found. + * @param {string[]} callback.annotation.entities.events - Event entities + * detected from the text. This is only present if detections of this type + * were found. + * @param {string[]} callback.annotation.entities.goods - Consumer good entities + * detected from the text. This is only present if detections of this type + * were found. + * @param {string[]} callback.annotation.entities.organizations - Organization + * entities detected from the text. This is only present if detections of + * this type were found. + * @param {string[]} callback.annotation.entities.other - Other entities + * detected from the text. This is only present if detections of this type + * were found. + * @param {string[]} callback.annotation.entities.people - People entities + * detected from the text. This is only present if detections of this type + * were found. + * @param {string[]} callback.annotation.entities.places - Place entities + * detected from the text. This is only present if detections of this type + * were found. + * @param {string[]} callback.annotation.entities.unknown - Unknown entities + * detected from the text. This is only present if detections of this type + * were found. + * @param {string[]} callback.annotation.sentences - Sentences detected from the + * text. + * @param {object[]} callback.annotation.tokens - Parts of speech that were + * detected from the text. + * @param {object[]} callback.annotation.tokens.text - The piece of text + * analyzed. + * @param {object[]} callback.annotation.tokens.partOfSpeech - A description of + * the part of speech (`Noun (common and propert)`, + * `Verb (all tenses and modes)`, etc.). + * @param {object[]} callback.annotation.tokens.partOfSpeechTag - A short code + * for the type of speech (`NOUN`, `VERB`, etc.). + * @param {object} callback.apiResponse - The full API response. + * + * @example + * document.annotate(function(err, annotation) { + * if (err) { + * // Error handling omitted. + * } + * + * // annotation = { + * // language: 'en', + * // sentiment: 100, + * // entities: { + * // organizations: [ + * // 'Google' + * // ], + * // places: [ + * // 'American' + * // ] + * // }, + * // sentences: [ + * // 'Google is an American multinational technology company ' + + * // 'specializing in Internet-related services and products.' + * // ], + * // tokens: [ + * // { + * // text: 'Google', + * // partOfSpeech: 'Noun (common and proper)', + * // partOfSpeechTag: 'NOUN' + * // }, + * // { + * // text: 'is', + * // partOfSpeech: 'Verb (all tenses and modes)', + * // partOfSpeechTag: 'VERB' + * // }, + * // ... + * // ] + * // } + * }); + * + * //- + * // To request only certain annotation types, provide an options object. + * //- + * var options = { + * entities: true, + * sentiment: true + * }; + * + * document.annotate(options, function(err, annotation) { + * if (err) { + * // Error handling omitted. + * } + * + * // annotation = { + * // language: 'en', + * // sentiment: 100, + * // entities: { + * // organizations: [ + * // 'Google' + * // ], + * // places: [ + * // 'American' + * // ] + * // } + * // } + * }); + * + * //- + * // Verbose mode may also be enabled for more detailed results. + * //- + * var options = { + * verbose: true + * }; + * + * document.annotate(options, function(err, annotation) { + * if (err) { + * // Error handling omitted. + * } + * + * // annotation = { + * // language: 'en', + * // sentiment: { + * // polarity: 100, + * // magnitude: 40 + * // }, + * // entities: { + * // organizations: [ + * // { + * // name: 'Google', + * // type: 'ORGANIZATION', + * // metadata: { + * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' + * // }, + * // salience: 65.137446, + * // mentions: [ + * // { + * // text: { + * // content: 'Google', + * // beginOffset: -1 + * // } + * // } + * // ] + * // } + * // ], + * // places: [ + * // { + * // name: 'American', + * // type: 'LOCATION', + * // metadata: { + * // wikipedia_url: 'http://en.wikipedia.org/wiki/United_States' + * // }, + * // salience: 13.947370648384094, + * // mentions: [ + * // { + * // text: [ + * // { + * // content: 'American', + * // beginOffset: -1 + * // } + * // ] + * // } + * // ] + * // } + * // ] + * // }, + * // sentences: [ + * // { + * // content: + * // 'Google is an American multinational technology company' + + * // 'specializing in Internet-related services and products.' + * // beginOffset: -1 + * // } + * // ], + * // tokens: [ + * // { + * // text: { + * // content: 'Google', + * // beginOffset: -1 + * // }, + * // partOfSpeech: { + * // tag: 'NOUN' + * // }, + * // dependencyEdge: { + * // headTokenIndex: 1, + * // label: 'NSUBJ' + * // }, + * // lemma: 'Google' + * // }, + * // ... + * // ] + * // } + * }); + */ +Document.prototype.annotate = function(options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + var features = { + extractDocumentSentiment: true, + extractEntities: true, + extractSyntax: true + }; + + var featuresRequested = { + extractDocumentSentiment: options.sentiment === true, + extractEntities: options.entities === true, + extractSyntax: options.syntax === true + }; + + var numFeaturesRequested = 0; + + for (var featureRequested in featuresRequested) { + if (featuresRequested[featureRequested]) { + numFeaturesRequested++; + } + } + + if (numFeaturesRequested > 0) { + features = featuresRequested; + } + + var verbose = options.verbose === true; + + var grpcOpts = { + service: 'LanguageService', + method: 'annotateText' + }; + + var reqOpts = extend({ + features: features + }, this.reqOpts); + + this.request(grpcOpts, reqOpts, function(err, resp) { + if (err) { + callback(err, null, resp); + return; + } + + var originalResp = extend(true, {}, resp); + + var annotation = { + language: resp.language + }; + + if (resp.documentSentiment) { + var sentiment = resp.documentSentiment; + annotation.sentiment = Document.formatSentiment_(sentiment, verbose); + } + + if (resp.entities) { + annotation.entities = Document.formatEntities_(resp.entities, verbose); + } + + // This prevents empty `sentences` and `tokens` arrays being returned to + // users who never wanted sentences or tokens to begin with. + if (numFeaturesRequested === 0 || featuresRequested.syntax) { + annotation.sentences = Document.formatSentences_(resp.sentences, verbose); + annotation.tokens = Document.formatTokens_(resp.tokens, verbose); + } + + callback(null, annotation, originalResp); + }); +}; + +/** + * Detect entities from the document. + * + * @resource [documents.analyzeEntities API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeEntities} + * + * @param {object=} options - Configuration object. + * @param {boolean} options.verbose - Enable verbose mode for more detailed + * results. Default: `false` + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error occurred while making this request. + * @param {object} callback.entities - The recognized entities from the text, + * grouped by the type of entity. + * @param {string[]} callback.entities.art - Art entities detected from the + * text. This is only present if detections of this type were found. + * @param {string[]} callback.entities.events - Event entities detected from the + * text. This is only present if detections of this type were found. + * @param {string[]} callback.entities.goods - Consumer good entities detected + * from the text. This is only present if detections of this type were + * found. + * @param {string[]} callback.entities.organizations - Organization entities + * detected from the text. This is only present if detections of this type + * were found. + * @param {string[]} callback.entities.other - Other entities detected from the + * text. This is only present if detections of this type were found. + * @param {string[]} callback.entities.people - People entities detected from + * the text. This is only present if detections of this type were found. + * @param {string[]} callback.entities.places - Place entities detected from the + * text. This is only present if detections of this type were found. + * @param {string[]} callback.entities.unknown - Unknown entities detected from + * the text. This is only present if detections of this type were found. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * document.detectEntities(function(err, entities) { + * if (err) { + * // Error handling omitted. + * } + * + * // entities = { + * // organizations: [ + * // 'Google' + * // ], + * // places: [ + * // 'American' + * // ] + * // } + * }); + * + * //- + * // Verbose mode may also be enabled for more detailed results. + * //- + * var options = { + * verbose: true + * }; + * + * document.detectEntities(options, function(err, entities) { + * if (err) { + * // Error handling omitted. + * } + * + * // entities = { + * // organizations: [ + * // { + * // name: 'Google', + * // type: 'ORGANIZATION', + * // metadata: { + * // wikipedia_url: 'http: * //en.wikipedia.org/wiki/Google' + * // }, + * // salience: 65.137446, + * // mentions: [ + * // { + * // text: { + * // content: 'Google', + * // beginOffset: -1 + * // } + * // } + * // ] + * // } + * // ], + * // places: [ + * // { + * // name: 'American', + * // type: 'LOCATION', + * // metadata: { + * // wikipedia_url: 'http: * //en.wikipedia.org/wiki/United_States' + * // }, + * // salience: 13.947371, + * // mentions: [ + * // { + * // text: { + * // content: 'American', + * // beginOffset: -1 + * // } + * // } + * // ] + * // } + * // ] + * // } + * }); + */ +Document.prototype.detectEntities = function(options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + var verbose = options.verbose === true; + + var grpcOpts = { + service: 'LanguageService', + method: 'analyzeEntities' + }; + + this.request(grpcOpts, this.reqOpts, function(err, resp) { + if (err) { + callback(err, null, resp); + return; + } + + var originalResp = extend(true, {}, resp); + var groupedEntities = Document.formatEntities_(resp.entities, verbose); + + callback(null, groupedEntities, originalResp); + }); +}; + +/** + * Detect the sentiment of the text in this document. + * + * @resource [documents.analyzeSentiment API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSentiment} + * + * @param {object=} options - Configuration object. + * @param {boolean} options.verbose - Enable verbose mode for more detailed + * results. Default: `false` + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error occurred while making this request. + * @param {number} callback.sentiment - A value in the range of `-100` to `100`. + * Large numbers represent more positive sentiments. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * document.detectSentiment(function(err, sentiment) { + * if (err) { + * // Error handling omitted. + * } + * + * // sentiment = 100 + * }); + * + * //- + * // Verbose mode may also be enabled for more detailed results. + * //- + * var options = { + * verbose: true + * }; + * + * document.detectSentiment(options, function(err, sentiment) { + * if (err) { + * // Error handling omitted. + * } + * + * // sentiment = { + * // polarity: 100, + * // magnitude: 40 + * // } + * }); + */ +Document.prototype.detectSentiment = function(options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + var verbose = options.verbose === true; + + var grpcOpts = { + service: 'LanguageService', + method: 'analyzeSentiment' + }; + + this.request(grpcOpts, this.reqOpts, function(err, resp) { + if (err) { + callback(err, null, resp); + return; + } + + var originalResp = extend(true, {}, resp); + var sentiment = Document.formatSentiment_(resp.documentSentiment, verbose); + + callback(null, sentiment, originalResp); + }); +}; + +/** + * Take a raw response from the API and make it more user-friendly. + * + * @private + * + * @param {object} entities - A group of entities returned from the API. + * @param {boolean} verbose - Enable verbose mode for more detailed results. + * @return {object} - The formatted entity object. + */ +Document.formatEntities_ = function(entities, verbose) { + var GROUP_NAME_TO_TYPE = { + UNKNOWN: 'unknown', + PERSON: 'people', + LOCATION: 'places', + ORGANIZATION: 'organizations', + EVENT: 'events', + WORK_OF_ART: 'art', + CONSUMER_GOOD: 'goods', + OTHER: 'other' + }; + + var groupedEntities = entities.reduce(function(acc, entity) { + entity = extend(true, {}, entity); + + var groupName = GROUP_NAME_TO_TYPE[entity.type]; + + entity.salience *= 100; + + acc[groupName] = arrify(acc[groupName]); + acc[groupName].push(entity); + acc[groupName].sort(Document.sortByProperty_('salience')); + + return acc; + }, {}); + + if (!verbose) { + // Simplify the response to only include an array of `name`s. + for (var groupName in groupedEntities) { + if (groupedEntities.hasOwnProperty(groupName)) { + groupedEntities[groupName] = + groupedEntities[groupName].map(prop('name')); + } + } + } + + return groupedEntities; +}; + +/** + * Take a raw response from the API and make it more user-friendly. + * + * @private + * + * @param {object[]} sentences - A group of sentence detections returned from + * the API. + * @param {boolean} verbose - Enable verbose mode for more detailed results. + * @return {object[]|string[]} - The formatted sentences or sentence descriptor + * objects in verbose mode. + */ +Document.formatSentences_ = function(sentences, verbose) { + sentences = sentences.map(prop('text')); + + if (!verbose) { + sentences = sentences.map(prop('content')); + } + + return sentences; +}; + +/** + * Take a raw response from the API and make it more user-friendly. + * + * @private + * + * @param {object} sentiment - An analysis of the document's sentiment from the + * API. + * @param {boolean} verbose - Enable verbose mode for more detailed results. + * @return {number|object} - The sentiment represented as a number in the range + * of `-100` to `100` or an object containing `polarity` and `magnitude` + * measurements in verbose mode. + */ +Document.formatSentiment_ = function(sentiment, verbose) { + sentiment = { + polarity: sentiment.polarity *= 100, + magnitude: sentiment.magnitude *= 100 + }; + + if (!verbose) { + sentiment = sentiment.polarity; + } + + return sentiment; +}; + +/** + * Take a raw response from the API and make it more user-friendly. + * + * @private + * + * @param {object[]} tokens - A group of syntax detections returned from the + * API. + * @param {boolean} verbose - Enable verbose mode for more detailed results. + * @return {number|object} - A slimmed down, simplified object or the original + * object in verbose mode. + */ +Document.formatTokens_ = function(tokens, verbose) { + if (!verbose) { + tokens = tokens.map(function(token) { + return { + text: token.text.content, + partOfSpeech: Document.PART_OF_SPEECH[token.partOfSpeech.tag], + partOfSpeechTag: token.partOfSpeech.tag + }; + }); + } + + return tokens; +}; + +/** + * Comparator function to sort an array of objects by a property. + * + * @private + * + * @param {string} propertyName - The name of the property to sort by. + * @return {function} - The comparator function. + */ +Document.sortByProperty_ = function(propertyName) { + return function(entityA, entityB) { + if (entityA[propertyName] < entityB[propertyName]) { + return 1; + } + + if (entityA[propertyName] > entityB[propertyName]) { + return -1; + } + + return 0; + }; +}; + +module.exports = Document; + diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js new file mode 100644 index 00000000000..3aab2b5f3e3 --- /dev/null +++ b/packages/google-cloud-language/src/index.js @@ -0,0 +1,432 @@ +/*! + * Copyright 2016 Google Inc. All Rights Reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * @module language + */ + +'use strict'; + +var extend = require('extend'); +var is = require('is'); +var GrpcService = require('@google-cloud/common').GrpcService; +var googleProtoFiles = require('google-proto-files'); +var nodeutil = require('util'); +var util = require('@google-cloud/common').util; + +/** + * @type {module:language/document} + * @private + */ +var Document = require('./document.js'); + +var PKG = require('../package.json'); + +/** + * The [Google Cloud Natural Language](https://cloud.google.com/natural-language/docs) + * API provides natural language understanding technologies to developers, + * including sentiment analysis, entity recognition, and syntax analysis. This + * API is part of the larger Cloud Machine Learning API. + * + * The Cloud Natural Language API currently supports English for + * [sentiment analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1beta1/documents/analyzeSentiment) + * and English, Spanish, and Japanese for + * [entity analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1beta1/documents/analyzeEntities) + * and + * [syntax analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1beta1/documents/annotateText). + * + * @constructor + * @alias module:language + * + * @classdesc + * The object returned from `gcloud.language` gives you access to the methods + * that will run detections and annotations from your text. + * + * To learn more about Google Cloud Natural Language, see the official + * [Google Cloud Natural Language API Documentation](https://cloud.google.com/natural-language/docs). + * + * @param {object} options - [Configuration object](#/docs). + * + * @example + * var gcloud = require('google-cloud')({ + * keyFilename: '/path/to/keyfile.json', + * projectId: 'grape-spaceship-123' + * }); + * + * var language = gcloud.language(); + */ +function Language(options) { + if (!(this instanceof Language)) { + options = util.normalizeArguments(this, options); + return new Language(options); + } + + var config = { + baseUrl: 'language.googleapis.com', + service: 'language', + apiVersion: 'v1beta1', + protoServices: { + LanguageService: { + path: googleProtoFiles.language.v1beta1, + service: 'cloud.language' + } + }, + scopes: [ + 'https://www.googleapis.com/auth/cloud-platform' + ], + userAgent: PKG.name + '/' + PKG.version + }; + + GrpcService.call(this, config, options); +} + +nodeutil.inherits(Language, GrpcService); + +/** + * Run an annotation of a block of text. + * + * NOTE: This is a convenience method which doesn't require creating a + * {module:language/document} object. If you are only running a single + * detection, this may be more convenient. However, if you plan to run multiple + * detections, it's easier to create a {module:language/document} object. + * + * @resource [documents.annotate API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotate} + * + * @param {string|module:storage/file} content - Inline content or a Storage + * File object. + * @param {object=} options - Configuration object. + * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * @param {string} options.language - The language of the text. + * @param {string} options.type - The type of document, either `html` or `text`. + * @param {boolean} options.verbose - Enable verbose mode for more detailed + * results. Default: `false` + * @param {function} callback - See {module:language/document#annotate}. + * + * @example + * //- + * // See {module:language/document#annotate} for a detailed breakdown of + * // the arguments your callback will be executed with. + * //- + * function callback(err, entities, apiResponse) {} + * + * language.annotate('Hello!', callback); + * + * //- + * // Or, provide a reference to a file hosted on Google Cloud Storage. + * //- + * var gcs = gcloud.storage(); + * var bucket = gcs.bucket('my-bucket'); + * var file = bucket.file('my-file'); + * + * language.annotate(file, callback); + * + * //- + * // Specify HTML content. + * //- + * var options = { + * type: 'html' + * }; + * + * language.annotate('Hello!', options, callback); + * + * //- + * // Verbose mode may also be enabled for more detailed results. + * //- + * var options = { + * verbose: true + * }; + * + * language.annotate('Hello!', options, callback); + */ +Language.prototype.annotate = function(content, options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + options = extend({}, options, { + content: content + }); + + var document = this.document(options); + document.annotate(options, callback); +}; + +/** + * Detect the entities from a block of text. + * + * NOTE: This is a convenience method which doesn't require creating a + * {module:language/document} object. If you are only running a single + * detection, this may be more convenient. However, if you plan to run multiple + * detections, it's easier to create a {module:language/document} object. + * + * @resource [documents.analyzeEntities API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeEntities} + * + * @param {string|module:storage/file} content - Inline content or a Storage + * File object. + * @param {object=} options - Configuration object. + * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * @param {string} options.language - The language of the text. + * @param {string} options.type - The type of document, either `html` or `text`. + * @param {boolean} options.verbose - Enable verbose mode for more detailed + * results. Default: `false` + * @param {function} callback - See {module:language/document#detectEntities}. + * + * @example + * //- + * // See {module:language/document#detectEntities} for a detailed breakdown of + * // the arguments your callback will be executed with. + * //- + * function callback(err, entities, apiResponse) {} + * + * language.detectEntities('Axel Foley is from Detroit', callback); + * + * //- + * // Or, provide a reference to a file hosted on Google Cloud Storage. + * //- + * var gcs = gcloud.storage(); + * var bucket = gcs.bucket('my-bucket'); + * var file = bucket.file('my-file'); + * + * language.detectEntities(file, callback); + * + * //- + * // Specify HTML content. + * //- + * var options = { + * type: 'html' + * }; + * + * language.detectEntities('Axel Foley is from Detroit', options, callback); + * + * //- + * // Verbose mode may also be enabled for more detailed results. + * //- + * var options = { + * verbose: true + * }; + * + * language.detectEntities('Axel Foley is from Detroit', options, callback); + */ +Language.prototype.detectEntities = function(content, options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + options = extend({}, options, { + content: content + }); + + var document = this.document(options); + document.detectEntities(options, callback); +}; + +/** + * Detect the sentiment of a block of text. + * + * NOTE: This is a convenience method which doesn't require creating a + * {module:language/document} object. If you are only running a single + * detection, this may be more convenient. However, if you plan to run multiple + * detections, it's easier to create a {module:language/document} object. + * + * @resource [documents.analyzeSentiment API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSentiment} + * + * @param {string|module:storage/file} content - Inline content or a Storage + * File object. + * @param {object=} options - Configuration object. + * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * @param {string} options.language - The language of the text. + * @param {string} options.type - The type of document, either `html` or `text`. + * @param {boolean} options.verbose - Enable verbose mode for more detailed + * results. Default: `false` + * @param {function} callback - See {module:language/document#detectSentiment}. + * + * @example + * //- + * // See {module:language/document#detectSentiment} for a detailed breakdown of + * // the arguments your callback will be executed with. + * //- + * function callback(err, sentiment, apiResponse) {} + * + * language.detectSentiment('Hello!', callback); + * + * //- + * // Or, provide a reference to a file hosted on Google Cloud Storage. + * //- + * var gcs = gcloud.storage(); + * var bucket = gcs.bucket('my-bucket'); + * var file = bucket.file('my-file'); + * + * language.detectSentiment(file, callback); + * + * //- + * // Specify HTML content. + * //- + * var options = { + * type: 'html' + * }; + * + * language.detectSentiment('<h1>Document Title</h1>', options, callback); + * + * //- + * // Verbose mode may also be enabled for more detailed results. + * //- + * var options = { + * verbose: true + * }; + * + * language.detectSentiment('Hello!', options, callback); + */ +Language.prototype.detectSentiment = function(content, options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + options = extend({}, options, { + content: content + }); + + var document = this.document(options); + document.detectSentiment(options, callback); +}; + +/** + * Create a Document object for an unknown type. If you know the type, use the + * appropriate method below: + * + * - {module:language#html} - For HTML documents. + * - {module:language#text} - For text documents. + * + * @param {object|string|module:storage/file} config - Configuration object, the + * inline content of the document, or a Storage File object. + * @param {string|module:storage/file} options.content - If using `config` as an + * object to specify the encoding and/or language of the document, use this + * property to pass the inline content of the document or a Storage File + * object. + * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * @param {string} options.language - The language of the text. + * @return {module:language/document} + * + * @example + * var document = language.document('Inline content of an unknown type.'); + * + * //- + * // Or, provide a reference to a file hosted on Google Cloud Storage. + * //- + * var gcs = gcloud.storage(); + * var bucket = gcs.bucket('my-bucket'); + * var file = bucket.file('my-file'); + * + * var document = language.document(file); + * + * //- + * // You can now run detections on the document. + * // + * // See {module:language/document} for a complete list of methods available. + * //- + * document.detectEntities(function(err, entities) {}); + */ +Language.prototype.document = function(config) { + return new Document(this, config); +}; + +/** + * Create a Document object from an HTML document. You may provide either inline + * HTML content or a Storage File object (see {module:storage/file}). + * + * @param {string|module:storage/file} content - Inline HTML content or a + * Storage File object. + * @param {object=} options - Configuration object. + * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * @param {string} options.language - The language of the text. + * @return {module:language/document} + * + * @example + * var document = language.html('<h1>Document Title</h1>'); + * + * //- + * // Or, provide a reference to a file hosted on Google Cloud Storage. + * //- + * var gcs = gcloud.storage(); + * var bucket = gcs.bucket('my-bucket'); + * var file = bucket.file('my-file.html'); + * + * var document = language.html(file); + * + * //- + * // You can now run detections on the document. + * // + * // See {module:language/document} for a complete list of methods available. + * //- + * document.detectEntities(function(err, entities) {}); + */ +Language.prototype.html = function(content, options) { + options = extend({}, options, { + type: 'HTML', + content: content + }); + + return this.document(options); +}; + +/** + * Create a Document object from a text-based document. You may provide either + * inline text content or a Storage File object (see {module:storage/file}). + * + * @param {string|module:storage/file} content - Inline text content or a + * Storage File object. + * @param {object=} options - Configuration object. + * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * @param {string} options.language - The language of the text. + * @return {module:language/document} + * + * @example + * var document = language.text('This is using inline text content.'); + * + * //- + * // Or, provide a reference to a file hosted on Google Cloud Storage. + * //- + * var gcs = gcloud.storage(); + * var bucket = gcs.bucket('my-bucket'); + * var file = bucket.file('my-file.txt'); + * + * var document = language.text(file); + * + * //- + * // You can now run detections on the document. + * // + * // See {module:language/document} for a complete list of methods available. + * //- + * document.detectEntities(function(err, entities) {}); + */ +Language.prototype.text = function(content, options) { + options = extend({}, options, { + type: 'PLAIN_TEXT', + content: content + }); + + return this.document(options); +}; + +module.exports = Language; diff --git a/packages/google-cloud-language/system-test/language.js b/packages/google-cloud-language/system-test/language.js new file mode 100644 index 00000000000..969763ae63c --- /dev/null +++ b/packages/google-cloud-language/system-test/language.js @@ -0,0 +1,463 @@ +/*! + * Copyright 2016 Google Inc. All Rights Reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +var assert = require('assert'); +var is = require('is'); +var Storage = require('@google-cloud/storage'); +var through = require('through2'); +var uuid = require('node-uuid'); + +var env = require('../../../system-test/env.js'); +var Language = require('../'); + +describe('Language', function() { + var language; + + var TESTS_PREFIX = 'gcloud-tests-language-'; + + var GCS; + var BUCKET; + + var TEXT_CONTENT_SENTENCES = [ + 'Hello from stephen and dave!', + 'If you find yourself in michigan, come say hi!' + ]; + + var HTML_CONTENT = [ + '', + ' ' + TEXT_CONTENT_SENTENCES[0] + '', + ' ' + TEXT_CONTENT_SENTENCES[1] + '', + '' + ].join('\n'); + + var TEXT_CONTENT = TEXT_CONTENT_SENTENCES.join(' '); + + before(function(done) { + language = new Language(env); + GCS = new Storage(env); + BUCKET = GCS.bucket(generateName('bucket')); + + BUCKET.create(done); + }); + + after(function(done) { + GCS.getBuckets({ prefix: TESTS_PREFIX }) + .on('error', done) + .pipe(through.obj(function(bucket, _, next) { + bucket.deleteFiles({ force: true }, function(err) { + if (err) { + next(err); + return; + } + + bucket.delete(next); + }); + })) + .on('error', done) + .on('finish', done); + }); + + var DESCRIBES = [ + { + name: 'HTML', + + vars: { + content: HTML_CONTENT, + type: 'html' + }, + + describes: [ + { + name: 'inline', + + getDocument: function(callback) { + callback(null, language.html(this.vars.content)); + } + }, + + { + name: 'GCS file', + + getDocument: function(callback) { + createFile(this.vars.content, function(err, file) { + if (err) { + callback(err); + return; + } + + callback(null, language.html(file)); + }); + } + } + ] + }, + + { + name: 'Text', + + vars: { + content: TEXT_CONTENT, + type: 'text' + }, + + describes: [ + { + name: 'inline', + + getDocument: function(callback) { + callback(null, language.text(this.vars.content)); + } + }, + + { + name: 'GCS file', + + getDocument: function(callback) { + createFile(this.vars.content, function(err, file) { + if (err) { + callback(err); + return; + } + + callback(null, language.text(file)); + }); + } + } + ] + }, + + { + name: 'Unknown', + + vars: { + content: TEXT_CONTENT + }, + + describes: [ + { + name: 'inline', + + getDocument: function(callback) { + callback(null, language.document(this.vars.content)); + } + }, + + { + name: 'GCS file', + + getDocument: function(callback) { + createFile(this.vars.content, function(err, file) { + if (err) { + callback(err); + return; + } + + callback(null, language.document(file)); + }); + } + } + ] + } + ]; + + DESCRIBES.forEach(function(describeObj) { + var CONTENT = describeObj.vars.content; + var CONTENT_TYPE = describeObj.vars.type; + + describe(describeObj.name, function() { + var innerDescribes = describeObj.describes; + + innerDescribes.forEach(function(innerDescribeObj) { + var DOC; + + describe(innerDescribeObj.name, function() { + before(function(done) { + var getDocument = innerDescribeObj.getDocument; + + getDocument.call(describeObj, function(err, doc) { + if (err) { + done(err); + return; + } + + DOC = doc; + done(); + }); + }); + + describe('annotation', function() { + it('should work without creating a document', function(done) { + if (!CONTENT_TYPE) { + language.annotate(CONTENT, validateAnnotationSimple(done)); + return; + } + + language.annotate( + CONTENT, + { type: CONTENT_TYPE }, + validateAnnotationSimple(done) + ); + }); + + it('should return the correct simplified response', function(done) { + DOC.annotate(validateAnnotationSimple(done)); + }); + + it('should support verbose mode', function(done) { + DOC.annotate({ verbose: true }, validateAnnotationVerbose(done)); + }); + + it('should return only a single feature', function(done) { + DOC.annotate({ + entities: true + }, validateAnnotationSingleFeatureSimple(done)); + }); + + it('should return a single feat in verbose mode', function(done) { + DOC.annotate({ + entities: true, + verbose: true + }, validateAnnotationSingleFeatureVerbose(done)); + }); + }); + + describe('entities', function() { + it('should work without creating a document', function(done) { + if (!CONTENT_TYPE) { + language.detectEntities(CONTENT, validateEntitiesSimple(done)); + return; + } + + language.detectEntities( + CONTENT, + { type: CONTENT_TYPE }, + validateEntitiesSimple(done) + ); + }); + + it('should return the correct simplified response', function(done) { + DOC.detectEntities(validateEntitiesSimple(done)); + }); + + it('should support verbose mode', function(done) { + DOC.detectEntities({ + verbose: true + }, validateEntitiesVerbose(done)); + }); + }); + + describe('sentiment', function() { + it('should work without creating a document', function(done) { + if (!CONTENT_TYPE) { + language.detectSentiment( + CONTENT, + validateSentimentSimple(done) + ); + return; + } + + language.detectSentiment( + CONTENT, + { type: CONTENT_TYPE }, + validateSentimentSimple(done) + ); + }); + + it('should return the correct simplified response', function(done) { + DOC.detectSentiment(validateSentimentSimple(done)); + }); + + it('should support verbose mode', function(done) { + DOC.detectSentiment({ + verbose: true + }, validateSentimentVerbose(done)); + }); + }); + }); + }); + }); + }); + + function generateName(resourceType) { + var id = uuid.v4().substr(0, 10); + return TESTS_PREFIX + resourceType + '-' + id; + } + + function createFile(content, callback) { + var file = BUCKET.file(generateName('file')); + + file.save(content, function(err) { + if (err) { + callback(err); + return; + } + + callback(null, file); + }); + } + + function validateAnnotationSimple(callback) { + return function(err, annotation, apiResponse) { + assert.ifError(err); + + assert.strictEqual(annotation.language, 'en'); + + assert(is.number(annotation.sentiment)); + + assert.deepEqual(annotation.entities, { + people: ['stephen', 'dave'], + places: ['michigan'] + }); + + assert.deepEqual(annotation.sentences, TEXT_CONTENT_SENTENCES); + + assert(is.array(annotation.tokens)); + assert.deepEqual(annotation.tokens[0], { + text: 'Hello', + partOfSpeech: 'Other: foreign words, typos, abbreviations', + partOfSpeechTag: 'X' + }); + + assert(is.object(apiResponse)); + + callback(); + }; + } + + function validateAnnotationVerbose(callback) { + return function(err, annotation, apiResponse) { + assert.ifError(err); + + assert.strictEqual(annotation.language, 'en'); + + assert(is.object(annotation.sentiment)); + + assert(is.array(annotation.entities.people)); + assert.strictEqual(annotation.entities.people.length, 2); + assert(is.object(annotation.entities.people[0])); + + assert(is.array(annotation.sentences)); + assert(is.object(annotation.sentences[0])); + + assert(is.array(annotation.tokens)); + assert(is.object(annotation.tokens[0])); + assert.strictEqual(annotation.tokens[0].text.content, 'Hello'); + + assert(is.object(apiResponse)); + + callback(); + }; + } + + function validateAnnotationSingleFeatureSimple(callback) { + return function(err, annotation, apiResponse) { + assert.ifError(err); + + assert.strictEqual(annotation.language, 'en'); + + assert.deepEqual(annotation.entities, { + people: ['stephen', 'dave'], + places: ['michigan'] + }); + + assert.strictEqual(annotation.sentences, undefined); + assert.strictEqual(annotation.sentiment, undefined); + assert.strictEqual(annotation.tokens, undefined); + + assert(is.object(apiResponse)); + + callback(); + }; + } + + function validateAnnotationSingleFeatureVerbose(callback) { + return function(err, annotation, apiResponse) { + assert.ifError(err); + + assert.strictEqual(annotation.language, 'en'); + + assert(is.array(annotation.entities.people)); + assert.strictEqual(annotation.entities.people.length, 2); + assert(is.object(annotation.entities.people[0])); + + assert.strictEqual(annotation.sentences, undefined); + assert.strictEqual(annotation.sentiment, undefined); + assert.strictEqual(annotation.tokens, undefined); + + assert(is.object(apiResponse)); + + callback(); + }; + } + + function validateEntitiesSimple(callback) { + return function(err, entities, apiResponse) { + assert.ifError(err); + + assert.deepEqual(entities, { + people: ['stephen', 'dave'], + places: ['michigan'] + }); + + assert(is.object(apiResponse)); + + callback(); + }; + } + + function validateEntitiesVerbose(callback) { + return function(err, entities, apiResponse) { + assert.ifError(err); + + assert(is.array(entities.people)); + assert.strictEqual(entities.people.length, 2); + assert(is.object(entities.people[0])); + + assert(is.object(apiResponse)); + + callback(); + }; + } + + function validateSentimentSimple(callback) { + return function(err, sentiment, apiResponse) { + assert.ifError(err); + + assert(is.number(sentiment)); + + assert(is.object(apiResponse)); + + callback(); + }; + } + + function validateSentimentVerbose(callback) { + return function(err, sentiment, apiResponse) { + assert.ifError(err); + + assert(is.object(sentiment)); + assert(is.number(sentiment.polarity)); + assert(is.number(sentiment.magnitude)); + + assert(is.object(apiResponse)); + + callback(); + }; + } +}); + diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js new file mode 100644 index 00000000000..2801930c4f8 --- /dev/null +++ b/packages/google-cloud-language/test/document.js @@ -0,0 +1,832 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +var assert = require('assert'); +var extend = require('extend'); +var prop = require('propprop'); +var proxyquire = require('proxyquire'); +var util = require('@google-cloud/common').util; + +function FakeFile() {} + +describe('Document', function() { + var DocumentCache; + var Document; + var document; + + var LANGUAGE = { + request: util.noop + }; + var CONFIG = 'inline content'; + + before(function() { + Document = proxyquire('../src/document.js', { + '@google-cloud/storage': { + File: FakeFile + } + }); + + DocumentCache = extend(true, {}, Document); + }); + + beforeEach(function() { + for (var property in DocumentCache) { + if (DocumentCache.hasOwnProperty(property)) { + Document[property] = DocumentCache[property]; + } + } + + document = new Document(LANGUAGE, CONFIG); + }); + + describe('instantiation', function() { + it('should set the correct reqOpts for inline content', function() { + assert.deepEqual(document.reqOpts, { + document: { + content: CONFIG, + type: 'PLAIN_TEXT' + } + }); + }); + + it('should set the correct reqOpts for content with encoding', function() { + var document = new Document(LANGUAGE, { + content: CONFIG, + encoding: 'utf-8' + }); + + assert.deepEqual(document.reqOpts, { + document: { + content: CONFIG, + type: 'PLAIN_TEXT' + }, + encodingType: 'UTF8' + }); + }); + + it('should set the correct reqOpts for content with language', function() { + var document = new Document(LANGUAGE, { + content: CONFIG, + language: 'EN' + }); + + assert.deepEqual(document.reqOpts, { + document: { + content: CONFIG, + type: 'PLAIN_TEXT', + language: 'EN' + } + }); + }); + + it('should set the correct reqOpts for content with type', function() { + var document = new Document(LANGUAGE, { + content: CONFIG, + type: 'html' + }); + + assert.deepEqual(document.reqOpts, { + document: { + content: CONFIG, + type: 'HTML' + } + }); + }); + + it('should set the correct reqOpts for text', function() { + var document = new Document(LANGUAGE, { + content: CONFIG, + type: 'text' + }); + + assert.deepEqual(document.reqOpts, { + document: { + content: CONFIG, + type: 'PLAIN_TEXT' + } + }); + }); + + it('should set the GCS content URI from a File', function() { + var file = new FakeFile(); + + // Leave spaces in to check that it is URI-encoded: + file.bucket = { id: 'bucket id' }; + file.id = 'file name'; + + var document = new Document(LANGUAGE, { + content: file + }); + + assert.deepEqual(document.reqOpts, { + document: { + gcsContentUri: [ + 'gs://', + encodeURIComponent(file.bucket.id), + '/', + encodeURIComponent(file.id), + ].join(''), + type: 'PLAIN_TEXT' + } + }); + }); + + it('should create a request function', function(done) { + var LanguageInstance = { + request: function() { + assert.strictEqual(this, LanguageInstance); + done(); + } + }; + + var document = new Document(LanguageInstance, CONFIG); + document.request(); + }); + }); + + describe('PART_OF_SPEECH', function() { + var expectedPartOfSpeech = { + UNKNOWN: 'Unknown', + ADJ: 'Adjective', + ADP: 'Adposition (preposition and postposition)', + ADV: 'Adverb', + CONJ: 'Conjunction', + DET: 'Determiner', + NOUN: 'Noun (common and proper)', + NUM: 'Cardinal number', + PRON: 'Pronoun', + PRT: 'Particle or other function word', + PUNCT: 'Punctuation', + VERB: 'Verb (all tenses and modes)', + X: 'Other: foreign words, typos, abbreviations', + AFFIX: 'Affix' + }; + + it('should define the correct parts of speech', function() { + assert.deepEqual(Document.PART_OF_SPEECH, expectedPartOfSpeech); + }); + }); + + describe('annotate', function() { + it('should make the correct API request', function(done) { + document.request = function(grpcOpts, reqOpts) { + assert.deepEqual(grpcOpts, { + service: 'LanguageService', + method: 'annotateText' + }); + + assert.deepEqual(reqOpts, extend( + { + features: { + extractDocumentSentiment: true, + extractEntities: true, + extractSyntax: true + } + }, + document.reqOpts + )); + + done(); + }; + + document.annotate(assert.ifError); + }); + + it('should allow specifying individual features', function(done) { + document.request = function(grpcOpts, reqOpts) { + assert.deepEqual(reqOpts.features, { + extractDocumentSentiment: false, + extractEntities: true, + extractSyntax: true + }); + + done(); + }; + + document.annotate({ + entities: true, + syntax: true + }, assert.ifError); + }); + + describe('error', function() { + var apiResponse = {}; + var error = new Error('Error.'); + + beforeEach(function() { + document.request = function(grpcOpts, reqOpts, callback) { + callback(error, apiResponse); + }; + }); + + it('should exec callback with error and API response', function(done) { + document.annotate(function(err, annotation, apiResponse_) { + assert.strictEqual(err, error); + assert.strictEqual(annotation, null); + assert.strictEqual(apiResponse_, apiResponse); + done(); + }); + }); + }); + + describe('success', function() { + var apiResponses = { + default: { + language: 'EN', + sentences: [], + tokens: [] + }, + + withSentiment: { + documentSentiment: {} + }, + + withEntities: { + entities: [] + }, + + withSyntax: { + sentences: {}, + tokens: {} + } + }; + + apiResponses.withAll = extend( + {}, + apiResponses.default, + apiResponses.withSentiment, + apiResponses.withEntities, + apiResponses.withSyntax + ); + + function createRequestWithResponse(apiResponse) { + return function(grpcOpts, reqOpts, callback) { + callback(null, apiResponse, apiResponse); + }; + } + + beforeEach(function() { + Document.formatSentiment_ = util.noop; + Document.formatEntities_ = util.noop; + Document.formatSentences_ = util.noop; + Document.formatTokens_ = util.noop; + }); + + it('should always return the language', function(done) { + var apiResponse = apiResponses.default; + document.request = createRequestWithResponse(apiResponse); + + document.annotate(function(err, annotation, apiResponse_) { + assert.ifError(err); + assert.strictEqual(annotation.language, apiResponse.language); + assert.deepEqual(apiResponse_, apiResponse); + done(); + }); + }); + + it('should return syntax when no features are requested', function(done) { + var apiResponse = apiResponses.default; + document.request = createRequestWithResponse(apiResponse); + + var formattedSentences = []; + Document.formatSentences_ = function(sentences, verbose) { + assert.strictEqual(sentences, apiResponse.sentences); + assert.strictEqual(verbose, false); + return formattedSentences; + }; + + var formattedTokens = []; + Document.formatTokens_ = function(tokens, verbose) { + assert.strictEqual(tokens, apiResponse.tokens); + assert.strictEqual(verbose, false); + return formattedTokens; + }; + + document.annotate(function(err, annotation, apiResponse_) { + assert.ifError(err); + assert.strictEqual(annotation.sentences, formattedSentences); + assert.strictEqual(annotation.tokens, formattedTokens); + assert.deepEqual(apiResponse_, apiResponse); + done(); + }); + }); + + it('should return the formatted sentiment if available', function(done) { + var apiResponse = apiResponses.withSentiment; + document.request = createRequestWithResponse(apiResponse); + + var formattedSentiment = {}; + Document.formatSentiment_ = function(sentiment, verbose) { + assert.strictEqual(sentiment, apiResponse.documentSentiment); + assert.strictEqual(verbose, false); + return formattedSentiment; + }; + + document.annotate(function(err, annotation, apiResponse_) { + assert.ifError(err); + + assert.strictEqual(annotation.language, apiResponse.language); + assert.strictEqual(annotation.sentiment, formattedSentiment); + + assert.deepEqual(apiResponse_, apiResponse); + + done(); + }); + }); + + it('should return the formatted entities if available', function(done) { + var apiResponse = apiResponses.withEntities; + document.request = createRequestWithResponse(apiResponse); + + var formattedEntities = []; + Document.formatEntities_ = function(entities, verbose) { + assert.strictEqual(entities, apiResponse.entities); + assert.strictEqual(verbose, false); + return formattedEntities; + }; + + document.annotate(function(err, annotation, apiResponse_) { + assert.ifError(err); + + assert.strictEqual(annotation.language, apiResponse.language); + assert.strictEqual(annotation.entities, formattedEntities); + + assert.deepEqual(apiResponse_, apiResponse); + + done(); + }); + }); + + it('should not return syntax analyses when not wanted', function(done) { + var apiResponse = apiResponses.default; + document.request = createRequestWithResponse(apiResponse); + + document.annotate({ + entities: true, + sentiment: true + }, function(err, annotation) { + assert.ifError(err); + + assert.strictEqual(annotation.sentences, undefined); + assert.strictEqual(annotation.tokens, undefined); + + done(); + }); + }); + + it('should allow verbose mode', function(done) { + var apiResponse = apiResponses.withAll; + document.request = createRequestWithResponse(apiResponse); + + var numCallsWithCorrectVerbosityArgument = 0; + + function incrementVerbosityVar(_, verbose) { + if (verbose === true) { + numCallsWithCorrectVerbosityArgument++; + } + } + + Document.formatSentiment_ = incrementVerbosityVar; + Document.formatEntities_ = incrementVerbosityVar; + Document.formatSentences_ = incrementVerbosityVar; + Document.formatTokens_ = incrementVerbosityVar; + + document.annotate({ + verbose: true + }, function(err) { + assert.ifError(err); + + assert.strictEqual(numCallsWithCorrectVerbosityArgument, 4); + + done(); + }); + }); + }); + }); + + describe('detectEntities', function() { + it('should make the correct API request', function(done) { + document.request = function(grpcOpts, reqOpts) { + assert.deepEqual(grpcOpts, { + service: 'LanguageService', + method: 'analyzeEntities' + }); + + assert.strictEqual(reqOpts, document.reqOpts); + + done(); + }; + + document.detectEntities(assert.ifError); + }); + + describe('error', function() { + var apiResponse = {}; + var error = new Error('Error.'); + + beforeEach(function() { + document.request = function(grpcOpts, reqOpts, callback) { + callback(error, apiResponse); + }; + }); + + it('should exec callback with error and API response', function(done) { + document.detectEntities(function(err, entities, apiResponse_) { + assert.strictEqual(err, error); + assert.strictEqual(entities, null); + assert.strictEqual(apiResponse_, apiResponse); + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = { + entities: [] + }; + + var originalApiResponse = extend({}, apiResponse); + + beforeEach(function() { + document.request = function(grpcOpts, reqOpts, callback) { + callback(null, apiResponse); + }; + }); + + it('should format the entities', function(done) { + var formattedEntities = {}; + + Document.formatEntities_ = function(entities, verbose) { + assert.strictEqual(entities, apiResponse.entities); + assert.strictEqual(verbose, false); + return formattedEntities; + }; + + document.detectEntities(function(err, entities) { + assert.ifError(err); + assert.strictEqual(entities, formattedEntities); + done(); + }); + }); + + it('should clone the response object', function(done) { + document.detectEntities(function(err, entities, apiResponse_) { + assert.ifError(err); + assert.notStrictEqual(apiResponse_, apiResponse); + assert.deepEqual(apiResponse_, originalApiResponse); + done(); + }); + }); + + it('should allow verbose mode', function(done) { + Document.formatEntities_ = function(entities, verbose) { + assert.strictEqual(verbose, true); + done(); + }; + + document.detectEntities({ + verbose: true + }, assert.ifError); + }); + }); + }); + + describe('detectSentiment', function() { + it('should make the correct API request', function(done) { + document.request = function(grpcOpts, reqOpts) { + assert.deepEqual(grpcOpts, { + service: 'LanguageService', + method: 'analyzeSentiment' + }); + + assert.strictEqual(reqOpts, document.reqOpts); + + done(); + }; + + document.detectSentiment(assert.ifError); + }); + + describe('error', function() { + var apiResponse = {}; + var error = new Error('Error.'); + + beforeEach(function() { + document.request = function(grpcOpts, reqOpts, callback) { + callback(error, apiResponse); + }; + }); + + it('should exec callback with error and API response', function(done) { + document.detectSentiment(function(err, sentiment, apiResponse_) { + assert.strictEqual(err, error); + assert.strictEqual(sentiment, null); + assert.strictEqual(apiResponse_, apiResponse); + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = { + documentSentiment: {} + }; + + var originalApiResponse = extend({}, apiResponse); + + beforeEach(function() { + Document.formatSentiment_ = util.noop; + + document.request = function(grpcOpts, reqOpts, callback) { + callback(null, apiResponse); + }; + }); + + it('should format the sentiment', function(done) { + var formattedSentiment = {}; + + Document.formatSentiment_ = function(sentiment, verbose) { + assert.strictEqual(sentiment, apiResponse.documentSentiment); + assert.strictEqual(verbose, false); + return formattedSentiment; + }; + + document.detectSentiment(function(err, sentiment) { + assert.ifError(err); + assert.strictEqual(sentiment, formattedSentiment); + done(); + }); + }); + + it('should clone the response object', function(done) { + document.detectSentiment(function(err, sentiment, apiResponse_) { + assert.ifError(err); + assert.notStrictEqual(apiResponse_, apiResponse); + assert.deepEqual(apiResponse_, originalApiResponse); + done(); + }); + }); + + it('should allow verbose mode', function(done) { + Document.formatSentiment_ = function(sentiment, verbose) { + assert.strictEqual(verbose, true); + done(); + }; + + document.detectSentiment({ + verbose: true + }, assert.ifError); + }); + }); + }); + + describe('formatEntities_', function() { + var ENTITIES = [ + { type: 'UNKNOWN', salience: -1, name: 'second' }, + { type: 'UNKNOWN', salience: 1, name: 'first' }, + + { type: 'PERSON', salience: -1, name: 'second' }, + { type: 'PERSON', salience: 1, name: 'first' }, + + { type: 'LOCATION', salience: -1, name: 'second' }, + { type: 'LOCATION', salience: 1, name: 'first' }, + + { type: 'ORGANIZATION', salience: -1, name: 'second' }, + { type: 'ORGANIZATION', salience: 1, name: 'first' }, + + { type: 'EVENT', salience: -1, name: 'second' }, + { type: 'EVENT', salience: 1, name: 'first' }, + + { type: 'WORK_OF_ART', salience: -1, name: 'second' }, + { type: 'WORK_OF_ART', salience: 1, name: 'first' }, + + { type: 'CONSUMER_GOOD', salience: -1, name: 'second' }, + { type: 'CONSUMER_GOOD', salience: 1, name: 'first' }, + + { type: 'OTHER', salience: -1, name: 'second' }, + { type: 'OTHER', salience: 1, name: 'first' } + ]; + + var VERBOSE = false; + + var entitiesCopy = extend(true, {}, ENTITIES); + var FORMATTED_ENTITIES = { + unknown: [ entitiesCopy[1], entitiesCopy[0] ], + people: [ entitiesCopy[3], entitiesCopy[2] ], + places: [ entitiesCopy[5], entitiesCopy[4] ], + organizations: [ entitiesCopy[7], entitiesCopy[6] ], + events: [ entitiesCopy[9], entitiesCopy[8] ], + art: [ entitiesCopy[11], entitiesCopy[10] ], + goods: [ entitiesCopy[13], entitiesCopy[12] ], + other: [ entitiesCopy[15], entitiesCopy[14] ], + }; + + for (var entityType in FORMATTED_ENTITIES) { + FORMATTED_ENTITIES[entityType] = FORMATTED_ENTITIES[entityType] + .map(function(entity) { + entity.salience *= 100; + return entity; + }); + } + + var EXPECTED_FORMATTED_ENTITIES = { + default: extend(true, {}, FORMATTED_ENTITIES), + verbose: extend(true, {}, FORMATTED_ENTITIES) + }; + + for (var entityGroupType in EXPECTED_FORMATTED_ENTITIES.default) { + // Only the `name` property is returned by default: + EXPECTED_FORMATTED_ENTITIES.default[entityGroupType] = + EXPECTED_FORMATTED_ENTITIES.default[entityGroupType].map(prop('name')); + } + + it('should group and sort entities correctly', function() { + var formattedEntities = Document.formatEntities_(ENTITIES, VERBOSE); + + Document.sortByProperty_ = function(propertyName) { + assert.strictEqual(propertyName, 'salience'); + return function() { return -1; }; + }; + + assert.deepEqual(formattedEntities, EXPECTED_FORMATTED_ENTITIES.default); + }); + + it('should group and sort entities correctly in verbose mode', function() { + var formattedEntities = Document.formatEntities_(ENTITIES, true); + + Document.sortByProperty_ = function(propertyName) { + assert.strictEqual(propertyName, 'salience'); + return function() { return -1; }; + }; + + assert.deepEqual(formattedEntities, EXPECTED_FORMATTED_ENTITIES.verbose); + }); + }); + + describe('formatSentences_', function() { + var SENTENCES = [ + { + text: { + content: 'Sentence text', + property: 'value' + } + }, + { + text: { + content: 'Another sentence', + property: 'value' + } + } + ]; + + var VERBOSE = false; + + var EXPECTED_FORMATTED_SENTENCES = { + default: SENTENCES.map(prop('text')).map(prop('content')), + verbose: SENTENCES.map(prop('text')) + }; + + it('should correctly format sentences', function() { + var formattedSentences = Document.formatSentences_(SENTENCES, VERBOSE); + + assert.deepEqual( + formattedSentences, + EXPECTED_FORMATTED_SENTENCES.default + ); + }); + + it('should correctly format sentences in verbose mode', function() { + var formattedSentences = Document.formatSentences_(SENTENCES, true); + + assert.deepEqual( + formattedSentences, + EXPECTED_FORMATTED_SENTENCES.verbose + ); + }); + }); + + describe('formatSentiment_', function() { + var SENTIMENT = { + polarity: -0.5, + magnitude: 0.5 + }; + + var VERBOSE = false; + + var EXPECTED_FORMATTED_SENTIMENT = { + default: SENTIMENT.polarity * 100, + verbose: { + polarity: SENTIMENT.polarity * 100, + magnitude: SENTIMENT.magnitude * 100 + } + }; + + it('should format the sentiment correctly', function() { + var sentiment = extend({}, SENTIMENT); + var formattedSentiment = Document.formatSentiment_(sentiment, VERBOSE); + + assert.deepEqual( + formattedSentiment, + EXPECTED_FORMATTED_SENTIMENT.default + ); + }); + + it('should format the sentiment correctly in verbose mode', function() { + var sentiment = extend({}, SENTIMENT); + var formattedSentiment = Document.formatSentiment_(sentiment, true); + + assert.deepEqual( + formattedSentiment, + EXPECTED_FORMATTED_SENTIMENT.verbose + ); + }); + }); + + describe('formatTokens_', function() { + var TOKENS = [ + { + text: { + content: 'Text content' + }, + partOfSpeech: { + tag: 'PART_OF_SPEECH_TAG' + }, + property: 'value' + } + ]; + + var VERBOSE = false; + + var PART_OF_SPEECH = { + PART_OF_SPEECH_TAG: 'part of speech value' + }; + + var EXPECTED_FORMATTED_TOKENS = { + default: TOKENS.map(function(token) { + return { + text: token.text.content, + partOfSpeech: PART_OF_SPEECH.PART_OF_SPEECH_TAG, + partOfSpeechTag: 'PART_OF_SPEECH_TAG' + }; + }), + + verbose: TOKENS + }; + + beforeEach(function() { + Document.PART_OF_SPEECH = PART_OF_SPEECH; + }); + + it('should correctly format tokens', function() { + var formattedTokens = Document.formatTokens_(TOKENS, VERBOSE); + + assert.deepEqual(formattedTokens, EXPECTED_FORMATTED_TOKENS.default); + }); + + it('should correctly format tokens in verbose mode', function() { + var formattedTokens = Document.formatTokens_(TOKENS, true); + + assert.deepEqual(formattedTokens, EXPECTED_FORMATTED_TOKENS.verbose); + }); + }); + + describe('sortByProperty_', function() { + var sortFn; + + beforeEach(function() { + sortFn = Document.sortByProperty_('sortedProperty'); + }); + + it('should sort by a property name', function() { + assert.strictEqual( + sortFn({ sortedProperty: 0 }, { sortedProperty: 1 }), + 1 + ); + + assert.strictEqual( + sortFn({ sortedProperty: 1 }, { sortedProperty: -1 }), + -1 + ); + + assert.strictEqual( + sortFn({ sortedProperty: 0 }, { sortedProperty: 0 }), + 0 + ); + }); + }); +}); diff --git a/packages/google-cloud-language/test/index.js b/packages/google-cloud-language/test/index.js new file mode 100644 index 00000000000..13a9af7d227 --- /dev/null +++ b/packages/google-cloud-language/test/index.js @@ -0,0 +1,303 @@ +/** + * Copyright 2016 Google Inc. All Rights Reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +var assert = require('assert'); +var extend = require('extend'); +var googleProtoFiles = require('google-proto-files'); +var proxyquire = require('proxyquire'); +var util = require('@google-cloud/common').util; + +var PKG = require('../package.json'); + +var fakeUtil = extend(true, {}, util); + +function FakeDocument() { + this.calledWith_ = arguments; +} + +function FakeGrpcService() { + this.calledWith_ = arguments; +} + +describe('Language', function() { + var Language; + var language; + + var OPTIONS = {}; + + before(function() { + Language = proxyquire('../src/index.js', { + '@google-cloud/common': { + util: fakeUtil, + GrpcService: FakeGrpcService + }, + './document.js': FakeDocument + }); + }); + + beforeEach(function() { + language = new Language(OPTIONS); + }); + + describe('instantiation', function() { + it('should normalize the arguments', function() { + var options = { + projectId: 'project-id', + credentials: 'credentials', + email: 'email', + keyFilename: 'keyFile' + }; + + var normalizeArguments = fakeUtil.normalizeArguments; + var normalizeArgumentsCalled = false; + var fakeContext = {}; + + fakeUtil.normalizeArguments = function(context, options_) { + normalizeArgumentsCalled = true; + assert.strictEqual(context, fakeContext); + assert.strictEqual(options, options_); + return options_; + }; + + Language.call(fakeContext, options); + assert(normalizeArgumentsCalled); + + fakeUtil.normalizeArguments = normalizeArguments; + }); + + it('should inherit from GrpcService', function() { + assert(language instanceof FakeGrpcService); + + var calledWith = language.calledWith_[0]; + + assert.deepEqual(calledWith, { + baseUrl: 'language.googleapis.com', + service: 'language', + apiVersion: 'v1beta1', + protoServices: { + LanguageService: { + path: googleProtoFiles.language.v1beta1, + service: 'cloud.language' + } + }, + scopes: [ + 'https://www.googleapis.com/auth/cloud-platform' + ], + userAgent: PKG.name + '/' + PKG.version + }); + }); + }); + + describe('annotate', function() { + var CONTENT = '...'; + var OPTIONS = { + property: 'value' + }; + + var EXPECTED_OPTIONS = { + withCustomOptions: extend({}, OPTIONS, { + content: CONTENT + }), + + withoutCustomOptions: extend({}, { + content: CONTENT + }) + }; + + it('should call annotate on a Document', function(done) { + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); + + return { + annotate: function(options, callback) { + assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); + callback(); // done() + } + }; + }; + + language.annotate(CONTENT, OPTIONS, done); + }); + + it('should not require options', function(done) { + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); + + return { + annotate: function(options, callback) { + assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); + callback(); // done() + } + }; + }; + + language.annotate(CONTENT, done); + }); + }); + + describe('detectEntities', function() { + var CONTENT = '...'; + var OPTIONS = { + property: 'value' + }; + + var EXPECTED_OPTIONS = { + withCustomOptions: extend({}, OPTIONS, { + content: CONTENT + }), + + withoutCustomOptions: extend({}, { + content: CONTENT + }) + }; + + it('should call detectEntities on a Document', function(done) { + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); + + return { + detectEntities: function(options, callback) { + assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); + callback(); // done() + } + }; + }; + + language.detectEntities(CONTENT, OPTIONS, done); + }); + + it('should not require options', function(done) { + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); + + return { + detectEntities: function(options, callback) { + assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); + callback(); // done() + } + }; + }; + + language.detectEntities(CONTENT, done); + }); + }); + + describe('detectSentiment', function() { + var CONTENT = '...'; + var OPTIONS = { + property: 'value' + }; + + var EXPECTED_OPTIONS = { + withCustomOptions: extend({}, OPTIONS, { + content: CONTENT + }), + + withoutCustomOptions: extend({}, { + content: CONTENT + }) + }; + + it('should call detectSentiment on a Document', function(done) { + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); + + return { + detectSentiment: function(options, callback) { + assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); + callback(); // done() + } + }; + }; + + language.detectSentiment(CONTENT, OPTIONS, done); + }); + + it('should not require options', function(done) { + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); + + return { + detectSentiment: function(options, callback) { + assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); + callback(); // done() + } + }; + }; + + language.detectSentiment(CONTENT, done); + }); + }); + + describe('document', function() { + var CONFIG = {}; + + it('should create a Document', function() { + var document = language.document(CONFIG); + + assert.strictEqual(document.calledWith_[0], language); + assert.strictEqual(document.calledWith_[1], CONFIG); + }); + }); + + describe('html', function() { + var CONTENT = '...'; + var OPTIONS = { + property: 'value' + }; + + var EXPECTED_OPTIONS = extend({}, OPTIONS, { + type: 'HTML', + content: CONTENT + }); + + it('should create a Document', function() { + var document = {}; + + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS); + return document; + }; + + assert.strictEqual(language.html(CONTENT, OPTIONS), document); + }); + }); + + describe('text', function() { + var CONTENT = '...'; + var OPTIONS = { + property: 'value' + }; + + var EXPECTED_OPTIONS = extend({}, OPTIONS, { + type: 'PLAIN_TEXT', + content: CONTENT + }); + + it('should create a Document', function() { + var document = {}; + + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS); + return document; + }; + + assert.strictEqual(language.text(CONTENT, OPTIONS), document); + }); + }); +}); From 5102f71997dbea0f05a57942f5430239fd8d2432 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 11 Aug 2016 15:03:40 -0400 Subject: [PATCH 005/488] docs: individual package support (#1479) docs: refactor doc scripts for modularization --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 4bc72b4e34d..1fba4ae22d4 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -66,7 +66,7 @@ "proxyquire": "^1.7.10" }, "scripts": { - "publish": "../../scripts/publish.sh", + "publish": "../../scripts/publish.js language", "test": "mocha test/*.js", "system-test": "mocha system-test/*.js --no-timeouts --bail" }, From 0a8a135979c589773fceab9358704cdf1c640726 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 11 Aug 2016 20:32:57 -0400 Subject: [PATCH 006/488] fix publish script (#1480) --- packages/google-cloud-language/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1fba4ae22d4..72c48e5de8c 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.1.0", + "version": "0.1.1", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ @@ -31,7 +31,7 @@ ], "main": "./src/index.js", "files": [ - "./src/*", + "src", "AUTHORS", "CONTRIBUTORS", "COPYING" @@ -66,7 +66,7 @@ "proxyquire": "^1.7.10" }, "scripts": { - "publish": "../../scripts/publish.js language", + "publish-module": "node ../../scripts/publish.js language", "test": "mocha test/*.js", "system-test": "mocha system-test/*.js --no-timeouts --bail" }, From a35e83cf83e147f006f1251760208306e1375bf3 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 11 Aug 2016 20:43:27 -0400 Subject: [PATCH 007/488] add dev dependencies to language API (#1484) --- packages/google-cloud-language/package.json | 4 +++- packages/google-cloud-language/src/index.js | 13 ++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 72c48e5de8c..4cd69790b92 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -63,7 +63,9 @@ }, "devDependencies": { "mocha": "^2.1.0", - "proxyquire": "^1.7.10" + "node-uuid": "^1.4.7", + "proxyquire": "^1.7.10", + "through2": "^2.0.1" }, "scripts": { "publish-module": "node ../../scripts/publish.js language", diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 3aab2b5f3e3..4b1204644a3 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -20,12 +20,11 @@ 'use strict'; +var common = require('@google-cloud/common'); var extend = require('extend'); -var is = require('is'); -var GrpcService = require('@google-cloud/common').GrpcService; var googleProtoFiles = require('google-proto-files'); -var nodeutil = require('util'); -var util = require('@google-cloud/common').util; +var is = require('is'); +var util = require('util'); /** * @type {module:language/document} @@ -70,7 +69,7 @@ var PKG = require('../package.json'); */ function Language(options) { if (!(this instanceof Language)) { - options = util.normalizeArguments(this, options); + options = common.util.normalizeArguments(this, options); return new Language(options); } @@ -90,10 +89,10 @@ function Language(options) { userAgent: PKG.name + '/' + PKG.version }; - GrpcService.call(this, config, options); + common.GrpcService.call(this, config, options); } -nodeutil.inherits(Language, GrpcService); +util.inherits(Language, common.GrpcService); /** * Run an annotation of a block of text. From 73c6a1e3861ae183c3fa87464c55f1144ca3619f Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 15 Aug 2016 08:21:22 -0700 Subject: [PATCH 008/488] docs: generate uniform service overviews (#1475) --- .../google-cloud-language/src/document.js | 6 --- packages/google-cloud-language/src/index.js | 45 ++++++++++--------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index 278941feb50..762e7625b44 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -40,12 +40,6 @@ var prop = require('propprop'); * @alias module:language/document * * @example - * var gcloud = require('google-cloud'); - * - * var language = gcloud.language({ - * projectId: 'grape-spaceship-123' - * }); - * * var textToAnalyze = [ * 'Google is an American multinational technology company specializing in', * 'Internet-related services and products.' diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 4b1204644a3..5c7ee6fbedd 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -35,6 +35,12 @@ var Document = require('./document.js'); var PKG = require('../package.json'); /** + *

+ * **This is a Beta release of Google Cloud Natural Language.** This API is + * not covered by any SLA or deprecation policy and may be subject to + * backward-incompatible changes. + *

+ * * The [Google Cloud Natural Language](https://cloud.google.com/natural-language/docs) * API provides natural language understanding technologies to developers, * including sentiment analysis, entity recognition, and syntax analysis. This @@ -50,22 +56,9 @@ var PKG = require('../package.json'); * @constructor * @alias module:language * - * @classdesc - * The object returned from `gcloud.language` gives you access to the methods - * that will run detections and annotations from your text. - * - * To learn more about Google Cloud Natural Language, see the official - * [Google Cloud Natural Language API Documentation](https://cloud.google.com/natural-language/docs). + * @resource [Google Cloud Natural Language API Documentation]{@link https://cloud.google.com/natural-language/docs} * * @param {object} options - [Configuration object](#/docs). - * - * @example - * var gcloud = require('google-cloud')({ - * keyFilename: '/path/to/keyfile.json', - * projectId: 'grape-spaceship-123' - * }); - * - * var language = gcloud.language(); */ function Language(options) { if (!(this instanceof Language)) { @@ -127,7 +120,9 @@ util.inherits(Language, common.GrpcService); * //- * // Or, provide a reference to a file hosted on Google Cloud Storage. * //- - * var gcs = gcloud.storage(); + * var gcs = require('@google-cloud/storage')({ + * projectId: 'grape-spaceship-123' + * }); * var bucket = gcs.bucket('my-bucket'); * var file = bucket.file('my-file'); * @@ -198,7 +193,9 @@ Language.prototype.annotate = function(content, options, callback) { * //- * // Or, provide a reference to a file hosted on Google Cloud Storage. * //- - * var gcs = gcloud.storage(); + * var gcs = require('@google-cloud/storage')({ + * projectId: 'grape-spaceship-123' + * }); * var bucket = gcs.bucket('my-bucket'); * var file = bucket.file('my-file'); * @@ -269,7 +266,9 @@ Language.prototype.detectEntities = function(content, options, callback) { * //- * // Or, provide a reference to a file hosted on Google Cloud Storage. * //- - * var gcs = gcloud.storage(); + * var gcs = require('@google-cloud/storage')({ + * projectId: 'grape-spaceship-123' + * }); * var bucket = gcs.bucket('my-bucket'); * var file = bucket.file('my-file'); * @@ -331,7 +330,9 @@ Language.prototype.detectSentiment = function(content, options, callback) { * //- * // Or, provide a reference to a file hosted on Google Cloud Storage. * //- - * var gcs = gcloud.storage(); + * var gcs = require('@google-cloud/storage')({ + * projectId: 'grape-spaceship-123' + * }); * var bucket = gcs.bucket('my-bucket'); * var file = bucket.file('my-file'); * @@ -366,7 +367,9 @@ Language.prototype.document = function(config) { * //- * // Or, provide a reference to a file hosted on Google Cloud Storage. * //- - * var gcs = gcloud.storage(); + * var gcs = require('@google-cloud/storage')({ + * projectId: 'grape-spaceship-123' + * }); * var bucket = gcs.bucket('my-bucket'); * var file = bucket.file('my-file.html'); * @@ -406,7 +409,9 @@ Language.prototype.html = function(content, options) { * //- * // Or, provide a reference to a file hosted on Google Cloud Storage. * //- - * var gcs = gcloud.storage(); + * var gcs = require('@google-cloud/storage')({ + * projectId: 'grape-spaceship-123' + * }); * var bucket = gcs.bucket('my-bucket'); * var file = bucket.file('my-file.txt'); * From fe101d7acf99982ef429e56c4316f3d5766211b2 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 23 Aug 2016 14:38:50 -0400 Subject: [PATCH 009/488] gcloud-node -> google-cloud-node (#1521) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 4cd69790b92..d10c8f29d89 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -36,7 +36,7 @@ "CONTRIBUTORS", "COPYING" ], - "repository": "googlecloudplatform/gcloud-node", + "repository": "googlecloudplatform/google-cloud-node", "keywords": [ "google apis client", "google api client", From 8d40033cd4f811ac41b08b1b349563c36f66503b Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Thu, 25 Aug 2016 11:54:24 -0700 Subject: [PATCH 010/488] Introduce Gapic-generated files for language API. (#1476) --- packages/google-cloud-language/package.json | 2 + packages/google-cloud-language/src/index.js | 1 + .../src/v1beta1/index.js | 32 +++ .../src/v1beta1/language_service_api.js | 251 ++++++++++++++++++ .../language_service_client_config.json | 43 +++ 5 files changed, 329 insertions(+) create mode 100644 packages/google-cloud-language/src/v1beta1/index.js create mode 100644 packages/google-cloud-language/src/v1beta1/language_service_api.js create mode 100644 packages/google-cloud-language/src/v1beta1/language_service_client_config.json diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index d10c8f29d89..aa78ba4beb7 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -54,8 +54,10 @@ "dependencies": { "@google-cloud/common": "^0.1.0", "@google-cloud/storage": "^0.1.0", + "arguejs": "^0.2.3", "arrify": "^1.0.1", "extend": "^3.0.0", + "google-gax": "^0.6.0", "google-proto-files": "^0.4.0", "is": "^3.0.1", "propprop": "^0.3.1", diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 5c7ee6fbedd..3eb43b5f9c8 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -434,3 +434,4 @@ Language.prototype.text = function(content, options) { }; module.exports = Language; +module.exports.v1beta1 = require('./v1beta1'); diff --git a/packages/google-cloud-language/src/v1beta1/index.js b/packages/google-cloud-language/src/v1beta1/index.js new file mode 100644 index 00000000000..2a00e520c12 --- /dev/null +++ b/packages/google-cloud-language/src/v1beta1/index.js @@ -0,0 +1,32 @@ +/*! + * Copyright 2016 Google Inc. All Rights Reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; + +var languageServiceApi = require('./language_service_api'); +var extend = require('extend'); +var gax = require('google-gax'); + +function v1beta1(options) { + options = extend({ + scopes: v1beta1.ALL_SCOPES + }, options); + var gaxGrpc = gax.grpc(options); + return languageServiceApi(gaxGrpc); +} + +v1beta1.SERVICE_ADDRESS = languageServiceApi.SERVICE_ADDRESS; +v1beta1.ALL_SCOPES = languageServiceApi.ALL_SCOPES; +module.exports = v1beta1; diff --git a/packages/google-cloud-language/src/v1beta1/language_service_api.js b/packages/google-cloud-language/src/v1beta1/language_service_api.js new file mode 100644 index 00000000000..14069ed8f67 --- /dev/null +++ b/packages/google-cloud-language/src/v1beta1/language_service_api.js @@ -0,0 +1,251 @@ +/* + * Copyright 2016 Google Inc. All rights reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * EDITING INSTRUCTIONS + * This file was generated from the file + * https://github.com/googleapis/googleapis/blob/master/library.proto, + * and updates to that file get reflected here through a refresh process. + * For the short term, the refresh process will only be runnable by Google + * engineers. + * + * The only allowed edits are to method and file documentation. A 3-way + * merge preserves those additions if the generated source changes. + */ +/* TODO: introduce line-wrapping so that it never exceeds the limit. */ +/* jscs: disable maximumLineLength */ +'use strict'; + +var arguejs = require('arguejs'); +var configData = require('./language_service_client_config'); +var extend = require('extend'); +var gax = require('google-gax'); + +var SERVICE_ADDRESS = 'language.googleapis.com'; + +var DEFAULT_SERVICE_PORT = 443; + +var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; + +var DEFAULT_TIMEOUT = 30; + +/** + * The scopes needed to make gRPC calls to all of the methods defined in + * this service. + */ +var ALL_SCOPES = [ + 'https://www.googleapis.com/auth/cloud-platform' +]; + +/** + * Provides text analysis operations such as sentiment analysis and entity + * recognition. + * + * This will be created through a builder function which can be obtained by the module. + * See the following example of how to initialize the module and how to access to the builder. + * + * @example + * var languageV1beta1 = require('@google-cloud/language').v1beta1({ + * // optional auth parameters. + * }); + * var api = languageV1beta1.languageServiceApi(); + * + * @class + * @param {Object=} opts - The optional parameters. + * @param {String=} opts.servicePath + * The domain name of the API remote host. + * @param {number=} opts.port + * The port on which to connect to the remote host. + * @param {grpc.ClientCredentials=} opts.sslCreds + * A ClientCredentials for use with an SSL-enabled channel. + * @param {Object=} opts.clientConfig + * The customized config to build the call settings. See + * {@link gax.constructSettings} for the format. + * @param {number=} opts.timeout + * The default timeout, in seconds, for calls made through this client. + * @param {number=} opts.appName + * The codename of the calling service. + * @param {String=} opts.appVersion + * The version of the calling service. + */ +function LanguageServiceApi(gaxGrpc, grpcClient, opts) { + opts = opts || {}; + var servicePath = opts.servicePath || SERVICE_ADDRESS; + var port = opts.port || DEFAULT_SERVICE_PORT; + var sslCreds = opts.sslCreds || null; + var clientConfig = opts.clientConfig || {}; + var timeout = opts.timeout || DEFAULT_TIMEOUT; + var appName = opts.appName || 'gax'; + var appVersion = opts.appVersion || gax.Version; + + var googleApiClient = [ + appName + '/' + appVersion, + CODE_GEN_NAME_VERSION, + 'nodejs/' + process.version].join(' '); + + var defaults = gaxGrpc.constructSettings( + 'google.cloud.language.v1beta1.LanguageService', + configData, + clientConfig, + timeout, + null, + null, + {'x-goog-api-client': googleApiClient}); + + var stub = gaxGrpc.createStub( + servicePath, + port, + grpcClient.google.cloud.language.v1beta1.LanguageService, + {sslCreds: sslCreds}); + var methods = [ + 'analyzeSentiment', + 'analyzeEntities', + 'annotateText' + ]; + methods.forEach(function(methodName) { + this['_' + methodName] = gax.createApiCall( + stub.then(function(stub) { return stub[methodName].bind(stub); }), + defaults[methodName]); + }.bind(this)); +} + +// Callback types + +/** + * @callback APICallback + * @param {?Error} error - the error object if something goes wrong. + * Null if API succeeds. + * @param {?T} response + * The response object when API succeeds. + * @template T + */ + +/** + * @callback EmptyCallback + * @param {?Error} error - the error object if something goes wrong. + * Null if API succeeds. + */ + +// Service calls + +/** + * Analyzes the sentiment of the provided text. + * + * @param {google.cloud.language.v1beta1.Document} document + * Input document. Currently, `analyzeSentiment` only supports English text + * ({@link Document.language}="EN"). + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {APICallback=} callback + * The function which will be called with the result of the API call. + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * @throws an error if the RPC is aborted. + */ +LanguageServiceApi.prototype.analyzeSentiment = function analyzeSentiment() { + var args = arguejs({ + document: Object, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + document: args.document + }; + return this._analyzeSentiment(req, args.options, args.callback); +}; + +/** + * Finds named entities (currently finds proper names) in the text, + * entity types, salience, mentions for each entity, and other properties. + * + * @param {google.cloud.language.v1beta1.Document} document + * Input document. + * @param {google.cloud.language.v1beta1.EncodingType} encodingType + * The encoding type used by the API to calculate offsets. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {APICallback=} callback + * The function which will be called with the result of the API call. + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * @throws an error if the RPC is aborted. + */ +LanguageServiceApi.prototype.analyzeEntities = function analyzeEntities() { + var args = arguejs({ + document: Object, + encodingType: Number, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + document: args.document, + encoding_type: args.encodingType + }; + return this._analyzeEntities(req, args.options, args.callback); +}; + +/** + * Advanced API that analyzes the document and provides a full set of text + * annotations, including semantic, syntactic, and sentiment information. This + * API is intended for users who are familiar with machine learning and need + * in-depth text features to build upon. + * + * @param {google.cloud.language.v1beta1.Document} document + * Input document. + * @param {google.cloud.language.v1beta1.AnnotateTextRequest.Features} features + * The enabled features. + * @param {google.cloud.language.v1beta1.EncodingType} encodingType + * The encoding type used by the API to calculate offsets. + * @param {gax.CallOptions=} options + * Overrides the default settings for this call, e.g, timeout, + * retries, etc. + * @param {APICallback=} callback + * The function which will be called with the result of the API call. + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * @throws an error if the RPC is aborted. + */ +LanguageServiceApi.prototype.annotateText = function annotateText() { + var args = arguejs({ + document: Object, + features: Object, + encodingType: Number, + options: [gax.CallOptions], + callback: [Function] + }, arguments); + var req = { + document: args.document, + features: args.features, + encoding_type: args.encodingType + }; + return this._annotateText(req, args.options, args.callback); +}; + +module.exports = function build(gaxGrpc) { + var grpcClient = gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/cloud/language/v1beta1/language_service.proto' + }]); + var built = grpcClient.google.cloud.language.v1beta1; + + built.languageServiceApi = function(opts) { + return new LanguageServiceApi(gaxGrpc, grpcClient, opts); + }; + extend(built.languageServiceApi, LanguageServiceApi); + return built; +}; +module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1beta1/language_service_client_config.json b/packages/google-cloud-language/src/v1beta1/language_service_client_config.json new file mode 100644 index 00000000000..6ac3a7004ff --- /dev/null +++ b/packages/google-cloud-language/src/v1beta1/language_service_client_config.json @@ -0,0 +1,43 @@ +{ + "interfaces": { + "google.cloud.language.v1beta1.LanguageService": { + "retry_codes": { + "retry_codes_def": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + } + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "AnalyzeSentiment": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "AnalyzeEntities": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "AnnotateText": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} From e0cd0cabe802170479442cc5a4e07837892b58bb Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 26 Aug 2016 13:25:29 -0400 Subject: [PATCH 011/488] add readmes for all packages (#1495) * add bigquery readme * add all readmes * copy readme as part of release script * gcloud-node -> google-cloud-node * fix youre good to gos * add resource manager scope * exclude unecessary files --- packages/google-cloud-language/README.md | 123 +++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 packages/google-cloud-language/README.md diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md new file mode 100644 index 00000000000..bea30e2e030 --- /dev/null +++ b/packages/google-cloud-language/README.md @@ -0,0 +1,123 @@ +# @google-cloud/language +> Google Cloud Natural Language Client Library for Node.js + +> **This is a Beta release of Google Cloud Natural Language.** This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes. + +*Looking for more Google APIs than just Natural Language? You might want to check out [`google-cloud`][google-cloud].* + +- [API Documentation][gcloud-language-docs] +- [Official Documentation][cloud-language-docs] + + +```sh +$ npm install --save @google-cloud/language +``` +```js +var language = require('@google-cloud/language')({ + projectId: 'grape-spaceship-123', + keyFilename: '/path/to/keyfile.json' +}); + +var language = language({ + projectId: 'grape-spaceship-123', + keyFilename: '/path/to/keyfile.json' +}); + +// Get the entities from a sentence. +language.detectEntities('Stephen of Michigan!', function(err, entities) { + // entities = { + // people: ['Stephen'], + // places: ['Michigan'] + // } +}); + +// Create a document if you plan to run multiple detections. +var document = language.document('Contributions welcome!'); + +// Analyze the sentiment of the document. +document.detectSentiment(function(err, sentiment) { + // sentiment = 100 // Large numbers represent more positive sentiments. +}); + +// Parse the syntax of the document. +document.annotate(function(err, annotations) { + // annotations = { + // language: 'en', + // sentiment: 100, + // entities: {}, + // sentences: ['Contributions welcome!'], + // tokens: [ + // { + // text: 'Contributions', + // partOfSpeech: 'Noun (common and proper)', + // partOfSpeechTag: 'NOUN' + // }, + // { + // text: 'welcome', + // partOfSpeech: 'Verb (all tenses and modes)', + // partOfSpeechTag: 'VERB' + // }, + // { + // text: '!', + // partOfSpeech: 'Punctuation', + // partOfSpeechTag: 'PUNCT' + // } + // ] + // } +}); +``` + + +## Authentication + +It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Google Cloud services. + +### On Google Compute Engine + +If you are running this client on Google Compute Engine, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access. + +``` js +// Authenticating on a global basis. +var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' + +var language = require('@google-cloud/language')({ + projectId: projectId +}); + +// ...you're good to go! +``` + +### Elsewhere + +If you are not running this client on Google Compute Engine, you need a Google Developers service account. To create a service account: + +1. Visit the [Google Developers Console][dev-console]. +2. Create a new project or click on an existing project. +3. Navigate to **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services): + * Google Cloud Natural Language API +4. Navigate to **APIs & auth** > **Credentials** and then: + * If you want to use a new service account, click on **Create new Client ID** and select **Service account**. After the account is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. + * If you want to generate a new key for an existing service account, click on **Generate new JSON key** and download the JSON key file. + +``` js +var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' + +var language = require('@google-cloud/language')({ + projectId: projectId, + + // The path to your key file: + keyFilename: '/path/to/keyfile.json' + + // Or the contents of the key file: + credentials: require('./path/to/keyfile.json') +}); + +// ...you're good to go! +``` + + +[google-cloud]: https://github.com/GoogleCloudPlatform/google-cloud-node/ +[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using +[dev-console]: https://console.developers.google.com/project +[gcloud-language-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/language +[cloud-language-docs]: https://cloud.google.com/natural-language/docs From ff876338ba1a0ac8887d1184b86de75b989d97da Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 26 Aug 2016 17:47:55 -0400 Subject: [PATCH 012/488] bigquery/language/logging/prediction/vision: decouple packages (#1531) * bigquery/language/logging/prediction/vision: decouple packages * tests: allow more time for docs tests to run * add vision test * resort dependencies like npm does --- packages/google-cloud-language/package.json | 4 +-- .../google-cloud-language/src/document.js | 4 +-- .../google-cloud-language/test/document.js | 33 +++++++++++++++---- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index aa78ba4beb7..910f2d264dc 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,8 +52,7 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.1.0", - "@google-cloud/storage": "^0.1.0", + "@google-cloud/common": "^0.3.0", "arguejs": "^0.2.3", "arrify": "^1.0.1", "extend": "^3.0.0", @@ -64,6 +63,7 @@ "string-format-obj": "^1.0.0" }, "devDependencies": { + "@google-cloud/storage": "*", "mocha": "^2.1.0", "node-uuid": "^1.4.7", "proxyquire": "^1.7.10", diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index 762e7625b44..ca3e685636c 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -21,8 +21,8 @@ 'use strict'; var arrify = require('arrify'); +var common = require('@google-cloud/common'); var extend = require('extend'); -var File = require('@google-cloud/storage').File; var format = require('string-format-obj'); var is = require('is'); var prop = require('propprop'); @@ -76,7 +76,7 @@ function Document(language, config) { this.reqOpts.document.type = 'PLAIN_TEXT'; } - if (content instanceof File) { + if (common.util.isCustomType(content, 'storage/file')) { this.reqOpts.document.gcsContentUri = format('gs://{bucket}/{file}', { bucket: encodeURIComponent(content.bucket.id), file: encodeURIComponent(content.id) diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js index 2801930c4f8..c6d69cc16ce 100644 --- a/packages/google-cloud-language/test/document.js +++ b/packages/google-cloud-language/test/document.js @@ -22,7 +22,16 @@ var prop = require('propprop'); var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; -function FakeFile() {} +var isCustomTypeOverride; +var fakeUtil = extend(true, {}, util, { + isCustomType: function() { + if (isCustomTypeOverride) { + return isCustomTypeOverride.apply(null, arguments); + } + + return false; + } +}); describe('Document', function() { var DocumentCache; @@ -36,8 +45,8 @@ describe('Document', function() { before(function() { Document = proxyquire('../src/document.js', { - '@google-cloud/storage': { - File: FakeFile + '@google-cloud/common': { + util: fakeUtil } }); @@ -45,6 +54,8 @@ describe('Document', function() { }); beforeEach(function() { + isCustomTypeOverride = null; + for (var property in DocumentCache) { if (DocumentCache.hasOwnProperty(property)) { Document[property] = DocumentCache[property]; @@ -123,11 +134,19 @@ describe('Document', function() { }); it('should set the GCS content URI from a File', function() { - var file = new FakeFile(); + var file = { + // Leave spaces in to check that it is URI-encoded: + id: 'file name', + bucket: { + id: 'bucket name' + } + }; - // Leave spaces in to check that it is URI-encoded: - file.bucket = { id: 'bucket id' }; - file.id = 'file name'; + isCustomTypeOverride = function(content, type) { + assert.strictEqual(content, file); + assert.strictEqual(type, 'storage/file'); + return true; + }; var document = new Document(LANGUAGE, { content: file From 3200f947f26f7a0ceb65af60a4fd526d7919e96d Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 26 Aug 2016 16:06:18 -0700 Subject: [PATCH 013/488] Bring Language sample up to standard. --- .../google-cloud-language/samples/README.md | 83 +++++++------------ .../samples/package.json | 4 +- 2 files changed, 33 insertions(+), 54 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 0d662310751..5bb8d32b0fc 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -13,18 +13,15 @@ Learning API. * [Setup](#setup) * [Samples](#samples) - * [analyze.js](#analyze) + * [Analyze](#analyze) ## Setup -1. Please follow the [Set Up Your Project][quickstart] steps in the Quickstart -doc to create a project and enable the Cloud Natural Language API. 1. Read [Prerequisites][prereq] and [How to run a sample][run] first. 1. Install dependencies: npm install -[quickstart]: https://cloud.google.com/natural-language/docs/getting-started#set_up_your_project [prereq]: ../README.md#prerequisities [run]: ../README.md#how-to-run-a-sample @@ -32,54 +29,34 @@ doc to create a project and enable the Cloud Natural Language API. ### Analyze -View the [source code][analyze_code]. - -__Run the sample:__ - -Usage: `node analyze ` - -For example, the following command returns all entities found in the text: - -Example: - - node analyze entities "President Obama is speaking at the White House." - - { - "entities": [ - { - "name": "Obama", - "type": "PERSON", - "metadata": { - "wikipedia_url": "http://en.wikipedia.org/wiki/Barack_Obama" - }, - "salience": 0.84503114, - "mentions": [ - { - "text": { - "content": "Obama", - "beginOffset": 10 - } - } - ] - }, - { - "name": "White House", - "type": "LOCATION", - "metadata": { - "wikipedia_url": "http://en.wikipedia.org/wiki/White_House" - }, - "salience": 0.15496887, - "mentions": [ - { - "text": { - "content": "White House", - "beginOffset": 35 - } - } - ] - } - ], - "language": "en" - } +View the [documentation][analyze_docs] or the [source code][analyze_code]. +__Usage:__ `node analyze --help` + +``` +Commands: + sentiment Detect the sentiment of a block of text. + sentimentFromFile Detect the sentiment of text in a GCS file. + entities Detect the entities of a block of text. + entitiesFromFile Detect the entities of text in a GCS file. + syntax Detect the syntax of a block of text. + syntaxFromFile Detect the syntax of a block of text. + +Options: + --language, -l The language of the text. [string] + --type, -t Type of text. [string] [choices: "text", "html"] [default: "text"] + --help Show help [boolean] + +Examples: + node analyze sentiment "President Obama is speaking at the White House." + node analyze sentimentFromFile my-bucket file.txt + node analyze entities "

President Obama is speaking at the White House.

-t html" + node analyze entitiesFromFile my-bucket file.txt + node analyze syntax "President Obama is speaking at the White House." + node analyze syntaxFromFile my-bucket es_file.txt -l es + +For more information, see https://cloud.google.com/natural-language/docs +``` + +[analyze_docs]: https://cloud.google.com/natural-language/docs [analyze_code]: analyze.js diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index ba0b599c625..44e98c8e342 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -9,7 +9,9 @@ "system-test": "mocha -R spec -t 120000 --require intelli-espower-loader ../system-test/_setup.js system-test/*.test.js" }, "dependencies": { - "googleapis": "^12.0.0" + "@google-cloud/language": "^0.1.1", + "@google-cloud/storage": "^0.1.1", + "yargs": "^5.0.0" }, "devDependencies": { "mocha": "^2.5.3" From 423e78d3e1e5157e956ab8d23b10d5eff80aa3a5 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Sat, 27 Aug 2016 17:35:51 -0700 Subject: [PATCH 014/488] Address comments. --- packages/google-cloud-language/samples/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 5bb8d32b0fc..d7a0fddadd8 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -35,24 +35,24 @@ __Usage:__ `node analyze --help` ``` Commands: - sentiment Detect the sentiment of a block of text. + sentimentFromString Detect the sentiment of a block of text. sentimentFromFile Detect the sentiment of text in a GCS file. - entities Detect the entities of a block of text. + entitiesFromString Detect the entities of a block of text. entitiesFromFile Detect the entities of text in a GCS file. - syntax Detect the syntax of a block of text. - syntaxFromFile Detect the syntax of a block of text. + syntaxFromString Detect the syntax of a block of text. + syntaxFromFile Detect the syntax of text in a GCS file. Options: --language, -l The language of the text. [string] - --type, -t Type of text. [string] [choices: "text", "html"] [default: "text"] + --type, -t Type of text [string] [choices: "text", "html"] [default: "text"] --help Show help [boolean] Examples: - node analyze sentiment "President Obama is speaking at the White House." + node analyze sentimentFromString "President Obama is speaking at the White House." node analyze sentimentFromFile my-bucket file.txt - node analyze entities "

President Obama is speaking at the White House.

-t html" + node analyze entitiesFromString "

President Obama is speaking at the White House.

" -t html node analyze entitiesFromFile my-bucket file.txt - node analyze syntax "President Obama is speaking at the White House." + node analyze syntaxFromString "President Obama is speaking at the White House." node analyze syntaxFromFile my-bucket es_file.txt -l es For more information, see https://cloud.google.com/natural-language/docs From efabe4d122a0d72fbd6c44964195eaca462f8e8f Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 30 Aug 2016 11:09:28 -0400 Subject: [PATCH 015/488] language @ 0.1.2 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 910f2d264dc..6ec004a5b4e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.1.1", + "version": "0.1.2", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From 4b4317d2be658d3ec2d8a93765eb394deb1d237c Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 7 Sep 2016 13:00:55 -0400 Subject: [PATCH 016/488] language: update dependencies --- packages/google-cloud-language/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6ec004a5b4e..c6019f08994 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,19 +52,19 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.3.0", + "@google-cloud/common": "^0.4.0", "arguejs": "^0.2.3", "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.6.0", - "google-proto-files": "^0.4.0", + "google-proto-files": "^0.7.0", "is": "^3.0.1", "propprop": "^0.3.1", "string-format-obj": "^1.0.0" }, "devDependencies": { "@google-cloud/storage": "*", - "mocha": "^2.1.0", + "mocha": "^3.0.2", "node-uuid": "^1.4.7", "proxyquire": "^1.7.10", "through2": "^2.0.1" From a60e822a7ab1e7c31971748b2962023c7ddb65ce Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 7 Sep 2016 13:01:21 -0400 Subject: [PATCH 017/488] language @ 0.2.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index c6019f08994..4b847782336 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.1.2", + "version": "0.2.0", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From 75af03a2726654137bd5d40c5b647014e0711b47 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 7 Sep 2016 10:10:49 -0700 Subject: [PATCH 018/488] Speed up build. --- packages/google-cloud-language/samples/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 44e98c8e342..284be2a837e 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -9,11 +9,12 @@ "system-test": "mocha -R spec -t 120000 --require intelli-espower-loader ../system-test/_setup.js system-test/*.test.js" }, "dependencies": { - "@google-cloud/language": "^0.1.1", + "@google-cloud/language": "^0.1.2", "@google-cloud/storage": "^0.1.1", "yargs": "^5.0.0" }, "devDependencies": { - "mocha": "^2.5.3" + "mocha": "^3.0.2", + "node-uuid": "^1.4.7" } } From 7e1f5264e4e64a5752c8444174cd515645800a1d Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 9 Sep 2016 15:19:15 -0400 Subject: [PATCH 019/488] all modules: ensure all User-Agents are set (#1568) --- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/src/index.js | 4 +--- packages/google-cloud-language/test/index.js | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 4b847782336..0b82858c26b 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,7 +52,7 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.4.0", + "@google-cloud/common": "^0.5.0", "arguejs": "^0.2.3", "arrify": "^1.0.1", "extend": "^3.0.0", diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 3eb43b5f9c8..1c8fa896bdd 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -32,8 +32,6 @@ var util = require('util'); */ var Document = require('./document.js'); -var PKG = require('../package.json'); - /** *

* **This is a Beta release of Google Cloud Natural Language.** This API is @@ -79,7 +77,7 @@ function Language(options) { scopes: [ 'https://www.googleapis.com/auth/cloud-platform' ], - userAgent: PKG.name + '/' + PKG.version + packageJson: require('../package.json') }; common.GrpcService.call(this, config, options); diff --git a/packages/google-cloud-language/test/index.js b/packages/google-cloud-language/test/index.js index 13a9af7d227..535a3e1ccd9 100644 --- a/packages/google-cloud-language/test/index.js +++ b/packages/google-cloud-language/test/index.js @@ -22,8 +22,6 @@ var googleProtoFiles = require('google-proto-files'); var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; -var PKG = require('../package.json'); - var fakeUtil = extend(true, {}, util); function FakeDocument() { @@ -98,7 +96,7 @@ describe('Language', function() { scopes: [ 'https://www.googleapis.com/auth/cloud-platform' ], - userAgent: PKG.name + '/' + PKG.version + packageJson: require('../package.json') }); }); }); From 8886469ecdc48f4c95be789ce54821240300edc8 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 26 Sep 2016 09:56:15 -0400 Subject: [PATCH 020/488] language: elaborate docs to show config options (#1622) --- .../google-cloud-language/src/document.js | 29 ++++++++-- packages/google-cloud-language/src/index.js | 54 +++++++++++++++++-- 2 files changed, 75 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index ca3e685636c..e567a45a88a 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -30,7 +30,6 @@ var prop = require('propprop'); /*! Developer Documentation * * @param {module:language} language - The parent Language object. - * @param {object=} config - Configuration object. */ /* * Create a Natural Language Document object. From this object, you will be able @@ -39,6 +38,17 @@ var prop = require('propprop'); * @constructor * @alias module:language/document * + * @param {object|string|module:storage/file} config - Configuration object, the + * inline content of the document, or a Storage File object. + * @param {string|module:storage/file} options.content - If using `config` as an + * object to specify the encoding and/or language of the document, use this + * property to pass the inline content of the document or a Storage File + * object. + * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * @param {string} options.language - The language of the text. + * @return {module:language/document} + * * @example * var textToAnalyze = [ * 'Google is an American multinational technology company specializing in', @@ -46,6 +56,14 @@ var prop = require('propprop'); * ].join(' '); * * var document = language.document(textToAnalyze); + * + * //- + * // Create a Document object with pre-defined configuration, such as its + * // language. + * //- + * var spanishDocument = language.document('¿Dónde está la sede de Google?', { + * language: 'es' + * }); */ function Document(language, config) { var content = config.content || config; @@ -130,7 +148,8 @@ Document.PART_OF_SPEECH = { * * @resource [documents.annotateText API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText} * - * @param {object=} options - Configuration object. + * @param {object=} options - Configuration object. See + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText#request-body). * @param {boolean} options.entities - Detect the entities from this document. * By default, all features (`entities`, `sentiment`, and `syntax`) are * enabled. By overriding any of these values, all defaults are switched to @@ -419,7 +438,8 @@ Document.prototype.annotate = function(options, callback) { * * @resource [documents.analyzeEntities API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeEntities} * - * @param {object=} options - Configuration object. + * @param {object=} options - Configuration object. See + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeEntities#request-body). * @param {boolean} options.verbose - Enable verbose mode for more detailed * results. Default: `false` * @param {function} callback - The callback function. @@ -545,7 +565,8 @@ Document.prototype.detectEntities = function(options, callback) { * * @resource [documents.analyzeSentiment API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSentiment} * - * @param {object=} options - Configuration object. + * @param {object=} options - Configuration object. See + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSentiment#request-body). * @param {boolean} options.verbose - Enable verbose mode for more detailed * results. Default: `false` * @param {function} callback - The callback function. diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 1c8fa896bdd..9f9de43b35a 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -93,11 +93,12 @@ util.inherits(Language, common.GrpcService); * detection, this may be more convenient. However, if you plan to run multiple * detections, it's easier to create a {module:language/document} object. * - * @resource [documents.annotate API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotate} + * @resource [documents.annotate API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText} * * @param {string|module:storage/file} content - Inline content or a Storage * File object. - * @param {object=} options - Configuration object. + * @param {object=} options - Configuration object. See + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText#request-body). * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). * @param {string} options.language - The language of the text. @@ -136,6 +137,16 @@ util.inherits(Language, common.GrpcService); * language.annotate('Hello!', options, callback); * * //- + * // Specify the language the text is written in. + * //- + * var options = { + * language: 'es', + * entities: true + * }; + * + * language.annotate('¿Dónde está la sede de Google?', options, callback); + * + * //- * // Verbose mode may also be enabled for more detailed results. * //- * var options = { @@ -170,7 +181,8 @@ Language.prototype.annotate = function(content, options, callback) { * * @param {string|module:storage/file} content - Inline content or a Storage * File object. - * @param {object=} options - Configuration object. + * @param {object=} options - Configuration object. See + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeEntities#request-body). * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). * @param {string} options.language - The language of the text. @@ -209,6 +221,15 @@ Language.prototype.annotate = function(content, options, callback) { * language.detectEntities('Axel Foley is from Detroit', options, callback); * * //- + * // Specify the language the text is written in. + * //- + * var options = { + * language: 'es' + * }; + * + * language.detectEntities('Axel Foley es de Detroit', options, callback); + * + * //- * // Verbose mode may also be enabled for more detailed results. * //- * var options = { @@ -243,7 +264,8 @@ Language.prototype.detectEntities = function(content, options, callback) { * * @param {string|module:storage/file} content - Inline content or a Storage * File object. - * @param {object=} options - Configuration object. + * @param {object=} options - Configuration object. See + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSentiment#request-body). * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). * @param {string} options.language - The language of the text. @@ -337,6 +359,14 @@ Language.prototype.detectSentiment = function(content, options, callback) { * var document = language.document(file); * * //- + * // Create a Document object with pre-defined configuration, such as its + * // language. + * //- + * var document = language.document('¿Dónde está la sede de Google?', { + * language: 'es' + * }); + * + * //- * // You can now run detections on the document. * // * // See {module:language/document} for a complete list of methods available. @@ -374,6 +404,14 @@ Language.prototype.document = function(config) { * var document = language.html(file); * * //- + * // Create a Document object with pre-defined configuration, such as its + * // language. + * //- + * var document = language.html('<h1>Titulo del documento</h1>', { + * language: 'es' + * }); + * + * //- * // You can now run detections on the document. * // * // See {module:language/document} for a complete list of methods available. @@ -416,6 +454,14 @@ Language.prototype.html = function(content, options) { * var document = language.text(file); * * //- + * // Create a Document object with pre-defined configuration, such as its + * // language. + * //- + * var document = language.text('¿Dónde está la sede de Google?', { + * language: 'es' + * }); + * + * //- * // You can now run detections on the document. * // * // See {module:language/document} for a complete list of methods available. From 2dbae481d62b74bbd9d568733599695197290a78 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 26 Sep 2016 18:35:37 -0400 Subject: [PATCH 021/488] language: update google-proto-files dependency --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 0b82858c26b..8e0aa57f0ad 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -57,7 +57,7 @@ "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.6.0", - "google-proto-files": "^0.7.0", + "google-proto-files": "^0.8.0", "is": "^3.0.1", "propprop": "^0.3.1", "string-format-obj": "^1.0.0" From 787d41519f6e9a5f883f1e84c6d2de4d5b018f22 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 26 Sep 2016 18:55:38 -0400 Subject: [PATCH 022/488] all: update @google-cloud/common dependency --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 8e0aa57f0ad..138e15e623a 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,7 +52,7 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.5.0", + "@google-cloud/common": "^0.6.0", "arguejs": "^0.2.3", "arrify": "^1.0.1", "extend": "^3.0.0", From 50ca3ae1b34c3d8a7c910dc4e216d6e549f1ffdc Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 26 Sep 2016 18:57:36 -0400 Subject: [PATCH 023/488] language @ 0.3.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 138e15e623a..1900078bc79 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.2.0", + "version": "0.3.0", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From 7280a103558c941fa9803c73cdf22e8c52d34c3d Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Wed, 28 Sep 2016 05:06:33 -0700 Subject: [PATCH 024/488] Regenerate the codegen files to sync with the latest version. (#1640) --- packages/google-cloud-language/package.json | 3 +- .../src/v1beta1/language_service_api.js | 280 +++++++++++------- 2 files changed, 172 insertions(+), 111 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1900078bc79..3dc5d2e631d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -53,10 +53,9 @@ ], "dependencies": { "@google-cloud/common": "^0.6.0", - "arguejs": "^0.2.3", "arrify": "^1.0.1", "extend": "^3.0.0", - "google-gax": "^0.6.0", + "google-gax": "^0.7.0", "google-proto-files": "^0.8.0", "is": "^3.0.1", "propprop": "^0.3.1", diff --git a/packages/google-cloud-language/src/v1beta1/language_service_api.js b/packages/google-cloud-language/src/v1beta1/language_service_api.js index 14069ed8f67..2460c773334 100644 --- a/packages/google-cloud-language/src/v1beta1/language_service_api.js +++ b/packages/google-cloud-language/src/v1beta1/language_service_api.js @@ -15,7 +15,7 @@ * * EDITING INSTRUCTIONS * This file was generated from the file - * https://github.com/googleapis/googleapis/blob/master/library.proto, + * https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta1/language_service.proto, * and updates to that file get reflected here through a refresh process. * For the short term, the refresh process will only be runnable by Google * engineers. @@ -27,7 +27,6 @@ /* jscs: disable maximumLineLength */ 'use strict'; -var arguejs = require('arguejs'); var configData = require('./language_service_client_config'); var extend = require('extend'); var gax = require('google-gax'); @@ -38,7 +37,6 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; -var DEFAULT_TIMEOUT = 30; /** * The scopes needed to make gRPC calls to all of the methods defined in @@ -54,147 +52,159 @@ var ALL_SCOPES = [ * * This will be created through a builder function which can be obtained by the module. * See the following example of how to initialize the module and how to access to the builder. + * @see {@link languageServiceApi} * * @example - * var languageV1beta1 = require('@google-cloud/language').v1beta1({ - * // optional auth parameters. - * }); - * var api = languageV1beta1.languageServiceApi(); + * var languageV1beta1 = require('@google-cloud/language').v1beta1({ + * // optional auth parameters. + * }); + * var api = languageV1beta1.languageServiceApi(); * * @class - * @param {Object=} opts - The optional parameters. - * @param {String=} opts.servicePath - * The domain name of the API remote host. - * @param {number=} opts.port - * The port on which to connect to the remote host. - * @param {grpc.ClientCredentials=} opts.sslCreds - * A ClientCredentials for use with an SSL-enabled channel. - * @param {Object=} opts.clientConfig - * The customized config to build the call settings. See - * {@link gax.constructSettings} for the format. - * @param {number=} opts.timeout - * The default timeout, in seconds, for calls made through this client. - * @param {number=} opts.appName - * The codename of the calling service. - * @param {String=} opts.appVersion - * The version of the calling service. */ -function LanguageServiceApi(gaxGrpc, grpcClient, opts) { +function LanguageServiceApi(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; var sslCreds = opts.sslCreds || null; var clientConfig = opts.clientConfig || {}; - var timeout = opts.timeout || DEFAULT_TIMEOUT; var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.Version; + var appVersion = opts.appVersion || gax.version; var googleApiClient = [ appName + '/' + appVersion, CODE_GEN_NAME_VERSION, + 'gax/' + gax.version, 'nodejs/' + process.version].join(' '); var defaults = gaxGrpc.constructSettings( 'google.cloud.language.v1beta1.LanguageService', configData, clientConfig, - timeout, null, null, {'x-goog-api-client': googleApiClient}); - var stub = gaxGrpc.createStub( + var languageServiceStub = gaxGrpc.createStub( servicePath, port, - grpcClient.google.cloud.language.v1beta1.LanguageService, + grpcClients.languageServiceClient.google.cloud.language.v1beta1.LanguageService, {sslCreds: sslCreds}); - var methods = [ + var languageServiceStubMethods = [ 'analyzeSentiment', 'analyzeEntities', 'annotateText' ]; - methods.forEach(function(methodName) { + languageServiceStubMethods.forEach(function(methodName) { this['_' + methodName] = gax.createApiCall( - stub.then(function(stub) { return stub[methodName].bind(stub); }), - defaults[methodName]); + languageServiceStub.then(function(languageServiceStub) { + return languageServiceStub[methodName].bind(languageServiceStub); + }), + defaults[methodName]); }.bind(this)); } -// Callback types - -/** - * @callback APICallback - * @param {?Error} error - the error object if something goes wrong. - * Null if API succeeds. - * @param {?T} response - * The response object when API succeeds. - * @template T - */ - -/** - * @callback EmptyCallback - * @param {?Error} error - the error object if something goes wrong. - * Null if API succeeds. - */ - // Service calls /** * Analyzes the sentiment of the provided text. * - * @param {google.cloud.language.v1beta1.Document} document + * @param {Object} document * Input document. Currently, `analyzeSentiment` only supports English text * ({@link Document.language}="EN"). - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. - * @param {APICallback=} callback + * + * This object should have the same structure as [Document]{@link Document} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse} * @returns {gax.EventEmitter} - the event emitter to handle the call * status. - * @throws an error if the RPC is aborted. + * + * @example + * + * var api = languageV1beta1.languageServiceApi(); + * var document = {}; + * api.analyzeSentiment(document, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); */ -LanguageServiceApi.prototype.analyzeSentiment = function analyzeSentiment() { - var args = arguejs({ - document: Object, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +LanguageServiceApi.prototype.analyzeSentiment = function analyzeSentiment( + document, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - document: args.document + document: document }; - return this._analyzeSentiment(req, args.options, args.callback); + return this._analyzeSentiment(req, options, callback); }; /** * Finds named entities (currently finds proper names) in the text, * entity types, salience, mentions for each entity, and other properties. * - * @param {google.cloud.language.v1beta1.Document} document + * @param {Object} document * Input document. - * @param {google.cloud.language.v1beta1.EncodingType} encodingType + * + * This object should have the same structure as [Document]{@link Document} + * @param {number} encodingType * The encoding type used by the API to calculate offsets. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. - * @param {APICallback=} callback + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse} * @returns {gax.EventEmitter} - the event emitter to handle the call * status. - * @throws an error if the RPC is aborted. + * + * @example + * + * var api = languageV1beta1.languageServiceApi(); + * var document = {}; + * var encodingType = EncodingType.NONE; + * api.analyzeEntities(document, encodingType, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); */ -LanguageServiceApi.prototype.analyzeEntities = function analyzeEntities() { - var args = arguejs({ - document: Object, - encodingType: Number, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +LanguageServiceApi.prototype.analyzeEntities = function analyzeEntities( + document, + encodingType, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - document: args.document, - encoding_type: args.encodingType + document: document, + encodingType: encodingType }; - return this._analyzeEntities(req, args.options, args.callback); + return this._analyzeEntities(req, options, callback); }; /** @@ -203,49 +213,101 @@ LanguageServiceApi.prototype.analyzeEntities = function analyzeEntities() { * API is intended for users who are familiar with machine learning and need * in-depth text features to build upon. * - * @param {google.cloud.language.v1beta1.Document} document + * @param {Object} document * Input document. - * @param {google.cloud.language.v1beta1.AnnotateTextRequest.Features} features + * + * This object should have the same structure as [Document]{@link Document} + * @param {Object} features * The enabled features. - * @param {google.cloud.language.v1beta1.EncodingType} encodingType + * + * This object should have the same structure as [Features]{@link Features} + * @param {number} encodingType * The encoding type used by the API to calculate offsets. - * @param {gax.CallOptions=} options - * Overrides the default settings for this call, e.g, timeout, - * retries, etc. - * @param {APICallback=} callback + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse} * @returns {gax.EventEmitter} - the event emitter to handle the call * status. - * @throws an error if the RPC is aborted. + * + * @example + * + * var api = languageV1beta1.languageServiceApi(); + * var document = {}; + * var features = {}; + * var encodingType = EncodingType.NONE; + * api.annotateText(document, features, encodingType, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); */ -LanguageServiceApi.prototype.annotateText = function annotateText() { - var args = arguejs({ - document: Object, - features: Object, - encodingType: Number, - options: [gax.CallOptions], - callback: [Function] - }, arguments); +LanguageServiceApi.prototype.annotateText = function annotateText( + document, + features, + encodingType, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } var req = { - document: args.document, - features: args.features, - encoding_type: args.encodingType + document: document, + features: features, + encodingType: encodingType }; - return this._annotateText(req, args.options, args.callback); + return this._annotateText(req, options, callback); }; -module.exports = function build(gaxGrpc) { - var grpcClient = gaxGrpc.load([{ +function LanguageServiceApiBuilder(gaxGrpc) { + if (!(this instanceof LanguageServiceApiBuilder)) { + return new LanguageServiceApiBuilder(gaxGrpc); + } + + var languageServiceClient = gaxGrpc.load([{ root: require('google-proto-files')('..'), file: 'google/cloud/language/v1beta1/language_service.proto' }]); - var built = grpcClient.google.cloud.language.v1beta1; + extend(this, languageServiceClient.google.cloud.language.v1beta1); - built.languageServiceApi = function(opts) { - return new LanguageServiceApi(gaxGrpc, grpcClient, opts); + var grpcClients = { + languageServiceClient: languageServiceClient }; - extend(built.languageServiceApi, LanguageServiceApi); - return built; -}; + + /** + * Build a new instance of {@link LanguageServiceApi}. + * + * @param {Object=} opts - The optional parameters. + * @param {String=} opts.servicePath + * The domain name of the API remote host. + * @param {number=} opts.port + * The port on which to connect to the remote host. + * @param {grpc.ClientCredentials=} opts.sslCreds + * A ClientCredentials for use with an SSL-enabled channel. + * @param {Object=} opts.clientConfig + * The customized config to build the call settings. See + * {@link gax.constructSettings} for the format. + * @param {number=} opts.appName + * The codename of the calling service. + * @param {String=} opts.appVersion + * The version of the calling service. + */ + this.languageServiceApi = function(opts) { + return new LanguageServiceApi(gaxGrpc, grpcClients, opts); + }; + extend(this.languageServiceApi, LanguageServiceApi); +} +module.exports = LanguageServiceApiBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file From ac7a93f88b10395e8290eae48b7ce9e7e5a3bdc0 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 3 Oct 2016 10:59:18 -0400 Subject: [PATCH 025/488] language: use gax (#1645) --- packages/google-cloud-language/package.json | 4 +- .../google-cloud-language/src/document.js | 55 ++--- packages/google-cloud-language/src/index.js | 25 +- .../google-cloud-language/test/document.js | 229 +++++++++--------- packages/google-cloud-language/test/index.js | 50 ++-- 5 files changed, 162 insertions(+), 201 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 3dc5d2e631d..3016cc471bc 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -56,10 +56,8 @@ "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.7.0", - "google-proto-files": "^0.8.0", "is": "^3.0.1", - "propprop": "^0.3.1", - "string-format-obj": "^1.0.0" + "propprop": "^0.3.1" }, "devDependencies": { "@google-cloud/storage": "*", diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index e567a45a88a..6fd4d48af74 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -68,42 +68,37 @@ var prop = require('propprop'); function Document(language, config) { var content = config.content || config; - // `reqOpts` is the payload passed to each `request()`. This object is used as - // the default for all API requests made with this Document. - this.reqOpts = { - document: {} - }; + this.api = language.api; + + this.document = {}; if (config.encoding) { - var encodingType = config.encoding.toUpperCase().replace(/[ -]/g, ''); - this.reqOpts.encodingType = encodingType; + this.encodingType = config.encoding.toUpperCase().replace(/[ -]/g, ''); } if (config.language) { - this.reqOpts.document.language = config.language; + this.document.language = config.language; } if (config.type) { - this.reqOpts.document.type = config.type.toUpperCase(); + this.document.type = config.type.toUpperCase(); - if (this.reqOpts.document.type === 'TEXT') { - this.reqOpts.document.type = 'PLAIN_TEXT'; + if (this.document.type === 'TEXT') { + this.document.type = 'PLAIN_TEXT'; } } else { // Default to plain text. - this.reqOpts.document.type = 'PLAIN_TEXT'; + this.document.type = 'PLAIN_TEXT'; } if (common.util.isCustomType(content, 'storage/file')) { - this.reqOpts.document.gcsContentUri = format('gs://{bucket}/{file}', { + this.document.gcsContentUri = format('gs://{bucket}/{file}', { bucket: encodeURIComponent(content.bucket.id), file: encodeURIComponent(content.id) }); } else { - this.reqOpts.document.content = content; + this.document.content = content; } - - this.request = language.request.bind(language); } /** @@ -392,16 +387,10 @@ Document.prototype.annotate = function(options, callback) { var verbose = options.verbose === true; - var grpcOpts = { - service: 'LanguageService', - method: 'annotateText' - }; + var doc = this.document; + var encType = this.encodingType; - var reqOpts = extend({ - features: features - }, this.reqOpts); - - this.request(grpcOpts, reqOpts, function(err, resp) { + this.api.Language.annotateText(doc, features, encType, function(err, resp) { if (err) { callback(err, null, resp); return; @@ -542,12 +531,10 @@ Document.prototype.detectEntities = function(options, callback) { var verbose = options.verbose === true; - var grpcOpts = { - service: 'LanguageService', - method: 'analyzeEntities' - }; + var doc = this.document; + var encType = this.encodingType; - this.request(grpcOpts, this.reqOpts, function(err, resp) { + this.api.Language.analyzeEntities(doc, encType, function(err, resp) { if (err) { callback(err, null, resp); return; @@ -610,12 +597,10 @@ Document.prototype.detectSentiment = function(options, callback) { var verbose = options.verbose === true; - var grpcOpts = { - service: 'LanguageService', - method: 'analyzeSentiment' - }; + var doc = this.document; + var encType = this.encodingType; - this.request(grpcOpts, this.reqOpts, function(err, resp) { + this.api.Language.analyzeSentiment(doc, encType, function(err, resp) { if (err) { callback(err, null, resp); return; diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 9f9de43b35a..5d07b9e324e 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -22,9 +22,8 @@ var common = require('@google-cloud/common'); var extend = require('extend'); -var googleProtoFiles = require('google-proto-files'); var is = require('is'); -var util = require('util'); +var v1beta1 = require('./v1beta1'); /** * @type {module:language/document} @@ -64,27 +63,11 @@ function Language(options) { return new Language(options); } - var config = { - baseUrl: 'language.googleapis.com', - service: 'language', - apiVersion: 'v1beta1', - protoServices: { - LanguageService: { - path: googleProtoFiles.language.v1beta1, - service: 'cloud.language' - } - }, - scopes: [ - 'https://www.googleapis.com/auth/cloud-platform' - ], - packageJson: require('../package.json') + this.api = { + Language: v1beta1(options).languageServiceApi(options) }; - - common.GrpcService.call(this, config, options); } -util.inherits(Language, common.GrpcService); - /** * Run an annotation of a block of text. * @@ -478,4 +461,4 @@ Language.prototype.text = function(content, options) { }; module.exports = Language; -module.exports.v1beta1 = require('./v1beta1'); +module.exports.v1beta1 = v1beta1; diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js index c6d69cc16ce..54ad37e451e 100644 --- a/packages/google-cloud-language/test/document.js +++ b/packages/google-cloud-language/test/document.js @@ -39,7 +39,7 @@ describe('Document', function() { var document; var LANGUAGE = { - request: util.noop + api: {} }; var CONFIG = 'inline content'; @@ -66,70 +66,53 @@ describe('Document', function() { }); describe('instantiation', function() { - it('should set the correct reqOpts for inline content', function() { - assert.deepEqual(document.reqOpts, { - document: { - content: CONFIG, - type: 'PLAIN_TEXT' - } + it('should expose the gax API', function() { + assert.strictEqual(document.api, LANGUAGE.api); + }); + + it('should set the correct document for inline content', function() { + assert.deepEqual(document.document, { + content: CONFIG, + type: 'PLAIN_TEXT' }); }); - it('should set the correct reqOpts for content with encoding', function() { + it('should set and uppercase the correct encodingType', function() { var document = new Document(LANGUAGE, { content: CONFIG, encoding: 'utf-8' }); - assert.deepEqual(document.reqOpts, { - document: { - content: CONFIG, - type: 'PLAIN_TEXT' - }, - encodingType: 'UTF8' - }); + assert.strictEqual(document.encodingType, 'UTF8'); }); - it('should set the correct reqOpts for content with language', function() { + it('should set the correct document for content with language', function() { var document = new Document(LANGUAGE, { content: CONFIG, language: 'EN' }); - assert.deepEqual(document.reqOpts, { - document: { - content: CONFIG, - type: 'PLAIN_TEXT', - language: 'EN' - } - }); + assert.strictEqual(document.document.language, 'EN'); }); - it('should set the correct reqOpts for content with type', function() { + it('should set the correct document for content with type', function() { var document = new Document(LANGUAGE, { content: CONFIG, type: 'html' }); - assert.deepEqual(document.reqOpts, { - document: { - content: CONFIG, - type: 'HTML' - } - }); + assert.strictEqual(document.document.type, 'HTML'); }); - it('should set the correct reqOpts for text', function() { + it('should set the correct document for text', function() { var document = new Document(LANGUAGE, { content: CONFIG, type: 'text' }); - assert.deepEqual(document.reqOpts, { - document: { - content: CONFIG, - type: 'PLAIN_TEXT' - } + assert.deepEqual(document.document, { + content: CONFIG, + type: 'PLAIN_TEXT' }); }); @@ -152,29 +135,12 @@ describe('Document', function() { content: file }); - assert.deepEqual(document.reqOpts, { - document: { - gcsContentUri: [ - 'gs://', - encodeURIComponent(file.bucket.id), - '/', - encodeURIComponent(file.id), - ].join(''), - type: 'PLAIN_TEXT' - } - }); - }); - - it('should create a request function', function(done) { - var LanguageInstance = { - request: function() { - assert.strictEqual(this, LanguageInstance); - done(); - } - }; - - var document = new Document(LanguageInstance, CONFIG); - document.request(); + assert.deepEqual(document.document.gcsContentUri, [ + 'gs://', + encodeURIComponent(file.bucket.id), + '/', + encodeURIComponent(file.id), + ].join('')); }); }); @@ -203,38 +169,37 @@ describe('Document', function() { describe('annotate', function() { it('should make the correct API request', function(done) { - document.request = function(grpcOpts, reqOpts) { - assert.deepEqual(grpcOpts, { - service: 'LanguageService', - method: 'annotateText' - }); + document.api.Language = { + annotateText: function(doc, features, encType) { + assert.strictEqual(doc, document.document); + + assert.deepEqual(features, { + extractDocumentSentiment: true, + extractEntities: true, + extractSyntax: true + }); - assert.deepEqual(reqOpts, extend( - { - features: { - extractDocumentSentiment: true, - extractEntities: true, - extractSyntax: true - } - }, - document.reqOpts - )); - - done(); + assert.strictEqual(encType, document.encodingType); + + done(); + } }; + document.encodingType = 'encoding-type'; document.annotate(assert.ifError); }); it('should allow specifying individual features', function(done) { - document.request = function(grpcOpts, reqOpts) { - assert.deepEqual(reqOpts.features, { - extractDocumentSentiment: false, - extractEntities: true, - extractSyntax: true - }); + document.api.Language = { + annotateText: function(doc, features) { + assert.deepEqual(features, { + extractDocumentSentiment: false, + extractEntities: true, + extractSyntax: true + }); - done(); + done(); + } }; document.annotate({ @@ -248,8 +213,10 @@ describe('Document', function() { var error = new Error('Error.'); beforeEach(function() { - document.request = function(grpcOpts, reqOpts, callback) { - callback(error, apiResponse); + document.api.Language = { + annotateText: function(doc, features, encType, callback) { + callback(error, apiResponse); + } }; }); @@ -293,9 +260,9 @@ describe('Document', function() { apiResponses.withSyntax ); - function createRequestWithResponse(apiResponse) { - return function(grpcOpts, reqOpts, callback) { - callback(null, apiResponse, apiResponse); + function createAnnotateTextWithResponse(apiResponse) { + return function(doc, features, encType, callback) { + callback(null, apiResponse); }; } @@ -308,7 +275,10 @@ describe('Document', function() { it('should always return the language', function(done) { var apiResponse = apiResponses.default; - document.request = createRequestWithResponse(apiResponse); + + document.api.Language = { + annotateText: createAnnotateTextWithResponse(apiResponse) + }; document.annotate(function(err, annotation, apiResponse_) { assert.ifError(err); @@ -320,7 +290,10 @@ describe('Document', function() { it('should return syntax when no features are requested', function(done) { var apiResponse = apiResponses.default; - document.request = createRequestWithResponse(apiResponse); + + document.api.Language = { + annotateText: createAnnotateTextWithResponse(apiResponse) + }; var formattedSentences = []; Document.formatSentences_ = function(sentences, verbose) { @@ -347,7 +320,10 @@ describe('Document', function() { it('should return the formatted sentiment if available', function(done) { var apiResponse = apiResponses.withSentiment; - document.request = createRequestWithResponse(apiResponse); + + document.api.Language = { + annotateText: createAnnotateTextWithResponse(apiResponse) + }; var formattedSentiment = {}; Document.formatSentiment_ = function(sentiment, verbose) { @@ -370,7 +346,10 @@ describe('Document', function() { it('should return the formatted entities if available', function(done) { var apiResponse = apiResponses.withEntities; - document.request = createRequestWithResponse(apiResponse); + + document.api.Language = { + annotateText: createAnnotateTextWithResponse(apiResponse) + }; var formattedEntities = []; Document.formatEntities_ = function(entities, verbose) { @@ -393,7 +372,10 @@ describe('Document', function() { it('should not return syntax analyses when not wanted', function(done) { var apiResponse = apiResponses.default; - document.request = createRequestWithResponse(apiResponse); + + document.api.Language = { + annotateText: createAnnotateTextWithResponse(apiResponse) + }; document.annotate({ entities: true, @@ -410,7 +392,10 @@ describe('Document', function() { it('should allow verbose mode', function(done) { var apiResponse = apiResponses.withAll; - document.request = createRequestWithResponse(apiResponse); + + document.api.Language = { + annotateText: createAnnotateTextWithResponse(apiResponse) + }; var numCallsWithCorrectVerbosityArgument = 0; @@ -440,17 +425,15 @@ describe('Document', function() { describe('detectEntities', function() { it('should make the correct API request', function(done) { - document.request = function(grpcOpts, reqOpts) { - assert.deepEqual(grpcOpts, { - service: 'LanguageService', - method: 'analyzeEntities' - }); - - assert.strictEqual(reqOpts, document.reqOpts); - - done(); + document.api.Language = { + analyzeEntities: function(doc, encType) { + assert.strictEqual(doc, document.document); + assert.strictEqual(encType, document.encodingType); + done(); + } }; + document.encodingType = 'encoding-type'; document.detectEntities(assert.ifError); }); @@ -459,8 +442,10 @@ describe('Document', function() { var error = new Error('Error.'); beforeEach(function() { - document.request = function(grpcOpts, reqOpts, callback) { - callback(error, apiResponse); + document.api.Language = { + analyzeEntities: function(doc, encType, callback) { + callback(error, apiResponse); + } }; }); @@ -482,8 +467,10 @@ describe('Document', function() { var originalApiResponse = extend({}, apiResponse); beforeEach(function() { - document.request = function(grpcOpts, reqOpts, callback) { - callback(null, apiResponse); + document.api.Language = { + analyzeEntities: function(doc, encType, callback) { + callback(null, apiResponse); + } }; }); @@ -527,17 +514,15 @@ describe('Document', function() { describe('detectSentiment', function() { it('should make the correct API request', function(done) { - document.request = function(grpcOpts, reqOpts) { - assert.deepEqual(grpcOpts, { - service: 'LanguageService', - method: 'analyzeSentiment' - }); - - assert.strictEqual(reqOpts, document.reqOpts); - - done(); + document.api.Language = { + analyzeSentiment: function(doc, encType) { + assert.strictEqual(doc, document.document); + assert.strictEqual(encType, document.encodingType); + done(); + } }; + document.encodingType = 'encoding-type'; document.detectSentiment(assert.ifError); }); @@ -546,8 +531,10 @@ describe('Document', function() { var error = new Error('Error.'); beforeEach(function() { - document.request = function(grpcOpts, reqOpts, callback) { - callback(error, apiResponse); + document.api.Language = { + analyzeSentiment: function(doc, encType, callback) { + callback(error, apiResponse); + } }; }); @@ -571,8 +558,10 @@ describe('Document', function() { beforeEach(function() { Document.formatSentiment_ = util.noop; - document.request = function(grpcOpts, reqOpts, callback) { - callback(null, apiResponse); + document.api.Language = { + analyzeSentiment: function(doc, encType, callback) { + callback(null, apiResponse); + } }; }); diff --git a/packages/google-cloud-language/test/index.js b/packages/google-cloud-language/test/index.js index 535a3e1ccd9..fa5b3707906 100644 --- a/packages/google-cloud-language/test/index.js +++ b/packages/google-cloud-language/test/index.js @@ -18,7 +18,6 @@ var assert = require('assert'); var extend = require('extend'); -var googleProtoFiles = require('google-proto-files'); var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; @@ -28,8 +27,15 @@ function FakeDocument() { this.calledWith_ = arguments; } -function FakeGrpcService() { - this.calledWith_ = arguments; +var fakeV1Beta1Override; +function fakeV1Beta1() { + if (fakeV1Beta1Override) { + return fakeV1Beta1Override.apply(null, arguments); + } + + return { + languageServiceApi: util.noop + }; } describe('Language', function() { @@ -41,14 +47,15 @@ describe('Language', function() { before(function() { Language = proxyquire('../src/index.js', { '@google-cloud/common': { - util: fakeUtil, - GrpcService: FakeGrpcService + util: fakeUtil }, - './document.js': FakeDocument + './document.js': FakeDocument, + './v1beta1': fakeV1Beta1 }); }); beforeEach(function() { + fakeV1Beta1Override = null; language = new Language(OPTIONS); }); @@ -78,25 +85,24 @@ describe('Language', function() { fakeUtil.normalizeArguments = normalizeArguments; }); - it('should inherit from GrpcService', function() { - assert(language instanceof FakeGrpcService); + it('should create a gax api client', function() { + var expectedLanguageService = {}; - var calledWith = language.calledWith_[0]; + fakeV1Beta1Override = function(options) { + assert.strictEqual(options, OPTIONS); - assert.deepEqual(calledWith, { - baseUrl: 'language.googleapis.com', - service: 'language', - apiVersion: 'v1beta1', - protoServices: { - LanguageService: { - path: googleProtoFiles.language.v1beta1, - service: 'cloud.language' + return { + languageServiceApi: function(options) { + assert.strictEqual(options, OPTIONS); + return expectedLanguageService; } - }, - scopes: [ - 'https://www.googleapis.com/auth/cloud-platform' - ], - packageJson: require('../package.json') + }; + }; + + var language = new Language(OPTIONS); + + assert.deepEqual(language.api, { + Language: expectedLanguageService }); }); }); From 2e6fd2710c049203862ce85e8dd9defd1eb82e2e Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 3 Oct 2016 14:44:10 -0700 Subject: [PATCH 026/488] New quickstarts. (#226) * New quickstarts. * Address comments. --- .../samples/package.json | 3 ++ .../samples/quickstart.js | 43 ++++++++++++++++++ .../samples/test/quickstart.test.js | 44 +++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 packages/google-cloud-language/samples/quickstart.js create mode 100644 packages/google-cloud-language/samples/test/quickstart.test.js diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 284be2a837e..c5ac342fd00 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -16,5 +16,8 @@ "devDependencies": { "mocha": "^3.0.2", "node-uuid": "^1.4.7" + }, + "engines": { + "node": ">=4.3.2" } } diff --git a/packages/google-cloud-language/samples/quickstart.js b/packages/google-cloud-language/samples/quickstart.js new file mode 100644 index 00000000000..ac595aa563b --- /dev/null +++ b/packages/google-cloud-language/samples/quickstart.js @@ -0,0 +1,43 @@ +/** + * Copyright 2016, 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +// [START language_quickstart] +// Imports the Google Cloud client library +const Language = require('@google-cloud/language'); + +// Your Google Cloud Platform project ID +const projectId = 'YOUR_PROJECT_ID'; + +// Instantiates a client +const languageClient = Language({ + projectId: projectId +}); + +// The text to analyze +const text = 'Hello, world!'; + +// Detects the sentiment of the text +languageClient.detectSentiment(text, { verbose: true }, (err, sentiment) => { + if (err) { + console.error(err); + return; + } + + console.log('Text: %s', text); + console.log('Sentiment: %j', sentiment); +}); +// [END language_quickstart] diff --git a/packages/google-cloud-language/samples/test/quickstart.test.js b/packages/google-cloud-language/samples/test/quickstart.test.js new file mode 100644 index 00000000000..df0519c73c0 --- /dev/null +++ b/packages/google-cloud-language/samples/test/quickstart.test.js @@ -0,0 +1,44 @@ +/** + * Copyright 2016, 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +const proxyquire = require(`proxyquire`).noCallThru(); + +describe(`language:quickstart`, () => { + let languageMock, LanguageMock; + const error = new Error(`error`); + const text = 'Hello, world!'; + + before(() => { + languageMock = { + detectSentiment: sinon.stub().yields(error) + }; + LanguageMock = sinon.stub().returns(languageMock); + }); + + it(`should handle error`, () => { + proxyquire(`../quickstart`, { + '@google-cloud/language': LanguageMock + }); + + assert.equal(LanguageMock.calledOnce, true); + assert.deepEqual(LanguageMock.firstCall.args, [{ projectId: 'YOUR_PROJECT_ID' }]); + assert.equal(languageMock.detectSentiment.calledOnce, true); + assert.deepEqual(languageMock.detectSentiment.firstCall.args.slice(0, -1), [text, { verbose: true }]); + assert.equal(console.error.calledOnce, true); + assert.deepEqual(console.error.firstCall.args, [error]); + }); +}); From 75beffc8e63ca8bb8478336d9aa261c5f76ab02d Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Mon, 17 Oct 2016 18:58:10 -0400 Subject: [PATCH 027/488] language: add promise support (#1706) --- packages/google-cloud-language/README.md | 15 ++++++--- packages/google-cloud-language/package.json | 3 +- .../google-cloud-language/src/document.js | 31 +++++++++++++++++ packages/google-cloud-language/src/index.js | 33 +++++++++++++++++++ .../system-test/language.js | 2 +- .../google-cloud-language/test/document.js | 10 ++++++ packages/google-cloud-language/test/index.js | 16 ++++++++- 7 files changed, 102 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index bea30e2e030..90b6763ebda 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -18,11 +18,6 @@ var language = require('@google-cloud/language')({ keyFilename: '/path/to/keyfile.json' }); -var language = language({ - projectId: 'grape-spaceship-123', - keyFilename: '/path/to/keyfile.json' -}); - // Get the entities from a sentence. language.detectEntities('Stephen of Michigan!', function(err, entities) { // entities = { @@ -65,6 +60,16 @@ document.annotate(function(err, annotations) { // ] // } }); + +// Promises are also supported by omitting callbacks. +document.annotate().then(function(data) { + var annotations = data[0]; +}); + +// It's also possible to integrate with third-party Promise libraries. +var language = require('@google-cloud/language')({ + promise: require('bluebird') +}); ``` diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 3016cc471bc..e860e9c246e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,10 +52,11 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.6.0", + "@google-cloud/common": "^0.7.0", "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.7.0", + "google-proto-files": "^0.8.3", "is": "^3.0.1", "propprop": "^0.3.1" }, diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index 6fd4d48af74..d06c4178474 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -354,6 +354,14 @@ Document.PART_OF_SPEECH = { * // ] * // } * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * document.annotate().then(function(data) { + * var annotation = data[0]; + * var apiResponse = data[1]; + * }); */ Document.prototype.annotate = function(options, callback) { if (is.fn(options)) { @@ -522,6 +530,14 @@ Document.prototype.annotate = function(options, callback) { * // ] * // } * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * document.detectEntities().then(function(data) { + * var entities = data[0]; + * var apiResponse = data[1]; + * }); */ Document.prototype.detectEntities = function(options, callback) { if (is.fn(options)) { @@ -588,6 +604,14 @@ Document.prototype.detectEntities = function(options, callback) { * // magnitude: 40 * // } * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * document.detectSentiment().then(function(data) { + * var sentiment = data[0]; + * var apiResponse = data[1]; + * }); */ Document.prototype.detectSentiment = function(options, callback) { if (is.fn(options)) { @@ -754,5 +778,12 @@ Document.sortByProperty_ = function(propertyName) { }; }; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +common.util.promisifyAll(Document); + module.exports = Document; diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 5d07b9e324e..07c92e80c05 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -137,6 +137,14 @@ function Language(options) { * }; * * language.annotate('Hello!', options, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * language.annotate('Hello!').then(function(data) { + * var entities = data[0]; + * var apiResponse = data[1]; + * }); */ Language.prototype.annotate = function(content, options, callback) { if (is.fn(options)) { @@ -220,6 +228,14 @@ Language.prototype.annotate = function(content, options, callback) { * }; * * language.detectEntities('Axel Foley is from Detroit', options, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * language.detectEntities('Axel Foley is from Detroit').then(function(data) { + * var entities = data[0]; + * var apiResponse = data[1]; + * }); */ Language.prototype.detectEntities = function(content, options, callback) { if (is.fn(options)) { @@ -294,6 +310,14 @@ Language.prototype.detectEntities = function(content, options, callback) { * }; * * language.detectSentiment('Hello!', options, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * language.detectSentiment('Hello!').then(function(data) { + * var sentiment = data[0]; + * var apiResponse = data[1]; + * }); */ Language.prototype.detectSentiment = function(content, options, callback) { if (is.fn(options)) { @@ -460,5 +484,14 @@ Language.prototype.text = function(content, options) { return this.document(options); }; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +common.util.promisifyAll(Language, { + exclude: ['document', 'html', 'text'] +}); + module.exports = Language; module.exports.v1beta1 = v1beta1; diff --git a/packages/google-cloud-language/system-test/language.js b/packages/google-cloud-language/system-test/language.js index 969763ae63c..d114e0223cc 100644 --- a/packages/google-cloud-language/system-test/language.js +++ b/packages/google-cloud-language/system-test/language.js @@ -56,7 +56,7 @@ describe('Language', function() { }); after(function(done) { - GCS.getBuckets({ prefix: TESTS_PREFIX }) + GCS.getBucketsStream({ prefix: TESTS_PREFIX }) .on('error', done) .pipe(through.obj(function(bucket, _, next) { bucket.deleteFiles({ force: true }, function(err) { diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js index 54ad37e451e..296cd0ce057 100644 --- a/packages/google-cloud-language/test/document.js +++ b/packages/google-cloud-language/test/document.js @@ -23,6 +23,7 @@ var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; var isCustomTypeOverride; +var promisified = false; var fakeUtil = extend(true, {}, util, { isCustomType: function() { if (isCustomTypeOverride) { @@ -30,6 +31,11 @@ var fakeUtil = extend(true, {}, util, { } return false; + }, + promisifyAll: function(Class) { + if (Class.name === 'Document') { + promisified = true; + } } }); @@ -70,6 +76,10 @@ describe('Document', function() { assert.strictEqual(document.api, LANGUAGE.api); }); + it('should promisify all the things', function() { + assert(promisified); + }); + it('should set the correct document for inline content', function() { assert.deepEqual(document.document, { content: CONFIG, diff --git a/packages/google-cloud-language/test/index.js b/packages/google-cloud-language/test/index.js index fa5b3707906..1e4a5c9baee 100644 --- a/packages/google-cloud-language/test/index.js +++ b/packages/google-cloud-language/test/index.js @@ -21,7 +21,17 @@ var extend = require('extend'); var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; -var fakeUtil = extend(true, {}, util); +var promisified = false; +var fakeUtil = extend({}, util, { + promisifyAll: function(Class, options) { + if (Class.name !== 'Language') { + return; + } + + promisified = true; + assert.deepEqual(options.exclude, ['document', 'html', 'text']); + } +}); function FakeDocument() { this.calledWith_ = arguments; @@ -60,6 +70,10 @@ describe('Language', function() { }); describe('instantiation', function() { + it('should promisify all the things', function() { + assert(promisified); + }); + it('should normalize the arguments', function() { var options = { projectId: 'project-id', From f4958fcae4ea48d5f7d0c793f2ba74a17738b242 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 17 Oct 2016 19:00:12 -0400 Subject: [PATCH 028/488] language @ 0.4.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index e860e9c246e..1f950607a61 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.3.0", + "version": "0.4.0", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From 632a1d0a2fdd013eeb5cd790f5dc11edbbe705fb Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 20 Oct 2016 19:32:03 -0400 Subject: [PATCH 029/488] language: upgrade generated layer (#1723) --- packages/google-cloud-language/package.json | 2 +- .../google-cloud-language/src/document.js | 25 ++--- .../src/v1beta1/language_service_api.js | 99 ++++++++----------- .../google-cloud-language/test/document.js | 36 +++---- 4 files changed, 74 insertions(+), 88 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1f950607a61..dbd4644dfa9 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -55,7 +55,7 @@ "@google-cloud/common": "^0.7.0", "arrify": "^1.0.1", "extend": "^3.0.0", - "google-gax": "^0.7.0", + "google-gax": "^0.8.0", "google-proto-files": "^0.8.3", "is": "^3.0.1", "propprop": "^0.3.1" diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index d06c4178474..c97e2c4b922 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -395,10 +395,11 @@ Document.prototype.annotate = function(options, callback) { var verbose = options.verbose === true; - var doc = this.document; - var encType = this.encodingType; - - this.api.Language.annotateText(doc, features, encType, function(err, resp) { + this.api.Language.annotateText({ + document: this.document, + features: features, + encodingType: this.encodingType + }, function(err, resp) { if (err) { callback(err, null, resp); return; @@ -547,10 +548,10 @@ Document.prototype.detectEntities = function(options, callback) { var verbose = options.verbose === true; - var doc = this.document; - var encType = this.encodingType; - - this.api.Language.analyzeEntities(doc, encType, function(err, resp) { + this.api.Language.analyzeEntities({ + document: this.document, + encodingType: this.encodingType + }, function(err, resp) { if (err) { callback(err, null, resp); return; @@ -621,10 +622,10 @@ Document.prototype.detectSentiment = function(options, callback) { var verbose = options.verbose === true; - var doc = this.document; - var encType = this.encodingType; - - this.api.Language.analyzeSentiment(doc, encType, function(err, resp) { + this.api.Language.analyzeSentiment({ + document: this.document, + encodingType: this.encodingType + }, function(err, resp) { if (err) { callback(err, null, resp); return; diff --git a/packages/google-cloud-language/src/v1beta1/language_service_api.js b/packages/google-cloud-language/src/v1beta1/language_service_api.js index 2460c773334..26182642f7f 100644 --- a/packages/google-cloud-language/src/v1beta1/language_service_api.js +++ b/packages/google-cloud-language/src/v1beta1/language_service_api.js @@ -109,7 +109,9 @@ function LanguageServiceApi(gaxGrpc, grpcClients, opts) { /** * Analyzes the sentiment of the provided text. * - * @param {Object} document + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document * Input document. Currently, `analyzeSentiment` only supports English text * ({@link Document.language}="EN"). * @@ -121,25 +123,20 @@ function LanguageServiceApi(gaxGrpc, grpcClients, opts) { * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = languageV1beta1.languageServiceApi(); * var document = {}; - * api.analyzeSentiment(document, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * api.analyzeSentiment({document: document}).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -LanguageServiceApi.prototype.analyzeSentiment = function analyzeSentiment( - document, - options, - callback) { +LanguageServiceApi.prototype.analyzeSentiment = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -147,21 +144,20 @@ LanguageServiceApi.prototype.analyzeSentiment = function analyzeSentiment( if (options === undefined) { options = {}; } - var req = { - document: document - }; - return this._analyzeSentiment(req, options, callback); + return this._analyzeSentiment(request, options, callback); }; /** * Finds named entities (currently finds proper names) in the text, * entity types, salience, mentions for each entity, and other properties. * - * @param {Object} document + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document * Input document. * * This object should have the same structure as [Document]{@link Document} - * @param {number} encodingType + * @param {number} request.encodingType * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link EncodingType} @@ -172,27 +168,25 @@ LanguageServiceApi.prototype.analyzeSentiment = function analyzeSentiment( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * * var api = languageV1beta1.languageServiceApi(); * var document = {}; * var encodingType = EncodingType.NONE; - * api.analyzeEntities(document, encodingType, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * var request = { + * document: document, + * encodingType: encodingType + * }; + * api.analyzeEntities(request).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -LanguageServiceApi.prototype.analyzeEntities = function analyzeEntities( - document, - encodingType, - options, - callback) { +LanguageServiceApi.prototype.analyzeEntities = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -200,11 +194,7 @@ LanguageServiceApi.prototype.analyzeEntities = function analyzeEntities( if (options === undefined) { options = {}; } - var req = { - document: document, - encodingType: encodingType - }; - return this._analyzeEntities(req, options, callback); + return this._analyzeEntities(request, options, callback); }; /** @@ -213,15 +203,17 @@ LanguageServiceApi.prototype.analyzeEntities = function analyzeEntities( * API is intended for users who are familiar with machine learning and need * in-depth text features to build upon. * - * @param {Object} document + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document * Input document. * * This object should have the same structure as [Document]{@link Document} - * @param {Object} features + * @param {Object} request.features * The enabled features. * * This object should have the same structure as [Features]{@link Features} - * @param {number} encodingType + * @param {number} request.encodingType * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link EncodingType} @@ -232,8 +224,8 @@ LanguageServiceApi.prototype.analyzeEntities = function analyzeEntities( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse} - * @returns {gax.EventEmitter} - the event emitter to handle the call - * status. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * @@ -241,20 +233,18 @@ LanguageServiceApi.prototype.analyzeEntities = function analyzeEntities( * var document = {}; * var features = {}; * var encodingType = EncodingType.NONE; - * api.annotateText(document, features, encodingType, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * var request = { + * document: document, + * features: features, + * encodingType: encodingType + * }; + * api.annotateText(request).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -LanguageServiceApi.prototype.annotateText = function annotateText( - document, - features, - encodingType, - options, - callback) { +LanguageServiceApi.prototype.annotateText = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -262,12 +252,7 @@ LanguageServiceApi.prototype.annotateText = function annotateText( if (options === undefined) { options = {}; } - var req = { - document: document, - features: features, - encodingType: encodingType - }; - return this._annotateText(req, options, callback); + return this._annotateText(request, options, callback); }; function LanguageServiceApiBuilder(gaxGrpc) { diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js index 296cd0ce057..9c74bb5c45a 100644 --- a/packages/google-cloud-language/test/document.js +++ b/packages/google-cloud-language/test/document.js @@ -180,16 +180,16 @@ describe('Document', function() { describe('annotate', function() { it('should make the correct API request', function(done) { document.api.Language = { - annotateText: function(doc, features, encType) { - assert.strictEqual(doc, document.document); + annotateText: function(reqOpts) { + assert.strictEqual(reqOpts.document, document.document); - assert.deepEqual(features, { + assert.deepEqual(reqOpts.features, { extractDocumentSentiment: true, extractEntities: true, extractSyntax: true }); - assert.strictEqual(encType, document.encodingType); + assert.strictEqual(reqOpts.encodingType, document.encodingType); done(); } @@ -201,8 +201,8 @@ describe('Document', function() { it('should allow specifying individual features', function(done) { document.api.Language = { - annotateText: function(doc, features) { - assert.deepEqual(features, { + annotateText: function(reqOpts) { + assert.deepEqual(reqOpts.features, { extractDocumentSentiment: false, extractEntities: true, extractSyntax: true @@ -224,7 +224,7 @@ describe('Document', function() { beforeEach(function() { document.api.Language = { - annotateText: function(doc, features, encType, callback) { + annotateText: function(options, callback) { callback(error, apiResponse); } }; @@ -271,7 +271,7 @@ describe('Document', function() { ); function createAnnotateTextWithResponse(apiResponse) { - return function(doc, features, encType, callback) { + return function(reqOpts, callback) { callback(null, apiResponse); }; } @@ -436,9 +436,9 @@ describe('Document', function() { describe('detectEntities', function() { it('should make the correct API request', function(done) { document.api.Language = { - analyzeEntities: function(doc, encType) { - assert.strictEqual(doc, document.document); - assert.strictEqual(encType, document.encodingType); + analyzeEntities: function(reqOpts) { + assert.strictEqual(reqOpts.document, document.document); + assert.strictEqual(reqOpts.encodingType, document.encodingType); done(); } }; @@ -453,7 +453,7 @@ describe('Document', function() { beforeEach(function() { document.api.Language = { - analyzeEntities: function(doc, encType, callback) { + analyzeEntities: function(reqOpts, callback) { callback(error, apiResponse); } }; @@ -478,7 +478,7 @@ describe('Document', function() { beforeEach(function() { document.api.Language = { - analyzeEntities: function(doc, encType, callback) { + analyzeEntities: function(reqOpts, callback) { callback(null, apiResponse); } }; @@ -525,9 +525,9 @@ describe('Document', function() { describe('detectSentiment', function() { it('should make the correct API request', function(done) { document.api.Language = { - analyzeSentiment: function(doc, encType) { - assert.strictEqual(doc, document.document); - assert.strictEqual(encType, document.encodingType); + analyzeSentiment: function(reqOpts) { + assert.strictEqual(reqOpts.document, document.document); + assert.strictEqual(reqOpts.encodingType, document.encodingType); done(); } }; @@ -542,7 +542,7 @@ describe('Document', function() { beforeEach(function() { document.api.Language = { - analyzeSentiment: function(doc, encType, callback) { + analyzeSentiment: function(reqOpts, callback) { callback(error, apiResponse); } }; @@ -569,7 +569,7 @@ describe('Document', function() { Document.formatSentiment_ = util.noop; document.api.Language = { - analyzeSentiment: function(doc, encType, callback) { + analyzeSentiment: function(reqOpts, callback) { callback(null, apiResponse); } }; From ad1a8409ac54e58f877d500a06ee5723d309a66c Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 21 Oct 2016 16:30:12 -0400 Subject: [PATCH 030/488] language: fix system tests (#1739) --- .../system-test/language.js | 180 +++++++++++------- 1 file changed, 106 insertions(+), 74 deletions(-) diff --git a/packages/google-cloud-language/system-test/language.js b/packages/google-cloud-language/system-test/language.js index d114e0223cc..4e295f8f5d8 100644 --- a/packages/google-cloud-language/system-test/language.js +++ b/packages/google-cloud-language/system-test/language.js @@ -34,7 +34,7 @@ describe('Language', function() { var BUCKET; var TEXT_CONTENT_SENTENCES = [ - 'Hello from stephen and dave!', + 'Hello from stephen and david!', 'If you find yourself in michigan, come say hi!' ]; @@ -313,150 +313,182 @@ describe('Language', function() { function validateAnnotationSimple(callback) { return function(err, annotation, apiResponse) { - assert.ifError(err); + try { + assert.ifError(err); - assert.strictEqual(annotation.language, 'en'); + assert.strictEqual(annotation.language, 'en'); - assert(is.number(annotation.sentiment)); + assert(is.number(annotation.sentiment)); - assert.deepEqual(annotation.entities, { - people: ['stephen', 'dave'], - places: ['michigan'] - }); + assert.deepEqual(annotation.entities, { + people: ['stephen', 'david'], + places: ['michigan'] + }); - assert.deepEqual(annotation.sentences, TEXT_CONTENT_SENTENCES); + assert.deepEqual(annotation.sentences, TEXT_CONTENT_SENTENCES); - assert(is.array(annotation.tokens)); - assert.deepEqual(annotation.tokens[0], { - text: 'Hello', - partOfSpeech: 'Other: foreign words, typos, abbreviations', - partOfSpeechTag: 'X' - }); + assert(is.array(annotation.tokens)); + assert.deepEqual(annotation.tokens[0], { + text: 'Hello', + partOfSpeech: 'Other: foreign words, typos, abbreviations', + partOfSpeechTag: 'X' + }); - assert(is.object(apiResponse)); + assert(is.object(apiResponse)); - callback(); + callback(); + } catch(e) { + callback(e); + } }; } function validateAnnotationVerbose(callback) { return function(err, annotation, apiResponse) { - assert.ifError(err); + try { + assert.ifError(err); - assert.strictEqual(annotation.language, 'en'); + assert.strictEqual(annotation.language, 'en'); - assert(is.object(annotation.sentiment)); + assert(is.object(annotation.sentiment)); - assert(is.array(annotation.entities.people)); - assert.strictEqual(annotation.entities.people.length, 2); - assert(is.object(annotation.entities.people[0])); + assert(is.array(annotation.entities.people)); + assert.strictEqual(annotation.entities.people.length, 2); + assert(is.object(annotation.entities.people[0])); - assert(is.array(annotation.sentences)); - assert(is.object(annotation.sentences[0])); + assert(is.array(annotation.sentences)); + assert(is.object(annotation.sentences[0])); - assert(is.array(annotation.tokens)); - assert(is.object(annotation.tokens[0])); - assert.strictEqual(annotation.tokens[0].text.content, 'Hello'); + assert(is.array(annotation.tokens)); + assert(is.object(annotation.tokens[0])); + assert.strictEqual(annotation.tokens[0].text.content, 'Hello'); - assert(is.object(apiResponse)); + assert(is.object(apiResponse)); - callback(); + callback(); + } catch(e) { + callback(e); + } }; } function validateAnnotationSingleFeatureSimple(callback) { return function(err, annotation, apiResponse) { - assert.ifError(err); + try { + assert.ifError(err); - assert.strictEqual(annotation.language, 'en'); + assert.strictEqual(annotation.language, 'en'); - assert.deepEqual(annotation.entities, { - people: ['stephen', 'dave'], - places: ['michigan'] - }); + assert.deepEqual(annotation.entities, { + people: ['stephen', 'david'], + places: ['michigan'] + }); - assert.strictEqual(annotation.sentences, undefined); - assert.strictEqual(annotation.sentiment, undefined); - assert.strictEqual(annotation.tokens, undefined); + assert.strictEqual(annotation.sentences, undefined); + assert.strictEqual(annotation.sentiment, undefined); + assert.strictEqual(annotation.tokens, undefined); - assert(is.object(apiResponse)); + assert(is.object(apiResponse)); - callback(); + callback(); + } catch(e) { + callback(e); + } }; } function validateAnnotationSingleFeatureVerbose(callback) { return function(err, annotation, apiResponse) { - assert.ifError(err); + try { + assert.ifError(err); - assert.strictEqual(annotation.language, 'en'); + assert.strictEqual(annotation.language, 'en'); - assert(is.array(annotation.entities.people)); - assert.strictEqual(annotation.entities.people.length, 2); - assert(is.object(annotation.entities.people[0])); + assert(is.array(annotation.entities.people)); + assert.strictEqual(annotation.entities.people.length, 2); + assert(is.object(annotation.entities.people[0])); - assert.strictEqual(annotation.sentences, undefined); - assert.strictEqual(annotation.sentiment, undefined); - assert.strictEqual(annotation.tokens, undefined); + assert.strictEqual(annotation.sentences, undefined); + assert.strictEqual(annotation.sentiment, undefined); + assert.strictEqual(annotation.tokens, undefined); - assert(is.object(apiResponse)); + assert(is.object(apiResponse)); - callback(); + callback(); + } catch(e) { + callback(e); + } }; } function validateEntitiesSimple(callback) { return function(err, entities, apiResponse) { - assert.ifError(err); + try { + assert.ifError(err); - assert.deepEqual(entities, { - people: ['stephen', 'dave'], - places: ['michigan'] - }); + assert.deepEqual(entities, { + people: ['stephen', 'david'], + places: ['michigan'] + }); - assert(is.object(apiResponse)); + assert(is.object(apiResponse)); - callback(); + callback(); + } catch(e) { + callback(e); + } }; } function validateEntitiesVerbose(callback) { return function(err, entities, apiResponse) { - assert.ifError(err); + try { + assert.ifError(err); - assert(is.array(entities.people)); - assert.strictEqual(entities.people.length, 2); - assert(is.object(entities.people[0])); + assert(is.array(entities.people)); + assert.strictEqual(entities.people.length, 2); + assert(is.object(entities.people[0])); - assert(is.object(apiResponse)); + assert(is.object(apiResponse)); - callback(); + callback(); + } catch(e) { + callback(e); + } }; } function validateSentimentSimple(callback) { return function(err, sentiment, apiResponse) { - assert.ifError(err); + try { + assert.ifError(err); - assert(is.number(sentiment)); + assert(is.number(sentiment)); - assert(is.object(apiResponse)); + assert(is.object(apiResponse)); - callback(); + callback(); + } catch(e) { + callback(e); + } }; } function validateSentimentVerbose(callback) { return function(err, sentiment, apiResponse) { - assert.ifError(err); + try { + assert.ifError(err); - assert(is.object(sentiment)); - assert(is.number(sentiment.polarity)); - assert(is.number(sentiment.magnitude)); + assert(is.object(sentiment)); + assert(is.number(sentiment.polarity)); + assert(is.number(sentiment.magnitude)); - assert(is.object(apiResponse)); + assert(is.object(apiResponse)); - callback(); + callback(); + } catch(e) { + callback(e); + } }; } }); From ccbab2a2b11df85fe74b044aaca6a43df4056d0d Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 21 Oct 2016 16:51:05 -0400 Subject: [PATCH 031/488] language @ 0.5.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index dbd4644dfa9..0b5cf47529d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.4.0", + "version": "0.5.0", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From a8514555d12b388168518c7f6391901dc6d59854 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Mon, 14 Nov 2016 19:53:57 -0500 Subject: [PATCH 032/488] language: update to v1 (#1783) --- packages/google-cloud-language/package.json | 4 +- .../google-cloud-language/src/document.js | 420 ++++++++++++++++-- packages/google-cloud-language/src/index.js | 131 +++++- .../src/{v1beta1 => v1}/index.js | 10 +- .../{v1beta1 => v1}/language_service_api.js | 94 +++- .../language_service_client_config.json | 7 +- .../system-test/language.js | 106 ++++- .../google-cloud-language/test/document.js | 265 ++++++++++- packages/google-cloud-language/test/index.js | 62 ++- 9 files changed, 992 insertions(+), 107 deletions(-) rename packages/google-cloud-language/src/{v1beta1 => v1}/index.js (81%) rename packages/google-cloud-language/src/{v1beta1 => v1}/language_service_api.js (76%) rename packages/google-cloud-language/src/{v1beta1 => v1}/language_service_client_config.json (84%) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 0b5cf47529d..9737b3fd473 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -55,8 +55,8 @@ "@google-cloud/common": "^0.7.0", "arrify": "^1.0.1", "extend": "^3.0.0", - "google-gax": "^0.8.0", - "google-proto-files": "^0.8.3", + "google-gax": "^0.9.0", + "google-proto-files": "^0.8.5", "is": "^3.0.1", "propprop": "^0.3.1" }, diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index c97e2c4b922..87e35e198f2 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -45,7 +45,7 @@ var prop = require('propprop'); * property to pass the inline content of the document or a Storage File * object. * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @return {module:language/document} * @@ -101,6 +101,92 @@ function Document(language, config) { } } +/** + * Labels that can be used to represent a token. + * + * @private + * @type {object} + */ +Document.LABEL_DESCRIPTIONS = { + UNKNOWN: 'Unknown', + ABBREV: 'Abbreviation modifier', + ACOMP: 'Adjectival complement', + ADVCL: 'Adverbial clause modifier', + ADVMOD: 'Adverbial modifier', + AMOD: 'Adjectival modifier of an NP', + APPOS: 'Appositional modifier of an NP', + ATTR: 'Attribute dependent of a copular verb', + AUX: 'Auxiliary (non-main) verb', + AUXPASS: 'Passive auxiliary', + CC: 'Coordinating conjunction', + CCOMP: 'Clausal complement of a verb or adjective', + CONJ: 'Conjunct', + CSUBJ: 'Clausal subject', + CSUBJPASS: 'Clausal passive subject', + DEP: 'Dependency (unable to determine)', + DET: 'Determiner', + DISCOURSE: 'Discourse', + DOBJ: 'Direct object', + EXPL: 'Expletive', + GOESWITH: ' Goes with (part of a word in a text not well edited)', + IOBJ: 'Indirect object', + MARK: 'Marker (word introducing a subordinate clause)', + MWE: 'Multi-word expression', + MWV: 'Multi-word verbal expression', + NEG: 'Negation modifier', + NN: 'Noun compound modifier', + NPADVMOD: 'Noun phrase used as an adverbial modifier', + NSUBJ: 'Nominal subject', + NSUBJPASS: 'Passive nominal subject', + NUM: 'Numeric modifier of a noun', + NUMBER: 'Element of compound number', + P: 'Punctuation mark', + PARATAXIS: 'Parataxis relation', + PARTMOD: 'Participial modifier', + PCOMP: 'The complement of a preposition is a clause', + POBJ: 'Object of a preposition', + POSS: 'Possession modifier', + POSTNEG: 'Postverbal negative particle', + PRECOMP: 'Predicate complement', + PRECONJ: 'Preconjunt', + PREDET: 'Predeterminer', + PREF: 'Prefix', + PREP: 'Prepositional modifier', + PRONL: 'The relationship between a verb and verbal morpheme', + PRT: 'Particle', + PS: 'Associative or possessive marker', + QUANTMOD: 'Quantifier phrase modifier', + RCMOD: 'Relative clause modifier', + RCMODREL: 'Complementizer in relative clause', + RDROP: 'Ellipsis without a preceding predicate', + REF: 'Referent', + REMNANT: 'Remnant', + REPARANDUM: 'Reparandum', + ROOT: 'Root', + SNUM: 'Suffix specifying a unit of number', + SUFF: 'Suffix', + TMOD: 'Temporal modifier', + TOPIC: 'Topic marker', + VMOD: 'Clause headed by an infinite form of the verb that modifies a noun', + VOCATIVE: 'Vocative', + XCOMP: 'Open clausal complement', + SUFFIX: 'Name suffix', + TITLE: 'Name title', + ADVPHMOD: 'Adverbial phrase modifier', + AUXCAUS: 'Causative auxiliary', + AUXVV: 'Helper auxiliary', + DTMOD: 'Rentaishi (Prenominal modifier)', + FOREIGN: 'Foreign words', + KW: 'Keyword', + LIST: 'List for chains of comparable items', + NOMC: 'Nominalized clause', + NOMCSUBJ: 'Nominalized clausal subject', + NOMCSUBJPASS: 'Nominalized clausal passive', + NUMC: 'Compound of numeric modifier', + COP: 'Copula', + DISLOCATED: 'Dislocated relation (for fronted/topicalized elements)' +}; + /** * The parts of speech that will be recognized by the Natural Language API. * @@ -140,11 +226,12 @@ Document.PART_OF_SPEECH = { * * - {module:language#detectEntities} * - {module:language#detectSentiment} + * - {module:language#detectSyntax} * - * @resource [documents.annotateText API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText} + * @resource [documents.annotateText API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText} * * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText#request-body). + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText#request-body). * @param {boolean} options.entities - Detect the entities from this document. * By default, all features (`entities`, `sentiment`, and `syntax`) are * enabled. By overriding any of these values, all defaults are switched to @@ -196,13 +283,34 @@ Document.PART_OF_SPEECH = { * text. * @param {object[]} callback.annotation.tokens - Parts of speech that were * detected from the text. - * @param {object[]} callback.annotation.tokens.text - The piece of text + * @param {string} callback.annotation.tokens[].text - The piece of text * analyzed. - * @param {object[]} callback.annotation.tokens.partOfSpeech - A description of + * @param {string} callback.annotation.tokens[].partOfSpeech - A description of * the part of speech (`Noun (common and propert)`, * `Verb (all tenses and modes)`, etc.). - * @param {object[]} callback.annotation.tokens.partOfSpeechTag - A short code + * @param {string} callback.annotation.tokens[].tag - A short code * for the type of speech (`NOUN`, `VERB`, etc.). + * @param {string} callback.annotations.tokens[].aspect - The characteristic of + * a verb that expresses time flow during an event. + * @param {string} callback.annotations.tokens[].case - The grammatical function + * performed by a noun or pronoun in a phrase, clause, or sentence. + * @param {string} callback.annotations.tokens[].form - Form categorizes + * different forms of verbs, adjectives, adverbs, etc. + * @param {string} callback.annotations.tokens[].gender - Gender classes of + * nouns reflected in the behaviour of associated words + * @param {string} callback.annotations.tokens[].mood - The grammatical feature + * of verbs, used for showing modality and attitude. + * @param {string} callback.annotations.tokens[].number - Count distinctions. + * @param {string} callback.annotations.tokens[].person - The distinction + * between the speaker, second person, third person, etc. + * @param {string} callback.annotations.tokens[].proper - This category shows if + * the token is part of a proper name. + * @param {string} callback.annotations.tokens[].reciprocity - Reciprocal + * features of a pronoun + * @param {string} callback.annotations.tokens[].tense - Time reference. + * @param {string} callback.annotations.tokens[].voice - The relationship + * between the action that a verb expresses and the participants identified + * by its arguments. * @param {object} callback.apiResponse - The full API response. * * @example @@ -230,12 +338,34 @@ Document.PART_OF_SPEECH = { * // { * // text: 'Google', * // partOfSpeech: 'Noun (common and proper)', - * // partOfSpeechTag: 'NOUN' + * // tag: 'NOUN', + * // aspect: 'PERFECTIVE', + * // case: 'ADVERBIAL', + * // form: 'ADNOMIAL', + * // gender: 'FEMININE', + * // mood: 'IMPERATIVE', + * // number: 'SINGULAR', + * // person: 'FIRST', + * // proper: 'PROPER', + * // reciprocity: 'RECIPROCAL', + * // tense: 'PAST', + * // voice: 'PASSIVE' * // }, * // { * // text: 'is', * // partOfSpeech: 'Verb (all tenses and modes)', - * // partOfSpeechTag: 'VERB' + * // tag: 'VERB', + * // aspect: 'PERFECTIVE', + * // case: 'ADVERBIAL', + * // form: 'ADNOMIAL', + * // gender: 'FEMININE', + * // mood: 'IMPERATIVE', + * // number: 'SINGULAR', + * // person: 'FIRST', + * // proper: 'PROPER', + * // reciprocity: 'RECIPROCAL', + * // tense: 'PAST', + * // voice: 'PASSIVE' * // }, * // ... * // ] @@ -284,8 +414,8 @@ Document.PART_OF_SPEECH = { * // annotation = { * // language: 'en', * // sentiment: { - * // polarity: 100, - * // magnitude: 40 + * // score: 100, + * // magnitude: 4 * // }, * // entities: { * // organizations: [ @@ -301,7 +431,8 @@ Document.PART_OF_SPEECH = { * // text: { * // content: 'Google', * // beginOffset: -1 - * // } + * // }, + * // type: 'PROPER' * // } * // ] * // } @@ -320,7 +451,8 @@ Document.PART_OF_SPEECH = { * // { * // content: 'American', * // beginOffset: -1 - * // } + * // }, + * // type: 'PROPER' * // ] * // } * // ] @@ -329,10 +461,12 @@ Document.PART_OF_SPEECH = { * // }, * // sentences: [ * // { - * // content: - * // 'Google is an American multinational technology company' + - * // 'specializing in Internet-related services and products.' - * // beginOffset: -1 + * // text: { + * // content: + * // 'Google is an American multinational technology company' + + * // 'specializing in Internet-related services and products.', + * // beginOffset: -1 + * // } * // } * // ], * // tokens: [ @@ -342,11 +476,23 @@ Document.PART_OF_SPEECH = { * // beginOffset: -1 * // }, * // partOfSpeech: { - * // tag: 'NOUN' + * // tag: 'NOUN', + * // aspect: 'PERFECTIVE', + * // case: 'ADVERBIAL', + * // form: 'ADNOMIAL', + * // gender: 'FEMININE', + * // mood: 'IMPERATIVE', + * // number: 'SINGULAR', + * // person: 'FIRST', + * // proper: 'PROPER', + * // reciprocity: 'RECIPROCAL', + * // tense: 'PAST', + * // voice: 'PASSIVE' * // }, * // dependencyEdge: { * // headTokenIndex: 1, - * // label: 'NSUBJ' + * // label: 'NSUBJ', + * // description: 'Nominal subject' * // }, * // lemma: 'Google' * // }, @@ -434,10 +580,10 @@ Document.prototype.annotate = function(options, callback) { /** * Detect entities from the document. * - * @resource [documents.analyzeEntities API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeEntities} + * @resource [documents.analyzeEntities API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities} * * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeEntities#request-body). + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities#request-body). * @param {boolean} options.verbose - Enable verbose mode for more detailed * results. Default: `false` * @param {function} callback - The callback function. @@ -567,10 +713,10 @@ Document.prototype.detectEntities = function(options, callback) { /** * Detect the sentiment of the text in this document. * - * @resource [documents.analyzeSentiment API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSentiment} + * @resource [documents.analyzeSentiment API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment} * * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSentiment#request-body). + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment#request-body). * @param {boolean} options.verbose - Enable verbose mode for more detailed * results. Default: `false` * @param {function} callback - The callback function. @@ -601,8 +747,19 @@ Document.prototype.detectEntities = function(options, callback) { * } * * // sentiment = { - * // polarity: 100, - * // magnitude: 40 + * // score: 100, + * // magnitude: 4, + * // sentences: [ + * // { + * // text: { + * // content: + * // 'Google is an American multinational technology company' + + * // 'specializing in Internet-related services and products.', + * // beginOffset: -1 + * // } + * // } + * // ], + * // language: 'en' * // } * }); * @@ -634,10 +791,186 @@ Document.prototype.detectSentiment = function(options, callback) { var originalResp = extend(true, {}, resp); var sentiment = Document.formatSentiment_(resp.documentSentiment, verbose); + if (verbose) { + sentiment = extend(sentiment, { + sentences: Document.formatSentences_(resp.sentences, verbose), + language: resp.language + }); + } + callback(null, sentiment, originalResp); }); }; +/** + * Detect syntax from the document. + * + * @resource [documents.analyzeSyntax API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax} + * + * @param {object=} options - Configuration object. See + * [documents.annotateSyntax](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax#request-body). + * @param {boolean} options.verbose - Enable verbose mode for more detailed + * results. Default: `false` + * @param {function} callback - The callback function. + * @param {?error} callback.err - An error occurred while making this request. + * @param {object} callback.syntax - The syntax recognized from the text. + * @param {string} callback.syntax.language - The language detected from the + * text. + * @param {string[]} callback.syntax.sentences - Sentences detected from the + * text. + * @param {object[]} callback.syntax.tokens - Parts of speech that were + * detected from the text. + * @param {object} callback.apiResponse - The full API response. + * + * @example + * document.detectSyntax(function(err, syntax) { + * if (err) { + * // Error handling omitted. + * } + * + * // syntax = { + * // sentences: [ + * // 'Google is an American multinational technology company ' + + * // 'specializing in Internet-related services and products.' + * // ], + * // tokens: [ + * // { + * // text: 'Google', + * // partOfSpeech: 'Noun (common and proper)', + * // tag: 'NOUN', + * // aspect: 'PERFECTIVE', + * // case: 'ADVERBIAL', + * // form: 'ADNOMIAL', + * // gender: 'FEMININE', + * // mood: 'IMPERATIVE', + * // number: 'SINGULAR', + * // person: 'FIRST', + * // proper: 'PROPER', + * // reciprocity: 'RECIPROCAL', + * // tense: 'PAST', + * // voice: 'PASSIVE' + * // }, + * // { + * // text: 'is', + * // partOfSpeech: 'Verb (all tenses and modes)', + * // tag: 'VERB', + * // aspect: 'PERFECTIVE', + * // case: 'ADVERBIAL', + * // form: 'ADNOMIAL', + * // gender: 'FEMININE', + * // mood: 'IMPERATIVE', + * // number: 'SINGULAR', + * // person: 'FIRST', + * // proper: 'PROPER', + * // reciprocity: 'RECIPROCAL', + * // tense: 'PAST', + * // voice: 'PASSIVE' + * // }, + * // ... + * // ], + * // language: 'en' + * // } + * }); + * + * //- + * // Verbose mode may also be enabled for more detailed results. + * //- + * var options = { + * verbose: true + * }; + * + * document.detectSyntax(options, function(err, syntax) { + * if (err) { + * // Error handling omitted. + * } + * + * // syntax = { + * // sentences: [ + * // { + * // text: { + * // content: + * // 'Google is an American multinational technology company' + + * // 'specializing in Internet-related services and products.', + * // beginOffset: -1 + * // }, + * // sentiment: { + * // score: 100 + * // magnitude: 4 + * // } + * // } + * // ], + * // tokens: [ + * // { + * // text: { + * // content: 'Google', + * // beginOffset: -1 + * // }, + * // partOfSpeech: { + * // tag: 'NOUN', + * // aspect: 'PERFECTIVE', + * // case: 'ADVERBIAL', + * // form: 'ADNOMIAL', + * // gender: 'FEMININE', + * // mood: 'IMPERATIVE', + * // number: 'SINGULAR', + * // person: 'FIRST', + * // proper: 'PROPER', + * // reciprocity: 'RECIPROCAL', + * // tense: 'PAST', + * // voice: 'PASSIVE' + * // }, + * // dependencyEdge: { + * // headTokenIndex: 1, + * // label: 'NSUBJ', + * // description: 'Nominal subject' + * // }, + * // lemme: 'Google' + * // } + * // ], + * // language: 'en' + * // } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * document.detectSyntax().then(function(data) { + * var syntax = data[0]; + * var apiResponse = data[1]; + * }); + */ +Document.prototype.detectSyntax = function(options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + var verbose = options.verbose === true; + + this.api.Language.analyzeSyntax({ + document: this.document, + encodingType: this.encodingType + }, function(err, resp) { + if (err) { + callback(err, null, resp); + return; + } + + var originalResp = extend(true, {}, resp); + var syntax = Document.formatTokens_(resp.tokens, verbose); + + if (verbose) { + syntax = { + tokens: syntax, + sentences: Document.formatSentences_(resp.sentences, verbose), + language: resp.language + }; + } + + callback(null, syntax, originalResp); + }); +}; + /** * Take a raw response from the API and make it more user-friendly. * @@ -698,10 +1031,8 @@ Document.formatEntities_ = function(entities, verbose) { * objects in verbose mode. */ Document.formatSentences_ = function(sentences, verbose) { - sentences = sentences.map(prop('text')); - if (!verbose) { - sentences = sentences.map(prop('content')); + sentences = sentences.map(prop('text')).map(prop('content')); } return sentences; @@ -716,17 +1047,17 @@ Document.formatSentences_ = function(sentences, verbose) { * API. * @param {boolean} verbose - Enable verbose mode for more detailed results. * @return {number|object} - The sentiment represented as a number in the range - * of `-100` to `100` or an object containing `polarity` and `magnitude` + * of `-100` to `100` or an object containing `score` and `magnitude` * measurements in verbose mode. */ Document.formatSentiment_ = function(sentiment, verbose) { sentiment = { - polarity: sentiment.polarity *= 100, - magnitude: sentiment.magnitude *= 100 + score: sentiment.score *= 100, + magnitude: sentiment.magnitude }; if (!verbose) { - sentiment = sentiment.polarity; + sentiment = sentiment.score; } return sentiment; @@ -745,12 +1076,27 @@ Document.formatSentiment_ = function(sentiment, verbose) { */ Document.formatTokens_ = function(tokens, verbose) { if (!verbose) { - tokens = tokens.map(function(token) { - return { - text: token.text.content, - partOfSpeech: Document.PART_OF_SPEECH[token.partOfSpeech.tag], - partOfSpeechTag: token.partOfSpeech.tag - }; + tokens = tokens.map(function(rawToken) { + var token = extend({}, rawToken.partOfSpeech, { + text: rawToken.text.content, + partOfSpeech: Document.PART_OF_SPEECH[rawToken.partOfSpeech.tag] + }); + + if (rawToken.dependencyEdge) { + var label = rawToken.dependencyEdge.label; + + token.dependencyEdge = extend({}, rawToken.dependencyEdge, { + description: Document.LABEL_DESCRIPTIONS[label] + }); + } + + for (var part in token) { + if (token.hasOwnProperty(part) && /UNKNOWN/.test(token[part])) { + token[part] = undefined; + } + } + + return token; }); } diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 07c92e80c05..21588c04288 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -23,7 +23,7 @@ var common = require('@google-cloud/common'); var extend = require('extend'); var is = require('is'); -var v1beta1 = require('./v1beta1'); +var v1 = require('./v1'); /** * @type {module:language/document} @@ -43,12 +43,12 @@ var Document = require('./document.js'); * including sentiment analysis, entity recognition, and syntax analysis. This * API is part of the larger Cloud Machine Learning API. * - * The Cloud Natural Language API currently supports English for - * [sentiment analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1beta1/documents/analyzeSentiment) - * and English, Spanish, and Japanese for - * [entity analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1beta1/documents/analyzeEntities) + * The Cloud Natural Language API currently supports English, Spanish, and + * Japanese for + * [sentiment analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeSentiment), + * [entity analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeEntities) * and - * [syntax analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1beta1/documents/annotateText). + * [syntax analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/annotateText). * * @constructor * @alias module:language @@ -64,7 +64,7 @@ function Language(options) { } this.api = { - Language: v1beta1(options).languageServiceApi(options) + Language: v1(options).languageServiceApi(options) }; } @@ -76,14 +76,14 @@ function Language(options) { * detection, this may be more convenient. However, if you plan to run multiple * detections, it's easier to create a {module:language/document} object. * - * @resource [documents.annotate API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText} + * @resource [documents.annotate API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText} * * @param {string|module:storage/file} content - Inline content or a Storage * File object. * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText#request-body). + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText#request-body). * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. * @param {boolean} options.verbose - Enable verbose mode for more detailed @@ -168,14 +168,14 @@ Language.prototype.annotate = function(content, options, callback) { * detection, this may be more convenient. However, if you plan to run multiple * detections, it's easier to create a {module:language/document} object. * - * @resource [documents.analyzeEntities API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeEntities} + * @resource [documents.analyzeEntities API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities} * * @param {string|module:storage/file} content - Inline content or a Storage * File object. * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeEntities#request-body). + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities#request-body). * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. * @param {boolean} options.verbose - Enable verbose mode for more detailed @@ -259,14 +259,14 @@ Language.prototype.detectEntities = function(content, options, callback) { * detection, this may be more convenient. However, if you plan to run multiple * detections, it's easier to create a {module:language/document} object. * - * @resource [documents.analyzeSentiment API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSentiment} + * @resource [documents.analyzeSentiment API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment} * * @param {string|module:storage/file} content - Inline content or a Storage * File object. * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSentiment#request-body). + * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment#request-body). * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. * @param {boolean} options.verbose - Enable verbose mode for more detailed @@ -333,6 +333,97 @@ Language.prototype.detectSentiment = function(content, options, callback) { document.detectSentiment(options, callback); }; +/** + * Detect the syntax of a block of text. + * + * NOTE: This is a convenience method which doesn't require creating a + * {module:language/document} object. If you are only running a single + * detection, this may be more convenient. However, if you plan to run multiple + * detections, it's easier to create a {module:language/document} object. + * + * @resource [documents.analyzeSyntax API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax} + * + * @param {string|module:storage/file} content - Inline content or a Storage + * File object. + * @param {object=} options - Configuration object. See + * [documents.analyzeSyntax](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax#request-body). + * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). + * @param {string} options.language - The language of the text. + * @param {string} options.type - The type of document, either `html` or `text`. + * @param {boolean} options.verbose - Enable verbose mode for more detailed + * results. Default: `false` + * @param {function} callback - See {module:language/document#detectSyntax}. + * + * @example + * //- + * // See {module:language/document#detectSyntax} for a detailed breakdown of + * // the arguments your callback will be executed with. + * //- + * function callback(err, syntax, apiResponse) {} + * + * language.detectSyntax('Axel Foley is from Detroit', callback); + * + * //- + * // Or, provide a reference to a file hosted on Google Cloud Storage. + * //- + * var gcs = require('@google-cloud/storage')({ + * projectId: 'grape-spaceship-123' + * }); + * var bucket = gcs.bucket('my-bucket'); + * var file = bucket.file('my-file'); + * + * language.detectSyntax(file, callback); + * + * //- + * // Specify HTML content. + * //- + * var options = { + * type: 'html' + * }; + * + * language.detectSyntax('Axel Foley is from Detroit', options, callback); + * + * //- + * // Specify the language the text is written in. + * //- + * var options = { + * language: 'es' + * }; + * + * language.detectSyntax('Axel Foley es de Detroit', options, callback); + * + * //- + * // Verbose mode may also be enabled for more detailed results. + * //- + * var options = { + * verbose: true + * }; + * + * language.detectSyntax('Axel Foley is from Detroit', options, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * language.detectSyntax('Axel Foley is from Detroit').then(function(data) { + * var syntax = data[0]; + * var apiResponse = data[1]; + * }); + */ +Language.prototype.detectSyntax = function(content, options, callback) { + if (is.fn(options)) { + callback = options; + options = {}; + } + + options = extend({}, options, { + content: content + }); + + var document = this.document(options); + document.detectSyntax(options, callback); +}; + /** * Create a Document object for an unknown type. If you know the type, use the * appropriate method below: @@ -347,7 +438,7 @@ Language.prototype.detectSentiment = function(content, options, callback) { * property to pass the inline content of the document or a Storage File * object. * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @return {module:language/document} * @@ -392,7 +483,7 @@ Language.prototype.document = function(config) { * Storage File object. * @param {object=} options - Configuration object. * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @return {module:language/document} * @@ -442,7 +533,7 @@ Language.prototype.html = function(content, options) { * Storage File object. * @param {object=} options - Configuration object. * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1beta1/EncodingType). + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @return {module:language/document} * @@ -494,4 +585,4 @@ common.util.promisifyAll(Language, { }); module.exports = Language; -module.exports.v1beta1 = v1beta1; +module.exports.v1 = v1; diff --git a/packages/google-cloud-language/src/v1beta1/index.js b/packages/google-cloud-language/src/v1/index.js similarity index 81% rename from packages/google-cloud-language/src/v1beta1/index.js rename to packages/google-cloud-language/src/v1/index.js index 2a00e520c12..033602be4d4 100644 --- a/packages/google-cloud-language/src/v1beta1/index.js +++ b/packages/google-cloud-language/src/v1/index.js @@ -19,14 +19,14 @@ var languageServiceApi = require('./language_service_api'); var extend = require('extend'); var gax = require('google-gax'); -function v1beta1(options) { +function v1(options) { options = extend({ - scopes: v1beta1.ALL_SCOPES + scopes: v1.ALL_SCOPES }, options); var gaxGrpc = gax.grpc(options); return languageServiceApi(gaxGrpc); } -v1beta1.SERVICE_ADDRESS = languageServiceApi.SERVICE_ADDRESS; -v1beta1.ALL_SCOPES = languageServiceApi.ALL_SCOPES; -module.exports = v1beta1; +v1.SERVICE_ADDRESS = languageServiceApi.SERVICE_ADDRESS; +v1.ALL_SCOPES = languageServiceApi.ALL_SCOPES; +module.exports = v1; diff --git a/packages/google-cloud-language/src/v1beta1/language_service_api.js b/packages/google-cloud-language/src/v1/language_service_api.js similarity index 76% rename from packages/google-cloud-language/src/v1beta1/language_service_api.js rename to packages/google-cloud-language/src/v1/language_service_api.js index 26182642f7f..dc0aa8e71ec 100644 --- a/packages/google-cloud-language/src/v1beta1/language_service_api.js +++ b/packages/google-cloud-language/src/v1/language_service_api.js @@ -15,7 +15,7 @@ * * EDITING INSTRUCTIONS * This file was generated from the file - * https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta1/language_service.proto, + * https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto, * and updates to that file get reflected here through a refresh process. * For the short term, the refresh process will only be runnable by Google * engineers. @@ -37,7 +37,6 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; - /** * The scopes needed to make gRPC calls to all of the methods defined in * this service. @@ -55,10 +54,10 @@ var ALL_SCOPES = [ * @see {@link languageServiceApi} * * @example - * var languageV1beta1 = require('@google-cloud/language').v1beta1({ + * var languageV1 = require('@google-cloud/language').v1({ * // optional auth parameters. * }); - * var api = languageV1beta1.languageServiceApi(); + * var api = languageV1.languageServiceApi(); * * @class */ @@ -78,21 +77,20 @@ function LanguageServiceApi(gaxGrpc, grpcClients, opts) { 'nodejs/' + process.version].join(' '); var defaults = gaxGrpc.constructSettings( - 'google.cloud.language.v1beta1.LanguageService', + 'google.cloud.language.v1.LanguageService', configData, clientConfig, - null, - null, {'x-goog-api-client': googleApiClient}); var languageServiceStub = gaxGrpc.createStub( servicePath, port, - grpcClients.languageServiceClient.google.cloud.language.v1beta1.LanguageService, + grpcClients.languageServiceClient.google.cloud.language.v1.LanguageService, {sslCreds: sslCreds}); var languageServiceStubMethods = [ 'analyzeSentiment', 'analyzeEntities', + 'analyzeSyntax', 'annotateText' ]; languageServiceStubMethods.forEach(function(methodName) { @@ -100,7 +98,8 @@ function LanguageServiceApi(gaxGrpc, grpcClients, opts) { languageServiceStub.then(function(languageServiceStub) { return languageServiceStub[methodName].bind(languageServiceStub); }), - defaults[methodName]); + defaults[methodName], + null); }.bind(this)); } @@ -116,19 +115,23 @@ function LanguageServiceApi(gaxGrpc, grpcClients, opts) { * ({@link Document.language}="EN"). * * This object should have the same structure as [Document]{@link Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate sentence offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse} + * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse}. * @returns {Promise} - The promise which resolves to the response object. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = languageV1beta1.languageServiceApi(); + * var api = languageV1.languageServiceApi(); * var document = {}; * api.analyzeSentiment({document: document}).then(function(response) { * // doThingsWith(response) @@ -167,13 +170,13 @@ LanguageServiceApi.prototype.analyzeSentiment = function(request, options, callb * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse} + * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse}. * @returns {Promise} - The promise which resolves to the response object. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = languageV1beta1.languageServiceApi(); + * var api = languageV1.languageServiceApi(); * var document = {}; * var encodingType = EncodingType.NONE; * var request = { @@ -198,10 +201,59 @@ LanguageServiceApi.prototype.analyzeEntities = function(request, options, callba }; /** - * Advanced API that analyzes the document and provides a full set of text - * annotations, including semantic, syntactic, and sentiment information. This - * API is intended for users who are familiar with machine learning and need - * in-depth text features to build upon. + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * @param {number} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link AnalyzeSyntaxResponse}. + * @returns {Promise} - The promise which resolves to the response object. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * var api = languageV1.languageServiceApi(); + * var document = {}; + * var encodingType = EncodingType.NONE; + * var request = { + * document: document, + * encodingType: encodingType + * }; + * api.analyzeSyntax(request).then(function(response) { + * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); + * }); + */ +LanguageServiceApi.prototype.analyzeSyntax = function(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + return this._analyzeSyntax(request, options, callback); +}; + +/** + * A convenience method that provides all the features that analyzeSentiment, + * analyzeEntities, and analyzeSyntax provide in one call. * * @param {Object} request * The request object that will be sent. @@ -223,13 +275,13 @@ LanguageServiceApi.prototype.analyzeEntities = function(request, options, callba * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * - * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse} + * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse}. * @returns {Promise} - The promise which resolves to the response object. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = languageV1beta1.languageServiceApi(); + * var api = languageV1.languageServiceApi(); * var document = {}; * var features = {}; * var encodingType = EncodingType.NONE; @@ -262,9 +314,9 @@ function LanguageServiceApiBuilder(gaxGrpc) { var languageServiceClient = gaxGrpc.load([{ root: require('google-proto-files')('..'), - file: 'google/cloud/language/v1beta1/language_service.proto' + file: 'google/cloud/language/v1/language_service.proto' }]); - extend(this, languageServiceClient.google.cloud.language.v1beta1); + extend(this, languageServiceClient.google.cloud.language.v1); var grpcClients = { languageServiceClient: languageServiceClient diff --git a/packages/google-cloud-language/src/v1beta1/language_service_client_config.json b/packages/google-cloud-language/src/v1/language_service_client_config.json similarity index 84% rename from packages/google-cloud-language/src/v1beta1/language_service_client_config.json rename to packages/google-cloud-language/src/v1/language_service_client_config.json index 6ac3a7004ff..5c946b6bc60 100644 --- a/packages/google-cloud-language/src/v1beta1/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1/language_service_client_config.json @@ -1,6 +1,6 @@ { "interfaces": { - "google.cloud.language.v1beta1.LanguageService": { + "google.cloud.language.v1.LanguageService": { "retry_codes": { "retry_codes_def": { "idempotent": [ @@ -32,6 +32,11 @@ "retry_codes_name": "idempotent", "retry_params_name": "default" }, + "AnalyzeSyntax": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, "AnnotateText": { "timeout_millis": 30000, "retry_codes_name": "idempotent", diff --git a/packages/google-cloud-language/system-test/language.js b/packages/google-cloud-language/system-test/language.js index 4e295f8f5d8..4a21bc1c453 100644 --- a/packages/google-cloud-language/system-test/language.js +++ b/packages/google-cloud-language/system-test/language.js @@ -288,6 +288,34 @@ describe('Language', function() { }, validateSentimentVerbose(done)); }); }); + + describe('syntax', function() { + it('should work without creating a document', function(done) { + if (!CONTENT_TYPE) { + language.detectSyntax( + CONTENT, + validateSyntaxSimple(done) + ); + return; + } + + language.detectSyntax( + CONTENT, + { type: CONTENT_TYPE }, + validateSyntaxSimple(done) + ); + }); + + it('should return the correct simplified response', function(done) { + DOC.detectSyntax(validateSyntaxSimple(done)); + }); + + it('should support verbose mode', function(done) { + DOC.detectSyntax({ + verbose: true + }, validateSyntaxVerbose(done)); + }); + }); }); }); }); @@ -331,7 +359,23 @@ describe('Language', function() { assert.deepEqual(annotation.tokens[0], { text: 'Hello', partOfSpeech: 'Other: foreign words, typos, abbreviations', - partOfSpeechTag: 'X' + tag: 'X', + aspect: undefined, + case: undefined, + form: undefined, + gender: undefined, + mood: undefined, + number: undefined, + person: undefined, + proper: undefined, + reciprocity: undefined, + tense: undefined, + voice: undefined, + dependencyEdge: { + description: 'Root', + label: 'ROOT', + headTokenIndex: 0 + } }); assert(is.object(apiResponse)); @@ -464,7 +508,6 @@ describe('Language', function() { assert.ifError(err); assert(is.number(sentiment)); - assert(is.object(apiResponse)); callback(); @@ -480,8 +523,10 @@ describe('Language', function() { assert.ifError(err); assert(is.object(sentiment)); - assert(is.number(sentiment.polarity)); + assert(is.number(sentiment.score)); assert(is.number(sentiment.magnitude)); + assert.strictEqual(sentiment.language, 'en'); + assert.strictEqual(sentiment.sentences.length, 2); assert(is.object(apiResponse)); @@ -491,5 +536,60 @@ describe('Language', function() { } }; } + + function validateSyntaxSimple(callback) { + return function(err, tokens, apiResponse) { + try { + assert.ifError(err); + assert.strictEqual(tokens.length, 17); + assert.deepEqual(tokens[0], { + aspect: undefined, + case: undefined, + form: undefined, + gender: undefined, + mood: undefined, + number: undefined, + partOfSpeech: 'Other: foreign words, typos, abbreviations', + person: undefined, + proper: undefined, + reciprocity: undefined, + tag: 'X', + tense: undefined, + text: 'Hello', + voice: undefined, + dependencyEdge: { + description: 'Root', + headTokenIndex: 0, + label: 'ROOT' + } + }); + + assert(is.object(apiResponse)); + + callback(); + } catch (e) { + callback(e); + } + }; + } + + function validateSyntaxVerbose(callback) { + return function(err, syntax, apiResponse) { + try { + assert.ifError(err); + assert.strictEqual(syntax.sentences.length, 2); + assert(is.object(syntax.sentences[0])); + assert.strictEqual(syntax.tokens.length, 17); + assert(is.object(syntax.tokens[0])); + assert.strictEqual(syntax.language, 'en'); + + assert(is.object(apiResponse)); + + callback(); + } catch (e) { + callback(e); + } + }; + } }); diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js index 9c74bb5c45a..5ad6b119e21 100644 --- a/packages/google-cloud-language/test/document.js +++ b/packages/google-cloud-language/test/document.js @@ -154,6 +154,93 @@ describe('Document', function() { }); }); + describe('LABEL_DESCRIPTIONS', function() { + var expectedDescriptions = { + UNKNOWN: 'Unknown', + ABBREV: 'Abbreviation modifier', + ACOMP: 'Adjectival complement', + ADVCL: 'Adverbial clause modifier', + ADVMOD: 'Adverbial modifier', + AMOD: 'Adjectival modifier of an NP', + APPOS: 'Appositional modifier of an NP', + ATTR: 'Attribute dependent of a copular verb', + AUX: 'Auxiliary (non-main) verb', + AUXPASS: 'Passive auxiliary', + CC: 'Coordinating conjunction', + CCOMP: 'Clausal complement of a verb or adjective', + CONJ: 'Conjunct', + CSUBJ: 'Clausal subject', + CSUBJPASS: 'Clausal passive subject', + DEP: 'Dependency (unable to determine)', + DET: 'Determiner', + DISCOURSE: 'Discourse', + DOBJ: 'Direct object', + EXPL: 'Expletive', + GOESWITH: ' Goes with (part of a word in a text not well edited)', + IOBJ: 'Indirect object', + MARK: 'Marker (word introducing a subordinate clause)', + MWE: 'Multi-word expression', + MWV: 'Multi-word verbal expression', + NEG: 'Negation modifier', + NN: 'Noun compound modifier', + NPADVMOD: 'Noun phrase used as an adverbial modifier', + NSUBJ: 'Nominal subject', + NSUBJPASS: 'Passive nominal subject', + NUM: 'Numeric modifier of a noun', + NUMBER: 'Element of compound number', + P: 'Punctuation mark', + PARATAXIS: 'Parataxis relation', + PARTMOD: 'Participial modifier', + PCOMP: 'The complement of a preposition is a clause', + POBJ: 'Object of a preposition', + POSS: 'Possession modifier', + POSTNEG: 'Postverbal negative particle', + PRECOMP: 'Predicate complement', + PRECONJ: 'Preconjunt', + PREDET: 'Predeterminer', + PREF: 'Prefix', + PREP: 'Prepositional modifier', + PRONL: 'The relationship between a verb and verbal morpheme', + PRT: 'Particle', + PS: 'Associative or possessive marker', + QUANTMOD: 'Quantifier phrase modifier', + RCMOD: 'Relative clause modifier', + RCMODREL: 'Complementizer in relative clause', + RDROP: 'Ellipsis without a preceding predicate', + REF: 'Referent', + REMNANT: 'Remnant', + REPARANDUM: 'Reparandum', + ROOT: 'Root', + SNUM: 'Suffix specifying a unit of number', + SUFF: 'Suffix', + TMOD: 'Temporal modifier', + TOPIC: 'Topic marker', + VMOD: + 'Clause headed by an infinite form of the verb that modifies a noun', + VOCATIVE: 'Vocative', + XCOMP: 'Open clausal complement', + SUFFIX: 'Name suffix', + TITLE: 'Name title', + ADVPHMOD: 'Adverbial phrase modifier', + AUXCAUS: 'Causative auxiliary', + AUXVV: 'Helper auxiliary', + DTMOD: 'Rentaishi (Prenominal modifier)', + FOREIGN: 'Foreign words', + KW: 'Keyword', + LIST: 'List for chains of comparable items', + NOMC: 'Nominalized clause', + NOMCSUBJ: 'Nominalized clausal subject', + NOMCSUBJPASS: 'Nominalized clausal passive', + NUMC: 'Compound of numeric modifier', + COP: 'Copula', + DISLOCATED: 'Dislocated relation (for fronted/topicalized elements)' + }; + + it('should contain the correct list of label descriptions', function() { + assert.deepEqual(Document.LABEL_DESCRIPTIONS, expectedDescriptions); + }); + }); + describe('PART_OF_SPEECH', function() { var expectedPartOfSpeech = { UNKNOWN: 'Unknown', @@ -560,7 +647,9 @@ describe('Document', function() { describe('success', function() { var apiResponse = { - documentSentiment: {} + documentSentiment: {}, + sentences: [], + language: 'en' }; var originalApiResponse = extend({}, apiResponse); @@ -601,14 +690,154 @@ describe('Document', function() { }); it('should allow verbose mode', function(done) { + var fakeSentiment = {}; + Document.formatSentiment_ = function(sentiment, verbose) { + assert.strictEqual(sentiment, apiResponse.documentSentiment); + assert.strictEqual(verbose, true); + return fakeSentiment; + }; + + var fakeSentences = []; + + Document.formatSentences_ = function(sentences, verbose) { + assert.strictEqual(sentences, apiResponse.sentences); assert.strictEqual(verbose, true); + return fakeSentences; + }; + + var options = { + verbose: true + }; + + document.detectSentiment(options, function(err, sentiment, resp) { + assert.ifError(err); + + assert.strictEqual(sentiment, fakeSentiment); + assert.strictEqual(sentiment.sentences, fakeSentences); + assert.strictEqual(sentiment.language, 'en'); + + assert.deepEqual(resp, apiResponse); + + done(); + }); + }); + }); + }); + + describe('detectSyntax', function() { + it('should make the correct API request', function(done) { + document.api.Language = { + analyzeSyntax: function(reqOpts) { + assert.strictEqual(reqOpts.document, document.document); + assert.strictEqual(reqOpts.encodingType, document.encodingType); done(); + } + }; + + document.encodingType = 'encoding-type'; + document.detectSyntax(assert.ifError); + }); + + describe('error', function() { + var apiResponse = {}; + var error = new Error('Error.'); + + beforeEach(function() { + document.api.Language = { + analyzeSyntax: function(reqOpts, callback) { + callback(error, apiResponse); + } }; + }); - document.detectSentiment({ + it('should exec callback with error and API response', function(done) { + document.detectSyntax(function(err, syntax, apiResponse_) { + assert.strictEqual(err, error); + assert.strictEqual(syntax, null); + assert.strictEqual(apiResponse_, apiResponse); + done(); + }); + }); + }); + + describe('success', function() { + var apiResponse = { + sentences: [{}], + tokens: [{}], + language: 'en' + }; + + var originalApiResponse = extend({}, apiResponse); + + beforeEach(function() { + Document.formatTokens_ = util.noop; + Document.formatSentences_ = util.noop; + + document.api.Language = { + analyzeSyntax: function(reqOpts, callback) { + callback(null, apiResponse); + } + }; + }); + + it('should format the tokens', function(done) { + var formattedTokens = [{}]; + + Document.formatTokens_ = function(tokens, verbose) { + assert.strictEqual(tokens, apiResponse.tokens); + assert.strictEqual(verbose, false); + return formattedTokens; + }; + + document.detectSyntax(function(err, syntax) { + assert.ifError(err); + assert.strictEqual(syntax, formattedTokens); + done(); + }); + }); + + it('should clone the response object', function(done) { + document.detectSyntax(function(err, syntax, apiResponse_) { + assert.ifError(err); + assert.notStrictEqual(apiResponse_, apiResponse); + assert.deepEqual(apiResponse_, originalApiResponse); + done(); + }); + }); + + it('should allow verbose mode', function(done) { + var fakeTokens = []; + + Document.formatTokens_ = function(tokens, verbose) { + assert.strictEqual(tokens, apiResponse.tokens); + assert.strictEqual(verbose, true); + return fakeTokens; + }; + + var fakeSentences = []; + + Document.formatSentences_ = function(sentences, verbose) { + assert.strictEqual(sentences, apiResponse.sentences); + assert.strictEqual(verbose, true); + return fakeSentences; + }; + + var options = { verbose: true - }, assert.ifError); + }; + + document.detectSyntax(options, function(err, syntax, resp) { + assert.ifError(err); + + assert.strictEqual(syntax.tokens, fakeTokens); + assert.strictEqual(syntax.sentences, fakeSentences); + assert.strictEqual(syntax.language, 'en'); + + assert.deepEqual(resp, apiResponse); + + done(); + }); }); }); }); @@ -716,7 +945,7 @@ describe('Document', function() { var EXPECTED_FORMATTED_SENTENCES = { default: SENTENCES.map(prop('text')).map(prop('content')), - verbose: SENTENCES.map(prop('text')) + verbose: SENTENCES }; it('should correctly format sentences', function() { @@ -740,17 +969,17 @@ describe('Document', function() { describe('formatSentiment_', function() { var SENTIMENT = { - polarity: -0.5, + score: -0.5, magnitude: 0.5 }; var VERBOSE = false; var EXPECTED_FORMATTED_SENTIMENT = { - default: SENTIMENT.polarity * 100, + default: SENTIMENT.score * 100, verbose: { - polarity: SENTIMENT.polarity * 100, - magnitude: SENTIMENT.magnitude * 100 + score: SENTIMENT.score * 100, + magnitude: SENTIMENT.magnitude } }; @@ -782,14 +1011,22 @@ describe('Document', function() { content: 'Text content' }, partOfSpeech: { - tag: 'PART_OF_SPEECH_TAG' + tag: 'PART_OF_SPEECH_TAG', + fakePart: 'UNKNOWN' }, - property: 'value' + property: 'value', + dependencyEdge: { + label: 'FAKE_LABEL' + } } ]; var VERBOSE = false; + var LABEL_DESCRIPTIONS = { + FAKE_LABEL: 'fake label description' + }; + var PART_OF_SPEECH = { PART_OF_SPEECH_TAG: 'part of speech value' }; @@ -799,7 +1036,12 @@ describe('Document', function() { return { text: token.text.content, partOfSpeech: PART_OF_SPEECH.PART_OF_SPEECH_TAG, - partOfSpeechTag: 'PART_OF_SPEECH_TAG' + tag: 'PART_OF_SPEECH_TAG', + fakePart: undefined, + dependencyEdge: { + label: 'FAKE_LABEL', + description: LABEL_DESCRIPTIONS.FAKE_LABEL + } }; }), @@ -808,6 +1050,7 @@ describe('Document', function() { beforeEach(function() { Document.PART_OF_SPEECH = PART_OF_SPEECH; + Document.LABEL_DESCRIPTIONS = LABEL_DESCRIPTIONS; }); it('should correctly format tokens', function() { diff --git a/packages/google-cloud-language/test/index.js b/packages/google-cloud-language/test/index.js index 1e4a5c9baee..37ed64aa6ba 100644 --- a/packages/google-cloud-language/test/index.js +++ b/packages/google-cloud-language/test/index.js @@ -37,10 +37,10 @@ function FakeDocument() { this.calledWith_ = arguments; } -var fakeV1Beta1Override; -function fakeV1Beta1() { - if (fakeV1Beta1Override) { - return fakeV1Beta1Override.apply(null, arguments); +var fakeV1Override; +function fakeV1() { + if (fakeV1Override) { + return fakeV1Override.apply(null, arguments); } return { @@ -60,12 +60,12 @@ describe('Language', function() { util: fakeUtil }, './document.js': FakeDocument, - './v1beta1': fakeV1Beta1 + './v1': fakeV1 }); }); beforeEach(function() { - fakeV1Beta1Override = null; + fakeV1Override = null; language = new Language(OPTIONS); }); @@ -102,7 +102,7 @@ describe('Language', function() { it('should create a gax api client', function() { var expectedLanguageService = {}; - fakeV1Beta1Override = function(options) { + fakeV1Override = function(options) { assert.strictEqual(options, OPTIONS); return { @@ -262,6 +262,54 @@ describe('Language', function() { }); }); + describe('detectSyntax', function() { + var CONTENT = '...'; + var OPTIONS = { + property: 'value' + }; + + var EXPECTED_OPTIONS = { + withCustomOptions: extend({}, OPTIONS, { + content: CONTENT + }), + + withoutCustomOptions: extend({}, { + content: CONTENT + }) + }; + + it('should call detectSyntax on a Document', function(done) { + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); + + return { + detectSyntax: function(options, callback) { + assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); + callback(); // done() + } + }; + }; + + language.detectSyntax(CONTENT, OPTIONS, done); + }); + + it('should not require options', function(done) { + language.document = function(options) { + assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); + + return { + detectSyntax: function(options, callback) { + assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); + callback(); // done() + } + }; + }; + + language.detectSyntax(CONTENT, done); + }); + }); + + describe('document', function() { var CONFIG = {}; From f8038060f835e791871f097560af83748f617ee1 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Mon, 14 Nov 2016 19:59:15 -0500 Subject: [PATCH 033/488] language: updating dep versions --- packages/google-cloud-language/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 9737b3fd473..7ed464e13bf 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,10 +52,10 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.7.0", + "@google-cloud/common": "^0.8.0", "arrify": "^1.0.1", "extend": "^3.0.0", - "google-gax": "^0.9.0", + "google-gax": "^0.9.1", "google-proto-files": "^0.8.5", "is": "^3.0.1", "propprop": "^0.3.1" From b8c7521879025d67e23036295977067b717ff832 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Mon, 14 Nov 2016 20:02:25 -0500 Subject: [PATCH 034/488] language @ 0.6.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 7ed464e13bf..9b281a6a65b 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.5.0", + "version": "0.6.0", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From fa24e776a31978a29e96ef61510c50507ece018d Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Tue, 15 Nov 2016 11:17:26 -0800 Subject: [PATCH 035/488] Update Language samples. (#254) * Update Language samples. * Address comments. --- .../google-cloud-language/samples/README.md | 31 ++++++------- .../samples/package.json | 13 ++---- .../samples/quickstart.js | 14 +++--- .../samples/test/quickstart.test.js | 44 ------------------- 4 files changed, 26 insertions(+), 76 deletions(-) delete mode 100644 packages/google-cloud-language/samples/test/quickstart.test.js diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index d7a0fddadd8..fb7ec573037 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -35,25 +35,26 @@ __Usage:__ `node analyze --help` ``` Commands: - sentimentFromString Detect the sentiment of a block of text. - sentimentFromFile Detect the sentiment of text in a GCS file. - entitiesFromString Detect the entities of a block of text. - entitiesFromFile Detect the entities of text in a GCS file. - syntaxFromString Detect the syntax of a block of text. - syntaxFromFile Detect the syntax of text in a GCS file. + sentimentOfText Detect the sentiment of a block of text. + sentimentInFile Detect the sentiment of text in a GCS file. + entitiesOfText Detect the entities of a block of text. + entitiesInFile Detect the entities of text in a GCS file. + syntaxOfText Detect the syntax of a block of text. + syntaxInFile Detect the syntax of text in a GCS file. Options: - --language, -l The language of the text. [string] - --type, -t Type of text [string] [choices: "text", "html"] [default: "text"] - --help Show help [boolean] + --help Show help [boolean] Examples: - node analyze sentimentFromString "President Obama is speaking at the White House." - node analyze sentimentFromFile my-bucket file.txt - node analyze entitiesFromString "

President Obama is speaking at the White House.

" -t html - node analyze entitiesFromFile my-bucket file.txt - node analyze syntaxFromString "President Obama is speaking at the White House." - node analyze syntaxFromFile my-bucket es_file.txt -l es + node analyze sentimentOfText "President Obama is speaking at + the White House." + node analyze sentimentInFile my-bucket file.txt + node analyze entitiesOfText "President Obama is speaking at + the White House." + node analyze entitiesInFile my-bucket file.txt + node analyze syntaxOfText "President Obama is speaking at + the White House." + node analyze syntaxInFile my-bucket file.txt For more information, see https://cloud.google.com/natural-language/docs ``` diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index c5ac342fd00..f95e29b9fd0 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -5,17 +5,12 @@ "license": "Apache Version 2.0", "author": "Google Inc.", "scripts": { - "test": "mocha -R spec -t 120000 --require intelli-espower-loader ../test/_setup.js test/*.test.js", - "system-test": "mocha -R spec -t 120000 --require intelli-espower-loader ../system-test/_setup.js system-test/*.test.js" + "test": "cd ..; npm run st -- language/system-test/*" }, "dependencies": { - "@google-cloud/language": "^0.1.2", - "@google-cloud/storage": "^0.1.1", - "yargs": "^5.0.0" - }, - "devDependencies": { - "mocha": "^3.0.2", - "node-uuid": "^1.4.7" + "@google-cloud/language": "^0.6.0", + "@google-cloud/storage": "^0.4.0", + "yargs": "^6.4.0" }, "engines": { "node": ">=4.3.2" diff --git a/packages/google-cloud-language/samples/quickstart.js b/packages/google-cloud-language/samples/quickstart.js index ac595aa563b..fd40ed8a2b8 100644 --- a/packages/google-cloud-language/samples/quickstart.js +++ b/packages/google-cloud-language/samples/quickstart.js @@ -31,13 +31,11 @@ const languageClient = Language({ const text = 'Hello, world!'; // Detects the sentiment of the text -languageClient.detectSentiment(text, { verbose: true }, (err, sentiment) => { - if (err) { - console.error(err); - return; - } +languageClient.detectSentiment(text) + .then((results) => { + const sentiment = results[0]; - console.log('Text: %s', text); - console.log('Sentiment: %j', sentiment); -}); + console.log(`Text: ${text}`); + console.log(`Sentiment: ${sentiment}`); + }); // [END language_quickstart] diff --git a/packages/google-cloud-language/samples/test/quickstart.test.js b/packages/google-cloud-language/samples/test/quickstart.test.js deleted file mode 100644 index df0519c73c0..00000000000 --- a/packages/google-cloud-language/samples/test/quickstart.test.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright 2016, 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -const proxyquire = require(`proxyquire`).noCallThru(); - -describe(`language:quickstart`, () => { - let languageMock, LanguageMock; - const error = new Error(`error`); - const text = 'Hello, world!'; - - before(() => { - languageMock = { - detectSentiment: sinon.stub().yields(error) - }; - LanguageMock = sinon.stub().returns(languageMock); - }); - - it(`should handle error`, () => { - proxyquire(`../quickstart`, { - '@google-cloud/language': LanguageMock - }); - - assert.equal(LanguageMock.calledOnce, true); - assert.deepEqual(LanguageMock.firstCall.args, [{ projectId: 'YOUR_PROJECT_ID' }]); - assert.equal(languageMock.detectSentiment.calledOnce, true); - assert.deepEqual(languageMock.detectSentiment.firstCall.args.slice(0, -1), [text, { verbose: true }]); - assert.equal(console.error.calledOnce, true); - assert.deepEqual(console.error.firstCall.args, [error]); - }); -}); From 2695dffbe01320911ab50d4eb1ce69b7e16756a9 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 16 Nov 2016 11:16:08 -0500 Subject: [PATCH 036/488] docs: update API key generation steps (#1791) --- packages/google-cloud-language/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 90b6763ebda..da7d35ddc5f 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -101,8 +101,8 @@ If you are not running this client on Google Compute Engine, you need a Google D 3. Navigate to **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services): * Google Cloud Natural Language API 4. Navigate to **APIs & auth** > **Credentials** and then: - * If you want to use a new service account, click on **Create new Client ID** and select **Service account**. After the account is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. - * If you want to generate a new key for an existing service account, click on **Generate new JSON key** and download the JSON key file. + * If you want to use a new service account key, click on **Create credentials** and select **Service account key**. After the account key is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. + * If you want to generate a new service account key for an existing service account, click on **Generate new JSON key** and download the JSON key file. ``` js var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' From 47526b914cd31cffc5bd538caaeb73e6caf87bd9 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 16 Nov 2016 16:31:09 -0500 Subject: [PATCH 037/488] language @ 0.6.1 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 9b281a6a65b..903e8797187 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.6.0", + "version": "0.6.1", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From 243e813ba6a015ec83b9f82b510c1568b1c6b9a8 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 21 Nov 2016 12:57:41 -0800 Subject: [PATCH 038/488] Update Translate samples, with some minor tweaks to Language samples. (#255) --- .../google-cloud-language/samples/README.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index fb7ec573037..c07335b54a4 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -31,30 +31,30 @@ Learning API. View the [documentation][analyze_docs] or the [source code][analyze_code]. -__Usage:__ `node analyze --help` +__Usage:__ `node analyze.js --help` ``` Commands: - sentimentOfText Detect the sentiment of a block of text. - sentimentInFile Detect the sentiment of text in a GCS file. - entitiesOfText Detect the entities of a block of text. - entitiesInFile Detect the entities of text in a GCS file. - syntaxOfText Detect the syntax of a block of text. - syntaxInFile Detect the syntax of text in a GCS file. + 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] Examples: - node analyze sentimentOfText "President Obama is speaking at + 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-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 sentimentInFile my-bucket file.txt - node analyze entitiesOfText "President Obama is speaking at - the White House." - node analyze entitiesInFile my-bucket file.txt - node analyze syntaxOfText "President Obama is speaking at - the White House." - node analyze syntaxInFile my-bucket file.txt + 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 ``` From 8c024c5e1521bd8abcbbc59051fe2338664b12d0 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 21 Nov 2016 15:13:07 -0800 Subject: [PATCH 039/488] Fixes #48 (#249) Fixes #234 Fixes #250 Addressed comments. --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index f95e29b9fd0..30d16f2d7af 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -5,7 +5,7 @@ "license": "Apache Version 2.0", "author": "Google Inc.", "scripts": { - "test": "cd ..; npm run st -- language/system-test/*" + "test": "cd ..; npm run st -- language/system-test/*.test.js" }, "dependencies": { "@google-cloud/language": "^0.6.0", From 8b70b95b6256b8a5a2bc775b7fce40f0a712c9da Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Sun, 27 Nov 2016 12:40:22 -0800 Subject: [PATCH 040/488] Regenerate language service API (#1824) --- packages/google-cloud-language/src/index.js | 2 +- .../google-cloud-language/src/v1/index.js | 8 +-- ...vice_api.js => language_service_client.js} | 72 +++++++++++-------- packages/google-cloud-language/test/index.js | 4 +- 4 files changed, 49 insertions(+), 37 deletions(-) rename packages/google-cloud-language/src/v1/{language_service_api.js => language_service_client.js} (82%) diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 21588c04288..fe9c6061516 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -64,7 +64,7 @@ function Language(options) { } this.api = { - Language: v1(options).languageServiceApi(options) + Language: v1(options).languageServiceClient(options) }; } diff --git a/packages/google-cloud-language/src/v1/index.js b/packages/google-cloud-language/src/v1/index.js index 033602be4d4..7d76f854877 100644 --- a/packages/google-cloud-language/src/v1/index.js +++ b/packages/google-cloud-language/src/v1/index.js @@ -15,7 +15,7 @@ */ 'use strict'; -var languageServiceApi = require('./language_service_api'); +var languageServiceClient = require('./language_service_client'); var extend = require('extend'); var gax = require('google-gax'); @@ -24,9 +24,9 @@ function v1(options) { scopes: v1.ALL_SCOPES }, options); var gaxGrpc = gax.grpc(options); - return languageServiceApi(gaxGrpc); + return languageServiceClient(gaxGrpc); } -v1.SERVICE_ADDRESS = languageServiceApi.SERVICE_ADDRESS; -v1.ALL_SCOPES = languageServiceApi.ALL_SCOPES; +v1.SERVICE_ADDRESS = languageServiceClient.SERVICE_ADDRESS; +v1.ALL_SCOPES = languageServiceClient.ALL_SCOPES; module.exports = v1; diff --git a/packages/google-cloud-language/src/v1/language_service_api.js b/packages/google-cloud-language/src/v1/language_service_client.js similarity index 82% rename from packages/google-cloud-language/src/v1/language_service_api.js rename to packages/google-cloud-language/src/v1/language_service_client.js index dc0aa8e71ec..a927916a1ec 100644 --- a/packages/google-cloud-language/src/v1/language_service_api.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -51,17 +51,17 @@ var ALL_SCOPES = [ * * This will be created through a builder function which can be obtained by the module. * See the following example of how to initialize the module and how to access to the builder. - * @see {@link languageServiceApi} + * @see {@link languageServiceClient} * * @example * var languageV1 = require('@google-cloud/language').v1({ * // optional auth parameters. * }); - * var api = languageV1.languageServiceApi(); + * var client = languageV1.languageServiceClient(); * * @class */ -function LanguageServiceApi(gaxGrpc, grpcClients, opts) { +function LanguageServiceClient(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; @@ -126,20 +126,22 @@ function LanguageServiceApi(gaxGrpc, grpcClients, opts) { * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse}. - * @returns {Promise} - The promise which resolves to the response object. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = languageV1.languageServiceApi(); + * var client = languageV1.languageServiceClient(); * var document = {}; - * api.analyzeSentiment({document: document}).then(function(response) { + * client.analyzeSentiment({document: document}).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -LanguageServiceApi.prototype.analyzeSentiment = function(request, options, callback) { +LanguageServiceClient.prototype.analyzeSentiment = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -147,6 +149,7 @@ LanguageServiceApi.prototype.analyzeSentiment = function(request, options, callb if (options === undefined) { options = {}; } + return this._analyzeSentiment(request, options, callback); }; @@ -171,25 +174,27 @@ LanguageServiceApi.prototype.analyzeSentiment = function(request, options, callb * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse}. - * @returns {Promise} - The promise which resolves to the response object. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = languageV1.languageServiceApi(); + * var client = languageV1.languageServiceClient(); * var document = {}; - * var encodingType = EncodingType.NONE; + * var encodingType = languageV1.EncodingType.NONE; * var request = { * document: document, * encodingType: encodingType * }; - * api.analyzeEntities(request).then(function(response) { + * client.analyzeEntities(request).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -LanguageServiceApi.prototype.analyzeEntities = function(request, options, callback) { +LanguageServiceClient.prototype.analyzeEntities = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -197,6 +202,7 @@ LanguageServiceApi.prototype.analyzeEntities = function(request, options, callba if (options === undefined) { options = {}; } + return this._analyzeEntities(request, options, callback); }; @@ -222,25 +228,27 @@ LanguageServiceApi.prototype.analyzeEntities = function(request, options, callba * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link AnalyzeSyntaxResponse}. - * @returns {Promise} - The promise which resolves to the response object. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link AnalyzeSyntaxResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = languageV1.languageServiceApi(); + * var client = languageV1.languageServiceClient(); * var document = {}; - * var encodingType = EncodingType.NONE; + * var encodingType = languageV1.EncodingType.NONE; * var request = { * document: document, * encodingType: encodingType * }; - * api.analyzeSyntax(request).then(function(response) { + * client.analyzeSyntax(request).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -LanguageServiceApi.prototype.analyzeSyntax = function(request, options, callback) { +LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -248,6 +256,7 @@ LanguageServiceApi.prototype.analyzeSyntax = function(request, options, callback if (options === undefined) { options = {}; } + return this._analyzeSyntax(request, options, callback); }; @@ -276,27 +285,29 @@ LanguageServiceApi.prototype.analyzeSyntax = function(request, options, callback * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse}. - * @returns {Promise} - The promise which resolves to the response object. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = languageV1.languageServiceApi(); + * var client = languageV1.languageServiceClient(); * var document = {}; * var features = {}; - * var encodingType = EncodingType.NONE; + * var encodingType = languageV1.EncodingType.NONE; * var request = { * document: document, * features: features, * encodingType: encodingType * }; - * api.annotateText(request).then(function(response) { + * client.annotateText(request).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -LanguageServiceApi.prototype.annotateText = function(request, options, callback) { +LanguageServiceClient.prototype.annotateText = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -304,12 +315,13 @@ LanguageServiceApi.prototype.annotateText = function(request, options, callback) if (options === undefined) { options = {}; } + return this._annotateText(request, options, callback); }; -function LanguageServiceApiBuilder(gaxGrpc) { - if (!(this instanceof LanguageServiceApiBuilder)) { - return new LanguageServiceApiBuilder(gaxGrpc); +function LanguageServiceClientBuilder(gaxGrpc) { + if (!(this instanceof LanguageServiceClientBuilder)) { + return new LanguageServiceClientBuilder(gaxGrpc); } var languageServiceClient = gaxGrpc.load([{ @@ -323,7 +335,7 @@ function LanguageServiceApiBuilder(gaxGrpc) { }; /** - * Build a new instance of {@link LanguageServiceApi}. + * Build a new instance of {@link LanguageServiceClient}. * * @param {Object=} opts - The optional parameters. * @param {String=} opts.servicePath @@ -340,11 +352,11 @@ function LanguageServiceApiBuilder(gaxGrpc) { * @param {String=} opts.appVersion * The version of the calling service. */ - this.languageServiceApi = function(opts) { - return new LanguageServiceApi(gaxGrpc, grpcClients, opts); + this.languageServiceClient = function(opts) { + return new LanguageServiceClient(gaxGrpc, grpcClients, opts); }; - extend(this.languageServiceApi, LanguageServiceApi); + extend(this.languageServiceClient, LanguageServiceClient); } -module.exports = LanguageServiceApiBuilder; +module.exports = LanguageServiceClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/packages/google-cloud-language/test/index.js b/packages/google-cloud-language/test/index.js index 37ed64aa6ba..cb2a2189550 100644 --- a/packages/google-cloud-language/test/index.js +++ b/packages/google-cloud-language/test/index.js @@ -44,7 +44,7 @@ function fakeV1() { } return { - languageServiceApi: util.noop + languageServiceClient: util.noop }; } @@ -106,7 +106,7 @@ describe('Language', function() { assert.strictEqual(options, OPTIONS); return { - languageServiceApi: function(options) { + languageServiceClient: function(options) { assert.strictEqual(options, OPTIONS); return expectedLanguageService; } From 754fa16d94f316831f86d9493a0213908fe33a0f Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Mon, 28 Nov 2016 14:10:23 -0500 Subject: [PATCH 041/488] language: add missing dependency (#1827) --- packages/google-cloud-language/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 903e8797187..131767ca710 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -65,6 +65,7 @@ "mocha": "^3.0.2", "node-uuid": "^1.4.7", "proxyquire": "^1.7.10", + "string-format-obj": "^1.1.0", "through2": "^2.0.1" }, "scripts": { From 7112569c1558fda1879d7347e3a4924bf6cd436e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 28 Nov 2016 20:30:14 -0500 Subject: [PATCH 042/488] language @ 0.6.2 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 131767ca710..50900366ae5 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.6.1", + "version": "0.6.2", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From 8be6e3d76324d6a5094620f7e0273ebfc7e5eaa8 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 29 Nov 2016 08:25:01 -0500 Subject: [PATCH 043/488] language: change devDep to dep --- packages/google-cloud-language/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 50900366ae5..3d5371a9fb8 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -58,14 +58,14 @@ "google-gax": "^0.9.1", "google-proto-files": "^0.8.5", "is": "^3.0.1", - "propprop": "^0.3.1" + "propprop": "^0.3.1", + "string-format-obj": "^1.1.0" }, "devDependencies": { "@google-cloud/storage": "*", "mocha": "^3.0.2", "node-uuid": "^1.4.7", "proxyquire": "^1.7.10", - "string-format-obj": "^1.1.0", "through2": "^2.0.1" }, "scripts": { From 5cddac3350d389d93894470ac1c855b05b73c76d Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 29 Nov 2016 08:25:32 -0500 Subject: [PATCH 044/488] language @ 0.6.3 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 3d5371a9fb8..d7524ba865b 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.6.2", + "version": "0.6.3", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From 7867638f332c3631897912162f5adda4e5fd4929 Mon Sep 17 00:00:00 2001 From: Sawyer Hollenshead Date: Tue, 29 Nov 2016 10:06:16 -0500 Subject: [PATCH 045/488] language: remove sentiment and salience range conversions (#1834) (#1836) --- .../google-cloud-language/src/document.js | 32 +++++++++---------- .../google-cloud-language/test/document.js | 12 ++----- 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index 87e35e198f2..35fb9befd28 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -252,7 +252,7 @@ Document.PART_OF_SPEECH = { * @param {string} callback.annotation.language - The language detected from the * text. * @param {number} callback.annotation.sentiment - A value in the range of - * `-100` to `100`. Large numbers represent more positive sentiments. + * `-1` (negative) to `1` (positive). * @param {object} callback.annotation.entities - The recognized entities from * the text, grouped by the type of entity. * @param {string[]} callback.annotation.entities.art - Art entities detected @@ -321,7 +321,7 @@ Document.PART_OF_SPEECH = { * * // annotation = { * // language: 'en', - * // sentiment: 100, + * // sentiment: 1, * // entities: { * // organizations: [ * // 'Google' @@ -387,7 +387,7 @@ Document.PART_OF_SPEECH = { * * // annotation = { * // language: 'en', - * // sentiment: 100, + * // sentiment: 1, * // entities: { * // organizations: [ * // 'Google' @@ -414,7 +414,7 @@ Document.PART_OF_SPEECH = { * // annotation = { * // language: 'en', * // sentiment: { - * // score: 100, + * // score: 1, * // magnitude: 4 * // }, * // entities: { @@ -425,7 +425,7 @@ Document.PART_OF_SPEECH = { * // metadata: { * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' * // }, - * // salience: 65.137446, + * // salience: 0.65137446, * // mentions: [ * // { * // text: { @@ -444,7 +444,7 @@ Document.PART_OF_SPEECH = { * // metadata: { * // wikipedia_url: 'http://en.wikipedia.org/wiki/United_States' * // }, - * // salience: 13.947370648384094, + * // salience: 0.13947370648384094, * // mentions: [ * // { * // text: [ @@ -646,7 +646,7 @@ Document.prototype.annotate = function(options, callback) { * // metadata: { * // wikipedia_url: 'http: * //en.wikipedia.org/wiki/Google' * // }, - * // salience: 65.137446, + * // salience: 0.65137446, * // mentions: [ * // { * // text: { @@ -664,7 +664,7 @@ Document.prototype.annotate = function(options, callback) { * // metadata: { * // wikipedia_url: 'http: * //en.wikipedia.org/wiki/United_States' * // }, - * // salience: 13.947371, + * // salience: 0.13947371, * // mentions: [ * // { * // text: { @@ -721,8 +721,8 @@ Document.prototype.detectEntities = function(options, callback) { * results. Default: `false` * @param {function} callback - The callback function. * @param {?error} callback.err - An error occurred while making this request. - * @param {number} callback.sentiment - A value in the range of `-100` to `100`. - * Large numbers represent more positive sentiments. + * @param {number} callback.sentiment - A value in the range of `-1` (negative) + * to `1` (positive). * @param {object} callback.apiResponse - The full API response. * * @example @@ -731,7 +731,7 @@ Document.prototype.detectEntities = function(options, callback) { * // Error handling omitted. * } * - * // sentiment = 100 + * // sentiment = 1 * }); * * //- @@ -747,7 +747,7 @@ Document.prototype.detectEntities = function(options, callback) { * } * * // sentiment = { - * // score: 100, + * // score: 1, * // magnitude: 4, * // sentences: [ * // { @@ -894,7 +894,7 @@ Document.prototype.detectSentiment = function(options, callback) { * // beginOffset: -1 * // }, * // sentiment: { - * // score: 100 + * // score: 1 * // magnitude: 4 * // } * // } @@ -997,8 +997,6 @@ Document.formatEntities_ = function(entities, verbose) { var groupName = GROUP_NAME_TO_TYPE[entity.type]; - entity.salience *= 100; - acc[groupName] = arrify(acc[groupName]); acc[groupName].push(entity); acc[groupName].sort(Document.sortByProperty_('salience')); @@ -1047,12 +1045,12 @@ Document.formatSentences_ = function(sentences, verbose) { * API. * @param {boolean} verbose - Enable verbose mode for more detailed results. * @return {number|object} - The sentiment represented as a number in the range - * of `-100` to `100` or an object containing `score` and `magnitude` + * of `-1` to `1` or an object containing `score` and `magnitude` * measurements in verbose mode. */ Document.formatSentiment_ = function(sentiment, verbose) { sentiment = { - score: sentiment.score *= 100, + score: sentiment.score, magnitude: sentiment.magnitude }; diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js index 5ad6b119e21..d7b9aa770ff 100644 --- a/packages/google-cloud-language/test/document.js +++ b/packages/google-cloud-language/test/document.js @@ -883,14 +883,6 @@ describe('Document', function() { other: [ entitiesCopy[15], entitiesCopy[14] ], }; - for (var entityType in FORMATTED_ENTITIES) { - FORMATTED_ENTITIES[entityType] = FORMATTED_ENTITIES[entityType] - .map(function(entity) { - entity.salience *= 100; - return entity; - }); - } - var EXPECTED_FORMATTED_ENTITIES = { default: extend(true, {}, FORMATTED_ENTITIES), verbose: extend(true, {}, FORMATTED_ENTITIES) @@ -976,9 +968,9 @@ describe('Document', function() { var VERBOSE = false; var EXPECTED_FORMATTED_SENTIMENT = { - default: SENTIMENT.score * 100, + default: SENTIMENT.score, verbose: { - score: SENTIMENT.score * 100, + score: SENTIMENT.score, magnitude: SENTIMENT.magnitude } }; From 2b0f0889f49552121ff59f0cab64ba280d992662 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 5 Dec 2016 14:12:43 -0500 Subject: [PATCH 046/488] bump packages (#1856) --- packages/google-cloud-language/package.json | 6 +++--- packages/google-cloud-language/system-test/language.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index d7524ba865b..87868235262 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -55,7 +55,7 @@ "@google-cloud/common": "^0.8.0", "arrify": "^1.0.1", "extend": "^3.0.0", - "google-gax": "^0.9.1", + "google-gax": "^0.10.0", "google-proto-files": "^0.8.5", "is": "^3.0.1", "propprop": "^0.3.1", @@ -64,9 +64,9 @@ "devDependencies": { "@google-cloud/storage": "*", "mocha": "^3.0.2", - "node-uuid": "^1.4.7", "proxyquire": "^1.7.10", - "through2": "^2.0.1" + "through2": "^2.0.1", + "uuid": "^3.0.1" }, "scripts": { "publish-module": "node ../../scripts/publish.js language", diff --git a/packages/google-cloud-language/system-test/language.js b/packages/google-cloud-language/system-test/language.js index 4a21bc1c453..3d30af222d9 100644 --- a/packages/google-cloud-language/system-test/language.js +++ b/packages/google-cloud-language/system-test/language.js @@ -20,7 +20,7 @@ var assert = require('assert'); var is = require('is'); var Storage = require('@google-cloud/storage'); var through = require('through2'); -var uuid = require('node-uuid'); +var uuid = require('uuid'); var env = require('../../../system-test/env.js'); var Language = require('../'); From 81128ffc9d5b9f61042a7e135a51f212986f7014 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 5 Dec 2016 16:00:35 -0800 Subject: [PATCH 047/488] Botkit-based NL API bot (#270) * Botkit-based NL API bot * Fix lint issues. Refactor to best practices. Start adding tests. * Fix typo. * README improvements, fixes to the rc .yaml generation, minor script fixes * Finished tests. * fix typos, add info in parent README --- packages/google-cloud-language/samples/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index c07335b54a4..85cac447a48 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -14,6 +14,7 @@ Learning API. * [Setup](#setup) * [Samples](#samples) * [Analyze](#analyze) + * [Slackbot](#slackbot) ## Setup @@ -61,3 +62,11 @@ For more information, see https://cloud.google.com/natural-language/docs [analyze_docs]: https://cloud.google.com/natural-language/docs [analyze_code]: analyze.js + +### Slackbot + +The example in the [slackbot](./slackbot) subdirectory shows a Slack bot built using the +[Botkit](https://github.com/howdyai/botkit) library. +It runs on a Google Container Engine (Kubernetes) cluster, and uses one of the Google Cloud Platform's ML +APIs, the Natural Language (NL) API, to interact in a Slack channel. +See its [README](./slackbot/README.md) for more information. From 2d6a0729c96a69cb29088531c15b63e06e03a966 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 8 Dec 2016 18:34:53 -0500 Subject: [PATCH 048/488] prepare READMEs for beta release (#1864) --- packages/google-cloud-language/README.md | 19 ++++++------------- packages/google-cloud-language/src/index.js | 6 ------ 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index da7d35ddc5f..d586725cbcc 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -1,8 +1,6 @@ -# @google-cloud/language +# @google-cloud/language ([Alpha][versioning]) > Google Cloud Natural Language Client Library for Node.js -> **This is a Beta release of Google Cloud Natural Language.** This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes. - *Looking for more Google APIs than just Natural Language? You might want to check out [`google-cloud`][google-cloud].* - [API Documentation][gcloud-language-docs] @@ -77,24 +75,18 @@ var language = require('@google-cloud/language')({ It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Google Cloud services. -### On Google Compute Engine +### On Google Cloud Platform -If you are running this client on Google Compute Engine, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access. +If you are running this client on Google Cloud Platform, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access. ``` js -// Authenticating on a global basis. -var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' - -var language = require('@google-cloud/language')({ - projectId: projectId -}); - +var language = require('@google-cloud/language')(); // ...you're good to go! ``` ### Elsewhere -If you are not running this client on Google Compute Engine, you need a Google Developers service account. To create a service account: +If you are not running this client on Google Cloud Platform, you need a Google Developers service account. To create a service account: 1. Visit the [Google Developers Console][dev-console]. 2. Create a new project or click on an existing project. @@ -121,6 +113,7 @@ var language = require('@google-cloud/language')({ ``` +[versioning]: https://github.com/GoogleCloudPlatform/google-cloud-node#versioning [google-cloud]: https://github.com/GoogleCloudPlatform/google-cloud-node/ [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using [dev-console]: https://console.developers.google.com/project diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index fe9c6061516..cd4e975cd90 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -32,12 +32,6 @@ var v1 = require('./v1'); var Document = require('./document.js'); /** - *

- * **This is a Beta release of Google Cloud Natural Language.** This API is - * not covered by any SLA or deprecation policy and may be subject to - * backward-incompatible changes. - *

- * * The [Google Cloud Natural Language](https://cloud.google.com/natural-language/docs) * API provides natural language understanding technologies to developers, * including sentiment analysis, entity recognition, and syntax analysis. This From 3f4fca07217c868dabbb3a50583f6be0feccaa92 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 8 Dec 2016 19:43:39 -0500 Subject: [PATCH 049/488] all: update dependencies --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 87868235262..0c1a197daef 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,7 +52,7 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.8.0", + "@google-cloud/common": "^0.9.0", "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.10.0", From 2c9beac7dc85f75d302f905a93a3bbbb9768175d Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 8 Dec 2016 19:47:06 -0500 Subject: [PATCH 050/488] language @ 0.7.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 0c1a197daef..2653d851a73 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.6.3", + "version": "0.7.0", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From 7d7e47a2357eaa9f7d26f894d6590c7b0e9b811b Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 9 Dec 2016 15:16:00 -0800 Subject: [PATCH 051/488] Update storage samples. (#263) * Update storage samples. * Update dependencies. --- packages/google-cloud-language/samples/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 30d16f2d7af..f59e676d38c 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -8,9 +8,9 @@ "test": "cd ..; npm run st -- language/system-test/*.test.js" }, "dependencies": { - "@google-cloud/language": "^0.6.0", - "@google-cloud/storage": "^0.4.0", - "yargs": "^6.4.0" + "@google-cloud/language": "0.7.0", + "@google-cloud/storage": "0.6.0", + "yargs": "6.5.0" }, "engines": { "node": ">=4.3.2" From f1890fb43c0376fad200b6880239d806c608decd Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 9 Jan 2017 14:02:52 -0800 Subject: [PATCH 052/488] Switch to Yarn for CI build. (#290) --- packages/google-cloud-language/samples/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index f59e676d38c..4c59f44b781 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -5,12 +5,12 @@ "license": "Apache Version 2.0", "author": "Google Inc.", "scripts": { - "test": "cd ..; npm run st -- language/system-test/*.test.js" + "test": "cd ..; npm run st -- --verbose language/system-test/*.test.js" }, "dependencies": { "@google-cloud/language": "0.7.0", "@google-cloud/storage": "0.6.0", - "yargs": "6.5.0" + "yargs": "6.6.0" }, "engines": { "node": ">=4.3.2" From 1d07537fd9aa59fd86758c6282ca9c1c845ecd45 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 9 Jan 2017 20:44:57 -0500 Subject: [PATCH 053/488] update dependencies --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 2653d851a73..2ca95bb2bfd 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,7 +52,7 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.9.0", + "@google-cloud/common": "^0.11.0", "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.10.0", From 8d1797ae1a90c97a4409a1287f288e3da1092549 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 2 Feb 2017 13:36:19 -0500 Subject: [PATCH 054/488] update deps --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 2ca95bb2bfd..60a83363988 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,7 +52,7 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.11.0", + "@google-cloud/common": "^0.12.0", "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.10.0", From e71b72d9fac99ddfa4eaf82460009ed702f1b0cf Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 2 Feb 2017 13:49:05 -0500 Subject: [PATCH 055/488] language @ 0.8.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 60a83363988..34f46843b84 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.7.0", + "version": "0.8.0", "author": "Google Inc.", "description": "Google Cloud Natural Language Client Library for Node.js", "contributors": [ From b85891638ce2d9d2d7589bcbc827eb94fba5ba0e Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 6 Feb 2017 14:59:32 -0800 Subject: [PATCH 056/488] Update dependencies. --- packages/google-cloud-language/samples/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 4c59f44b781..957b286869d 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -8,8 +8,8 @@ "test": "cd ..; npm run st -- --verbose language/system-test/*.test.js" }, "dependencies": { - "@google-cloud/language": "0.7.0", - "@google-cloud/storage": "0.6.0", + "@google-cloud/language": "0.8.0", + "@google-cloud/storage": "0.7.0", "yargs": "6.6.0" }, "engines": { From 76653face721b27caf75558bf7769ff429e19ccb Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 14 Feb 2017 12:18:51 -0500 Subject: [PATCH 057/488] update deps --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 34f46843b84..166ac4d2f82 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -56,7 +56,7 @@ "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.10.0", - "google-proto-files": "^0.8.5", + "google-proto-files": "^0.9.1", "is": "^3.0.1", "propprop": "^0.3.1", "string-format-obj": "^1.1.0" From 54555fe6c038ec950912ccaf9eca939d17593ede Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Fri, 24 Feb 2017 08:14:49 -0800 Subject: [PATCH 058/488] Update language client autogen. (#2022) Updates #2019 --- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/src/index.js | 5 ++ .../google-cloud-language/src/v1/index.js | 9 +-- .../src/v1/language_service_client.js | 64 +++++++++++-------- .../v1/language_service_client_config.json | 12 ++-- packages/google-cloud-language/test/index.js | 8 ++- 6 files changed, 59 insertions(+), 41 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 166ac4d2f82..2e47b73d7a7 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -55,7 +55,7 @@ "@google-cloud/common": "^0.12.0", "arrify": "^1.0.1", "extend": "^3.0.0", - "google-gax": "^0.10.0", + "google-gax": "^0.12.0", "google-proto-files": "^0.9.1", "is": "^3.0.1", "propprop": "^0.3.1", diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index cd4e975cd90..9cdc97b1523 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -57,6 +57,11 @@ function Language(options) { return new Language(options); } + options = extend({}, options, { + libName: 'gccl', + libVersion: require('../package.json').version + }); + this.api = { Language: v1(options).languageServiceClient(options) }; diff --git a/packages/google-cloud-language/src/v1/index.js b/packages/google-cloud-language/src/v1/index.js index 7d76f854877..d6769940525 100644 --- a/packages/google-cloud-language/src/v1/index.js +++ b/packages/google-cloud-language/src/v1/index.js @@ -1,11 +1,11 @@ -/*! - * Copyright 2016 Google Inc. All Rights Reserved. +/* + * Copyright 2016 Google Inc. All rights reserved. * * 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 * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,8 +16,8 @@ 'use strict'; var languageServiceClient = require('./language_service_client'); -var extend = require('extend'); var gax = require('google-gax'); +var extend = require('extend'); function v1(options) { options = extend({ @@ -29,4 +29,5 @@ function v1(options) { v1.SERVICE_ADDRESS = languageServiceClient.SERVICE_ADDRESS; v1.ALL_SCOPES = languageServiceClient.ALL_SCOPES; + module.exports = v1; diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index a927916a1ec..384343903d3 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -62,31 +62,36 @@ var ALL_SCOPES = [ * @class */ function LanguageServiceClient(gaxGrpc, grpcClients, opts) { - opts = opts || {}; - var servicePath = opts.servicePath || SERVICE_ADDRESS; - var port = opts.port || DEFAULT_SERVICE_PORT; - var sslCreds = opts.sslCreds || null; - var clientConfig = opts.clientConfig || {}; - var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.version; + opts = extend({ + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {} + }, opts); var googleApiClient = [ - appName + '/' + appVersion, - CODE_GEN_NAME_VERSION, + 'gl-node/' + process.versions.node, + CODE_GEN_NAME_VERSION + ]; + if (opts.libName && opts.libVersion) { + googleApiClient.push(opts.libName + '/' + opts.libVersion); + } + googleApiClient.push( 'gax/' + gax.version, - 'nodejs/' + process.version].join(' '); + 'grpc/' + gaxGrpc.grpcVersion + ); var defaults = gaxGrpc.constructSettings( 'google.cloud.language.v1.LanguageService', configData, - clientConfig, - {'x-goog-api-client': googleApiClient}); + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); + var self = this; + + this.auth = gaxGrpc.auth; var languageServiceStub = gaxGrpc.createStub( - servicePath, - port, - grpcClients.languageServiceClient.google.cloud.language.v1.LanguageService, - {sslCreds: sslCreds}); + grpcClients.google.cloud.language.v1.LanguageService, + opts); var languageServiceStubMethods = [ 'analyzeSentiment', 'analyzeEntities', @@ -94,15 +99,27 @@ function LanguageServiceClient(gaxGrpc, grpcClients, opts) { 'annotateText' ]; languageServiceStubMethods.forEach(function(methodName) { - this['_' + methodName] = gax.createApiCall( + self['_' + methodName] = gax.createApiCall( languageServiceStub.then(function(languageServiceStub) { - return languageServiceStub[methodName].bind(languageServiceStub); + return function() { + var args = Array.prototype.slice.call(arguments, 0); + return languageServiceStub[methodName].apply(languageServiceStub, args); + }; }), defaults[methodName], null); - }.bind(this)); + }); } +/** + * Get the project ID used by this class. + * @aram {function(Error, string)} callback - the callback to be called with + * the current project Id. + */ +LanguageServiceClient.prototype.getProjectId = function(callback) { + return this.auth.getProjectId(callback); +}; + // Service calls /** @@ -330,9 +347,6 @@ function LanguageServiceClientBuilder(gaxGrpc) { }]); extend(this, languageServiceClient.google.cloud.language.v1); - var grpcClients = { - languageServiceClient: languageServiceClient - }; /** * Build a new instance of {@link LanguageServiceClient}. @@ -347,13 +361,9 @@ function LanguageServiceClientBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.appName - * The codename of the calling service. - * @param {String=} opts.appVersion - * The version of the calling service. */ this.languageServiceClient = function(opts) { - return new LanguageServiceClient(gaxGrpc, grpcClients, opts); + return new LanguageServiceClient(gaxGrpc, languageServiceClient, opts); }; extend(this.languageServiceClient, LanguageServiceClient); } diff --git a/packages/google-cloud-language/src/v1/language_service_client_config.json b/packages/google-cloud-language/src/v1/language_service_client_config.json index 5c946b6bc60..202d5b0d427 100644 --- a/packages/google-cloud-language/src/v1/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1/language_service_client_config.json @@ -2,13 +2,11 @@ "interfaces": { "google.cloud.language.v1.LanguageService": { "retry_codes": { - "retry_codes_def": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - } + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] }, "retry_params": { "default": { diff --git a/packages/google-cloud-language/test/index.js b/packages/google-cloud-language/test/index.js index cb2a2189550..e9658ade128 100644 --- a/packages/google-cloud-language/test/index.js +++ b/packages/google-cloud-language/test/index.js @@ -103,11 +103,15 @@ describe('Language', function() { var expectedLanguageService = {}; fakeV1Override = function(options) { - assert.strictEqual(options, OPTIONS); + var expected = { + libName: 'gccl', + libVersion: require('../package.json').version + }; + assert.deepStrictEqual(options, expected); return { languageServiceClient: function(options) { - assert.strictEqual(options, OPTIONS); + assert.deepStrictEqual(options, expected); return expectedLanguageService; } }; From 8c83bb903626f6bd9021f41fe10b38bb848b42af Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 2 Mar 2017 20:27:44 -0500 Subject: [PATCH 059/488] docs: change Google Cloud to Cloud (#1995) --- packages/google-cloud-language/README.md | 4 ++-- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/src/index.js | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index d586725cbcc..c5ecfb6b059 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -1,5 +1,5 @@ # @google-cloud/language ([Alpha][versioning]) -> Google Cloud Natural Language Client Library for Node.js +> Cloud Natural Language Client Library for Node.js *Looking for more Google APIs than just Natural Language? You might want to check out [`google-cloud`][google-cloud].* @@ -73,7 +73,7 @@ var language = require('@google-cloud/language')({ ## Authentication -It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Google Cloud services. +It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Cloud services. ### On Google Cloud Platform diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 2e47b73d7a7..05da8992aa7 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -2,7 +2,7 @@ "name": "@google-cloud/language", "version": "0.8.0", "author": "Google Inc.", - "description": "Google Cloud Natural Language Client Library for Node.js", + "description": "Cloud Natural Language Client Library for Node.js", "contributors": [ { "name": "Burcu Dogan", diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 9cdc97b1523..02c8ec7d27f 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -32,7 +32,7 @@ var v1 = require('./v1'); var Document = require('./document.js'); /** - * The [Google Cloud Natural Language](https://cloud.google.com/natural-language/docs) + * The [Cloud Natural Language](https://cloud.google.com/natural-language/docs) * API provides natural language understanding technologies to developers, * including sentiment analysis, entity recognition, and syntax analysis. This * API is part of the larger Cloud Machine Learning API. @@ -47,7 +47,7 @@ var Document = require('./document.js'); * @constructor * @alias module:language * - * @resource [Google Cloud Natural Language API Documentation]{@link https://cloud.google.com/natural-language/docs} + * @resource [Cloud Natural Language API Documentation]{@link https://cloud.google.com/natural-language/docs} * * @param {object} options - [Configuration object](#/docs). */ @@ -99,7 +99,7 @@ function Language(options) { * language.annotate('Hello!', callback); * * //- - * // Or, provide a reference to a file hosted on Google Cloud Storage. + * // Or, provide a reference to a file hosted on Cloud Storage. * //- * var gcs = require('@google-cloud/storage')({ * projectId: 'grape-spaceship-123' @@ -191,7 +191,7 @@ Language.prototype.annotate = function(content, options, callback) { * language.detectEntities('Axel Foley is from Detroit', callback); * * //- - * // Or, provide a reference to a file hosted on Google Cloud Storage. + * // Or, provide a reference to a file hosted on Cloud Storage. * //- * var gcs = require('@google-cloud/storage')({ * projectId: 'grape-spaceship-123' @@ -282,7 +282,7 @@ Language.prototype.detectEntities = function(content, options, callback) { * language.detectSentiment('Hello!', callback); * * //- - * // Or, provide a reference to a file hosted on Google Cloud Storage. + * // Or, provide a reference to a file hosted on Cloud Storage. * //- * var gcs = require('@google-cloud/storage')({ * projectId: 'grape-spaceship-123' @@ -364,7 +364,7 @@ Language.prototype.detectSentiment = function(content, options, callback) { * language.detectSyntax('Axel Foley is from Detroit', callback); * * //- - * // Or, provide a reference to a file hosted on Google Cloud Storage. + * // Or, provide a reference to a file hosted on Cloud Storage. * //- * var gcs = require('@google-cloud/storage')({ * projectId: 'grape-spaceship-123' @@ -445,7 +445,7 @@ Language.prototype.detectSyntax = function(content, options, callback) { * var document = language.document('Inline content of an unknown type.'); * * //- - * // Or, provide a reference to a file hosted on Google Cloud Storage. + * // Or, provide a reference to a file hosted on Cloud Storage. * //- * var gcs = require('@google-cloud/storage')({ * projectId: 'grape-spaceship-123' @@ -490,7 +490,7 @@ Language.prototype.document = function(config) { * var document = language.html('<h1>Document Title</h1>'); * * //- - * // Or, provide a reference to a file hosted on Google Cloud Storage. + * // Or, provide a reference to a file hosted on Cloud Storage. * //- * var gcs = require('@google-cloud/storage')({ * projectId: 'grape-spaceship-123' @@ -540,7 +540,7 @@ Language.prototype.html = function(content, options) { * var document = language.text('This is using inline text content.'); * * //- - * // Or, provide a reference to a file hosted on Google Cloud Storage. + * // Or, provide a reference to a file hosted on Cloud Storage. * //- * var gcs = require('@google-cloud/storage')({ * projectId: 'grape-spaceship-123' From 802cd276d3a700337ccd27b2f1222cec3e77c273 Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Thu, 2 Mar 2017 17:28:37 -0800 Subject: [PATCH 060/488] Fix the ordering of x-goog-api-client info (#2037) --- .../google-cloud-language/src/v1/language_service_client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 384343903d3..3ff283512f9 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -69,13 +69,13 @@ function LanguageServiceClient(gaxGrpc, grpcClients, opts) { }, opts); var googleApiClient = [ - 'gl-node/' + process.versions.node, - CODE_GEN_NAME_VERSION + 'gl-node/' + process.versions.node ]; if (opts.libName && opts.libVersion) { googleApiClient.push(opts.libName + '/' + opts.libVersion); } googleApiClient.push( + CODE_GEN_NAME_VERSION, 'gax/' + gax.version, 'grpc/' + gaxGrpc.grpcVersion ); From 1b7f20676e0e5bf38dc63e68e9386b7a4593dd48 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 3 Mar 2017 15:23:24 -0500 Subject: [PATCH 061/488] update gax & google-proto-files --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 05da8992aa7..fa6a3e2e68f 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -56,7 +56,7 @@ "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.12.0", - "google-proto-files": "^0.9.1", + "google-proto-files": "^0.10.0", "is": "^3.0.1", "propprop": "^0.3.1", "string-format-obj": "^1.1.0" From 31b6169b3253eeff9955cc14da6a14c881996914 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 6 Mar 2017 17:33:46 -0500 Subject: [PATCH 062/488] language: allow raw API terminology (#2055) --- .../google-cloud-language/src/document.js | 21 +++++++++++-------- .../google-cloud-language/test/document.js | 20 ++++++++++++++++++ 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index 35fb9befd28..21a4e496fe1 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -231,19 +231,19 @@ Document.PART_OF_SPEECH = { * @resource [documents.annotateText API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText} * * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText#request-body). + * [documents.annotateText](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/annotateText#features). * @param {boolean} options.entities - Detect the entities from this document. * By default, all features (`entities`, `sentiment`, and `syntax`) are * enabled. By overriding any of these values, all defaults are switched to - * `false`. + * `false`. (Alias for `options.extractEntities`) * @param {number} options.sentiment - Detect the sentiment from this document. * By default, all features (`entities`, `sentiment`, and `syntax`) are * enabled. By overriding any of these values, all defaults are switched to - * `false`. + * `false`. (Alias for `options.extractSentiment`) * @param {boolean} options.syntax - Detect the syntax from this document. By * default, all features (`entities`, `sentiment`, and `syntax`) are * enabled. By overriding any of these values, all defaults are switched to - * `false`. + * `false`. (Alias for `options.extractDocumentSyntax`) * @param {boolean} options.verbose - Enable verbose mode for more detailed * results. Default: `false` * @param {function} callback - The callback function. @@ -522,9 +522,12 @@ Document.prototype.annotate = function(options, callback) { }; var featuresRequested = { - extractDocumentSentiment: options.sentiment === true, - extractEntities: options.entities === true, - extractSyntax: options.syntax === true + extractDocumentSentiment: + (options.extractDocumentSentiment || options.sentiment) === true, + extractEntities: + (options.extractEntities || options.entities) === true, + extractSyntax: + (options.extractSyntax || options.syntax) === true }; var numFeaturesRequested = 0; @@ -557,7 +560,7 @@ Document.prototype.annotate = function(options, callback) { language: resp.language }; - if (resp.documentSentiment) { + if (resp.documentSentiment && features.extractDocumentSentiment) { var sentiment = resp.documentSentiment; annotation.sentiment = Document.formatSentiment_(sentiment, verbose); } @@ -568,7 +571,7 @@ Document.prototype.annotate = function(options, callback) { // This prevents empty `sentences` and `tokens` arrays being returned to // users who never wanted sentences or tokens to begin with. - if (numFeaturesRequested === 0 || featuresRequested.syntax) { + if (numFeaturesRequested === 0 || featuresRequested.extractSyntax) { annotation.sentences = Document.formatSentences_(resp.sentences, verbose); annotation.tokens = Document.formatTokens_(resp.tokens, verbose); } diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js index d7b9aa770ff..9f00e774c93 100644 --- a/packages/google-cloud-language/test/document.js +++ b/packages/google-cloud-language/test/document.js @@ -305,6 +305,26 @@ describe('Document', function() { }, assert.ifError); }); + it('should honor raw API terminology', function(done) { + document.api.Language = { + annotateText: function(reqOpts) { + assert.deepEqual(reqOpts.features, { + extractDocumentSentiment: true, + extractEntities: true, + extractSyntax: true + }); + + done(); + } + }; + + document.annotate({ + extractDocumentSentiment: true, + extractEntities: true, + extractSyntax: true + }, assert.ifError); + }); + describe('error', function() { var apiResponse = {}; var error = new Error('Error.'); From 89ae105732378b3f923bbd9ba91fa518c53a1a98 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 9 Mar 2017 15:24:13 -0500 Subject: [PATCH 063/488] language: re-work encoding property (#2054) --- .../google-cloud-language/src/document.js | 65 ++++++-- packages/google-cloud-language/src/index.js | 30 ++-- .../google-cloud-language/test/document.js | 144 +++++++++++++++--- 3 files changed, 195 insertions(+), 44 deletions(-) diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index 21a4e496fe1..93caf8a4ef7 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -44,8 +44,6 @@ var prop = require('propprop'); * object to specify the encoding and/or language of the document, use this * property to pass the inline content of the document or a Storage File * object. - * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @return {module:language/document} * @@ -69,13 +67,10 @@ function Document(language, config) { var content = config.content || config; this.api = language.api; + this.encodingType = this.detectEncodingType_(config); this.document = {}; - if (config.encoding) { - this.encodingType = config.encoding.toUpperCase().replace(/[ -]/g, ''); - } - if (config.language) { this.document.language = config.language; } @@ -98,6 +93,10 @@ function Document(language, config) { }); } else { this.document.content = content; + + if (Buffer.isBuffer(content)) { + this.encodingType = 'UTF8'; + } } } @@ -232,6 +231,10 @@ Document.PART_OF_SPEECH = { * * @param {object=} options - Configuration object. See * [documents.annotateText](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/annotateText#features). + * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also + * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: + * 'UTF8' if a Buffer, otherwise 'UTF16'. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {boolean} options.entities - Detect the entities from this document. * By default, all features (`entities`, `sentiment`, and `syntax`) are * enabled. By overriding any of these values, all defaults are switched to @@ -547,7 +550,7 @@ Document.prototype.annotate = function(options, callback) { this.api.Language.annotateText({ document: this.document, features: features, - encodingType: this.encodingType + encodingType: this.detectEncodingType_(options) }, function(err, resp) { if (err) { callback(err, null, resp); @@ -587,6 +590,10 @@ Document.prototype.annotate = function(options, callback) { * * @param {object=} options - Configuration object. See * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities#request-body). + * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also + * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: + * 'UTF8' if a Buffer, otherwise 'UTF16'. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {boolean} options.verbose - Enable verbose mode for more detailed * results. Default: `false` * @param {function} callback - The callback function. @@ -699,7 +706,7 @@ Document.prototype.detectEntities = function(options, callback) { this.api.Language.analyzeEntities({ document: this.document, - encodingType: this.encodingType + encodingType: this.detectEncodingType_(options) }, function(err, resp) { if (err) { callback(err, null, resp); @@ -720,6 +727,10 @@ Document.prototype.detectEntities = function(options, callback) { * * @param {object=} options - Configuration object. See * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment#request-body). + * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also + * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: + * 'UTF8' if a Buffer, otherwise 'UTF16'. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {boolean} options.verbose - Enable verbose mode for more detailed * results. Default: `false` * @param {function} callback - The callback function. @@ -784,7 +795,7 @@ Document.prototype.detectSentiment = function(options, callback) { this.api.Language.analyzeSentiment({ document: this.document, - encodingType: this.encodingType + encodingType: this.detectEncodingType_(options) }, function(err, resp) { if (err) { callback(err, null, resp); @@ -812,6 +823,10 @@ Document.prototype.detectSentiment = function(options, callback) { * * @param {object=} options - Configuration object. See * [documents.annotateSyntax](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax#request-body). + * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also + * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: + * 'UTF8' if a Buffer, otherwise 'UTF16'. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {boolean} options.verbose - Enable verbose mode for more detailed * results. Default: `false` * @param {function} callback - The callback function. @@ -952,7 +967,7 @@ Document.prototype.detectSyntax = function(options, callback) { this.api.Language.analyzeSyntax({ document: this.document, - encodingType: this.encodingType + encodingType: this.detectEncodingType_(options) }, function(err, resp) { if (err) { callback(err, null, resp); @@ -1126,6 +1141,36 @@ Document.sortByProperty_ = function(propertyName) { }; }; +/** + * Check if the user provided an encodingType, and map it to its API value. + * + * @param {object} options - Configuration object. + * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also + * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: + * 'UTF8' if a Buffer, otherwise 'UTF16'. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) + * @return {string} - The encodingType, as understood by the API. + */ +Document.prototype.detectEncodingType_ = function(options) { + var encoding = options.encoding || options.encodingType || this.encodingType; + + if (!encoding) { + return; + } + + encoding = encoding.toUpperCase().replace(/[ -]/g, ''); + + if (encoding === 'BUFFER') { + encoding = 'UTF8'; + } + + if (encoding === 'STRING') { + encoding = 'UTF16'; + } + + return encoding; +}; + /*! Developer Documentation * * All async methods (except for streams) will return a Promise in the event diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 02c8ec7d27f..092cbc1d613 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -81,8 +81,10 @@ function Language(options) { * File object. * @param {object=} options - Configuration object. See * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText#request-body). - * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). + * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also + * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: + * 'UTF8' if a Buffer, otherwise 'UTF16'. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. * @param {boolean} options.verbose - Enable verbose mode for more detailed @@ -173,8 +175,10 @@ Language.prototype.annotate = function(content, options, callback) { * File object. * @param {object=} options - Configuration object. See * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities#request-body). - * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). + * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also + * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: + * 'UTF8' if a Buffer, otherwise 'UTF16'. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. * @param {boolean} options.verbose - Enable verbose mode for more detailed @@ -264,8 +268,10 @@ Language.prototype.detectEntities = function(content, options, callback) { * File object. * @param {object=} options - Configuration object. See * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment#request-body). - * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). + * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also + * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: + * 'UTF8' if a Buffer, otherwise 'UTF16'. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. * @param {boolean} options.verbose - Enable verbose mode for more detailed @@ -346,8 +352,10 @@ Language.prototype.detectSentiment = function(content, options, callback) { * File object. * @param {object=} options - Configuration object. See * [documents.analyzeSyntax](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax#request-body). - * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). + * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also + * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: + * 'UTF8' if a Buffer, otherwise 'UTF16'. See + * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. * @param {boolean} options.verbose - Enable verbose mode for more detailed @@ -436,8 +444,6 @@ Language.prototype.detectSyntax = function(content, options, callback) { * object to specify the encoding and/or language of the document, use this * property to pass the inline content of the document or a Storage File * object. - * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @return {module:language/document} * @@ -481,8 +487,6 @@ Language.prototype.document = function(config) { * @param {string|module:storage/file} content - Inline HTML content or a * Storage File object. * @param {object=} options - Configuration object. - * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @return {module:language/document} * @@ -531,8 +535,6 @@ Language.prototype.html = function(content, options) { * @param {string|module:storage/file} content - Inline text content or a * Storage File object. * @param {object=} options - Configuration object. - * @param {string} options.encoding - `UTF8`, `UTF16`, or `UTF32`. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType). * @param {string} options.language - The language of the text. * @return {module:language/document} * diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js index 9f00e774c93..8c2dee343dc 100644 --- a/packages/google-cloud-language/test/document.js +++ b/packages/google-cloud-language/test/document.js @@ -57,16 +57,14 @@ describe('Document', function() { }); DocumentCache = extend(true, {}, Document); + DocumentCache.prototype = extend(true, {}, Document.prototype); }); beforeEach(function() { isCustomTypeOverride = null; - for (var property in DocumentCache) { - if (DocumentCache.hasOwnProperty(property)) { - Document[property] = DocumentCache[property]; - } - } + extend(Document, DocumentCache); + Document.prototype = extend({}, DocumentCache.prototype); document = new Document(LANGUAGE, CONFIG); }); @@ -80,6 +78,22 @@ describe('Document', function() { assert(promisified); }); + it('should set the correct encodingType', function() { + var detectedEncodingType = 'detected-encoding-type'; + var config = { + content: CONFIG + }; + + Document.prototype.detectEncodingType_ = function(options) { + assert.strictEqual(options, config); + return detectedEncodingType; + }; + + var document = new Document(LANGUAGE, config); + + assert.strictEqual(document.encodingType, detectedEncodingType); + }); + it('should set the correct document for inline content', function() { assert.deepEqual(document.document, { content: CONFIG, @@ -87,15 +101,6 @@ describe('Document', function() { }); }); - it('should set and uppercase the correct encodingType', function() { - var document = new Document(LANGUAGE, { - content: CONFIG, - encoding: 'utf-8' - }); - - assert.strictEqual(document.encodingType, 'UTF8'); - }); - it('should set the correct document for content with language', function() { var document = new Document(LANGUAGE, { content: CONFIG, @@ -152,6 +157,14 @@ describe('Document', function() { encodeURIComponent(file.id), ].join('')); }); + + it('should default the encodingType to UTF8 if a Buffer', function() { + var document = new Document(LANGUAGE, { + content: new Buffer([]) + }); + + assert.strictEqual(document.encodingType, 'UTF8'); + }); }); describe('LABEL_DESCRIPTIONS', function() { @@ -266,6 +279,13 @@ describe('Document', function() { describe('annotate', function() { it('should make the correct API request', function(done) { + var detectedEncodingType = 'detected-encoding-type'; + + document.detectEncodingType_ = function(options) { + assert.deepEqual(options, {}); + return detectedEncodingType; + }; + document.api.Language = { annotateText: function(reqOpts) { assert.strictEqual(reqOpts.document, document.document); @@ -276,13 +296,12 @@ describe('Document', function() { extractSyntax: true }); - assert.strictEqual(reqOpts.encodingType, document.encodingType); + assert.strictEqual(reqOpts.encodingType, detectedEncodingType); done(); } }; - document.encodingType = 'encoding-type'; document.annotate(assert.ifError); }); @@ -542,15 +561,21 @@ describe('Document', function() { describe('detectEntities', function() { it('should make the correct API request', function(done) { + var detectedEncodingType = 'detected-encoding-type'; + + document.detectEncodingType_ = function(options) { + assert.deepEqual(options, {}); + return detectedEncodingType; + }; + document.api.Language = { analyzeEntities: function(reqOpts) { assert.strictEqual(reqOpts.document, document.document); - assert.strictEqual(reqOpts.encodingType, document.encodingType); + assert.strictEqual(reqOpts.encodingType, detectedEncodingType); done(); } }; - document.encodingType = 'encoding-type'; document.detectEntities(assert.ifError); }); @@ -631,10 +656,17 @@ describe('Document', function() { describe('detectSentiment', function() { it('should make the correct API request', function(done) { + var detectedEncodingType = 'detected-encoding-type'; + + document.detectEncodingType_ = function(options) { + assert.deepEqual(options, {}); + return detectedEncodingType; + }; + document.api.Language = { analyzeSentiment: function(reqOpts) { assert.strictEqual(reqOpts.document, document.document); - assert.strictEqual(reqOpts.encodingType, document.encodingType); + assert.strictEqual(reqOpts.encodingType, detectedEncodingType); done(); } }; @@ -747,10 +779,17 @@ describe('Document', function() { describe('detectSyntax', function() { it('should make the correct API request', function(done) { + var detectedEncodingType = 'detected-encoding-type'; + + document.detectEncodingType_ = function(options) { + assert.deepEqual(options, {}); + return detectedEncodingType; + }; + document.api.Language = { analyzeSyntax: function(reqOpts) { assert.strictEqual(reqOpts.document, document.document); - assert.strictEqual(reqOpts.encodingType, document.encodingType); + assert.strictEqual(reqOpts.encodingType, detectedEncodingType); done(); } }; @@ -1102,4 +1141,69 @@ describe('Document', function() { ); }); }); + + describe('detectEncodingType_', function() { + it('should return if no encoding type is set', function() { + assert.strictEqual(document.detectEncodingType_({ + encoding: '' + }), undefined); + + assert.strictEqual(document.detectEncodingType_({ + encodingType: '' + }), undefined); + + document.encodingType = ''; + assert.strictEqual(document.detectEncodingType_({}), undefined); + }); + + it('should return UTF8 for BUFFER input', function() { + assert.strictEqual(document.detectEncodingType_({ + encodingType: 'buffer' + }), 'UTF8'); + }); + + it('should return UTF16 for STRING input', function() { + assert.strictEqual(document.detectEncodingType_({ + encodingType: 'string' + }), 'UTF16'); + }); + + it('should return original value', function() { + assert.strictEqual(document.detectEncodingType_({ + encodingType: 'UTF32' + }), 'UTF32'); + }); + + it('should capitilize and remove whitespace and hyphens', function() { + assert.strictEqual(document.detectEncodingType_({ + encodingType: 'utf32' + }), 'UTF32'); + + assert.strictEqual(document.detectEncodingType_({ + encodingType: 'UTF 32' + }), 'UTF32'); + + assert.strictEqual(document.detectEncodingType_({ + encodingType: 'UTF-32' + }), 'UTF32'); + }); + + it('should accept options.encoding', function() { + assert.strictEqual(document.detectEncodingType_({ + encoding: 'UTF32' + }), 'UTF32'); + }); + + it('should accept options.encodingType', function() { + assert.strictEqual(document.detectEncodingType_({ + encodingType: 'UTF32' + }), 'UTF32'); + }); + + it('should default to encodingType instance property', function() { + document.encodingType = 'utf-32'; + + assert.strictEqual(document.detectEncodingType_({}), 'UTF32'); + }); + }); }); From c2119af512a48685833292d25324e52f9b35d497 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Mon, 13 Mar 2017 14:36:35 -0400 Subject: [PATCH 064/488] language: remove verbose option (#2056) --- packages/google-cloud-language/package.json | 2 - .../google-cloud-language/src/document.js | 540 +++--------------- packages/google-cloud-language/src/index.js | 44 -- .../system-test/language.js | 260 +-------- .../google-cloud-language/test/document.js | 474 +-------------- 5 files changed, 119 insertions(+), 1201 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index fa6a3e2e68f..b24e928225e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -53,12 +53,10 @@ ], "dependencies": { "@google-cloud/common": "^0.12.0", - "arrify": "^1.0.1", "extend": "^3.0.0", "google-gax": "^0.12.0", "google-proto-files": "^0.10.0", "is": "^3.0.1", - "propprop": "^0.3.1", "string-format-obj": "^1.1.0" }, "devDependencies": { diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index 93caf8a4ef7..b727a81b087 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -20,12 +20,10 @@ 'use strict'; -var arrify = require('arrify'); var common = require('@google-cloud/common'); var extend = require('extend'); var format = require('string-format-obj'); var is = require('is'); -var prop = require('propprop'); /*! Developer Documentation * @@ -247,73 +245,19 @@ Document.PART_OF_SPEECH = { * default, all features (`entities`, `sentiment`, and `syntax`) are * enabled. By overriding any of these values, all defaults are switched to * `false`. (Alias for `options.extractDocumentSyntax`) - * @param {boolean} options.verbose - Enable verbose mode for more detailed - * results. Default: `false` * @param {function} callback - The callback function. * @param {?error} callback.err - An error occurred while making this request. * @param {object} callback.annotation - The formatted API response. * @param {string} callback.annotation.language - The language detected from the * text. - * @param {number} callback.annotation.sentiment - A value in the range of - * `-1` (negative) to `1` (positive). + * @param {number} callback.annotation.sentiment - An object representing the + * overall sentiment of the text. * @param {object} callback.annotation.entities - The recognized entities from * the text, grouped by the type of entity. - * @param {string[]} callback.annotation.entities.art - Art entities detected - * from the text. This is only present if detections of this type were - * found. - * @param {string[]} callback.annotation.entities.events - Event entities - * detected from the text. This is only present if detections of this type - * were found. - * @param {string[]} callback.annotation.entities.goods - Consumer good entities - * detected from the text. This is only present if detections of this type - * were found. - * @param {string[]} callback.annotation.entities.organizations - Organization - * entities detected from the text. This is only present if detections of - * this type were found. - * @param {string[]} callback.annotation.entities.other - Other entities - * detected from the text. This is only present if detections of this type - * were found. - * @param {string[]} callback.annotation.entities.people - People entities - * detected from the text. This is only present if detections of this type - * were found. - * @param {string[]} callback.annotation.entities.places - Place entities - * detected from the text. This is only present if detections of this type - * were found. - * @param {string[]} callback.annotation.entities.unknown - Unknown entities - * detected from the text. This is only present if detections of this type - * were found. * @param {string[]} callback.annotation.sentences - Sentences detected from the * text. * @param {object[]} callback.annotation.tokens - Parts of speech that were * detected from the text. - * @param {string} callback.annotation.tokens[].text - The piece of text - * analyzed. - * @param {string} callback.annotation.tokens[].partOfSpeech - A description of - * the part of speech (`Noun (common and propert)`, - * `Verb (all tenses and modes)`, etc.). - * @param {string} callback.annotation.tokens[].tag - A short code - * for the type of speech (`NOUN`, `VERB`, etc.). - * @param {string} callback.annotations.tokens[].aspect - The characteristic of - * a verb that expresses time flow during an event. - * @param {string} callback.annotations.tokens[].case - The grammatical function - * performed by a noun or pronoun in a phrase, clause, or sentence. - * @param {string} callback.annotations.tokens[].form - Form categorizes - * different forms of verbs, adjectives, adverbs, etc. - * @param {string} callback.annotations.tokens[].gender - Gender classes of - * nouns reflected in the behaviour of associated words - * @param {string} callback.annotations.tokens[].mood - The grammatical feature - * of verbs, used for showing modality and attitude. - * @param {string} callback.annotations.tokens[].number - Count distinctions. - * @param {string} callback.annotations.tokens[].person - The distinction - * between the speaker, second person, third person, etc. - * @param {string} callback.annotations.tokens[].proper - This category shows if - * the token is part of a proper name. - * @param {string} callback.annotations.tokens[].reciprocity - Reciprocal - * features of a pronoun - * @param {string} callback.annotations.tokens[].tense - Time reference. - * @param {string} callback.annotations.tokens[].voice - The relationship - * between the action that a verb expresses and the participants identified - * by its arguments. * @param {object} callback.apiResponse - The full API response. * * @example @@ -324,98 +268,6 @@ Document.PART_OF_SPEECH = { * * // annotation = { * // language: 'en', - * // sentiment: 1, - * // entities: { - * // organizations: [ - * // 'Google' - * // ], - * // places: [ - * // 'American' - * // ] - * // }, - * // sentences: [ - * // 'Google is an American multinational technology company ' + - * // 'specializing in Internet-related services and products.' - * // ], - * // tokens: [ - * // { - * // text: 'Google', - * // partOfSpeech: 'Noun (common and proper)', - * // tag: 'NOUN', - * // aspect: 'PERFECTIVE', - * // case: 'ADVERBIAL', - * // form: 'ADNOMIAL', - * // gender: 'FEMININE', - * // mood: 'IMPERATIVE', - * // number: 'SINGULAR', - * // person: 'FIRST', - * // proper: 'PROPER', - * // reciprocity: 'RECIPROCAL', - * // tense: 'PAST', - * // voice: 'PASSIVE' - * // }, - * // { - * // text: 'is', - * // partOfSpeech: 'Verb (all tenses and modes)', - * // tag: 'VERB', - * // aspect: 'PERFECTIVE', - * // case: 'ADVERBIAL', - * // form: 'ADNOMIAL', - * // gender: 'FEMININE', - * // mood: 'IMPERATIVE', - * // number: 'SINGULAR', - * // person: 'FIRST', - * // proper: 'PROPER', - * // reciprocity: 'RECIPROCAL', - * // tense: 'PAST', - * // voice: 'PASSIVE' - * // }, - * // ... - * // ] - * // } - * }); - * - * //- - * // To request only certain annotation types, provide an options object. - * //- - * var options = { - * entities: true, - * sentiment: true - * }; - * - * document.annotate(options, function(err, annotation) { - * if (err) { - * // Error handling omitted. - * } - * - * // annotation = { - * // language: 'en', - * // sentiment: 1, - * // entities: { - * // organizations: [ - * // 'Google' - * // ], - * // places: [ - * // 'American' - * // ] - * // } - * // } - * }); - * - * //- - * // Verbose mode may also be enabled for more detailed results. - * //- - * var options = { - * verbose: true - * }; - * - * document.annotate(options, function(err, annotation) { - * if (err) { - * // Error handling omitted. - * } - * - * // annotation = { - * // language: 'en', * // sentiment: { * // score: 1, * // magnitude: 4 @@ -505,6 +357,70 @@ Document.PART_OF_SPEECH = { * }); * * //- + * // To request only certain annotation types, provide an options object. + * //- + * var options = { + * entities: true, + * sentiment: true + * }; + * + * document.annotate(function(err, annotation) { + * if (err) { + * // Error handling omitted. + * } + * + * // annotation = { + * // language: 'en', + * // sentiment: { + * // score: 1, + * // magnitude: 4 + * // }, + * // entities: { + * // organizations: [ + * // { + * // name: 'Google', + * // type: 'ORGANIZATION', + * // metadata: { + * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' + * // }, + * // salience: 0.65137446, + * // mentions: [ + * // { + * // text: { + * // content: 'Google', + * // beginOffset: -1 + * // }, + * // type: 'PROPER' + * // } + * // ] + * // } + * // ], + * // places: [ + * // { + * // name: 'American', + * // type: 'LOCATION', + * // metadata: { + * // wikipedia_url: 'http://en.wikipedia.org/wiki/United_States' + * // }, + * // salience: 0.13947370648384094, + * // mentions: [ + * // { + * // text: [ + * // { + * // content: 'American', + * // beginOffset: -1 + * // }, + * // type: 'PROPER' + * // ] + * // } + * // ] + * // } + * // ] + * // }, + * // } + * }); + * + * //- * // If the callback is omitted, we'll return a Promise. * //- * document.annotate().then(function(data) { @@ -545,8 +461,6 @@ Document.prototype.annotate = function(options, callback) { features = featuresRequested; } - var verbose = options.verbose === true; - this.api.Language.annotateText({ document: this.document, features: features, @@ -564,19 +478,18 @@ Document.prototype.annotate = function(options, callback) { }; if (resp.documentSentiment && features.extractDocumentSentiment) { - var sentiment = resp.documentSentiment; - annotation.sentiment = Document.formatSentiment_(sentiment, verbose); + annotation.sentiment = resp.documentSentiment; } if (resp.entities) { - annotation.entities = Document.formatEntities_(resp.entities, verbose); + annotation.entities = resp.entities; } // This prevents empty `sentences` and `tokens` arrays being returned to // users who never wanted sentences or tokens to begin with. if (numFeaturesRequested === 0 || featuresRequested.extractSyntax) { - annotation.sentences = Document.formatSentences_(resp.sentences, verbose); - annotation.tokens = Document.formatTokens_(resp.tokens, verbose); + annotation.sentences = resp.sentences; + annotation.tokens = resp.tokens; } callback(null, annotation, originalResp); @@ -600,24 +513,6 @@ Document.prototype.annotate = function(options, callback) { * @param {?error} callback.err - An error occurred while making this request. * @param {object} callback.entities - The recognized entities from the text, * grouped by the type of entity. - * @param {string[]} callback.entities.art - Art entities detected from the - * text. This is only present if detections of this type were found. - * @param {string[]} callback.entities.events - Event entities detected from the - * text. This is only present if detections of this type were found. - * @param {string[]} callback.entities.goods - Consumer good entities detected - * from the text. This is only present if detections of this type were - * found. - * @param {string[]} callback.entities.organizations - Organization entities - * detected from the text. This is only present if detections of this type - * were found. - * @param {string[]} callback.entities.other - Other entities detected from the - * text. This is only present if detections of this type were found. - * @param {string[]} callback.entities.people - People entities detected from - * the text. This is only present if detections of this type were found. - * @param {string[]} callback.entities.places - Place entities detected from the - * text. This is only present if detections of this type were found. - * @param {string[]} callback.entities.unknown - Unknown entities detected from - * the text. This is only present if detections of this type were found. * @param {object} callback.apiResponse - The full API response. * * @example @@ -628,28 +523,6 @@ Document.prototype.annotate = function(options, callback) { * * // entities = { * // organizations: [ - * // 'Google' - * // ], - * // places: [ - * // 'American' - * // ] - * // } - * }); - * - * //- - * // Verbose mode may also be enabled for more detailed results. - * //- - * var options = { - * verbose: true - * }; - * - * document.detectEntities(options, function(err, entities) { - * if (err) { - * // Error handling omitted. - * } - * - * // entities = { - * // organizations: [ * // { * // name: 'Google', * // type: 'ORGANIZATION', @@ -702,8 +575,6 @@ Document.prototype.detectEntities = function(options, callback) { options = {}; } - var verbose = options.verbose === true; - this.api.Language.analyzeEntities({ document: this.document, encodingType: this.detectEncodingType_(options) @@ -713,10 +584,7 @@ Document.prototype.detectEntities = function(options, callback) { return; } - var originalResp = extend(true, {}, resp); - var groupedEntities = Document.formatEntities_(resp.entities, verbose); - - callback(null, groupedEntities, originalResp); + callback(null, resp.entities, resp); }); }; @@ -731,12 +599,10 @@ Document.prototype.detectEntities = function(options, callback) { * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: * 'UTF8' if a Buffer, otherwise 'UTF16'. See * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {boolean} options.verbose - Enable verbose mode for more detailed - * results. Default: `false` * @param {function} callback - The callback function. * @param {?error} callback.err - An error occurred while making this request. - * @param {number} callback.sentiment - A value in the range of `-1` (negative) - * to `1` (positive). + * @param {number} callback.sentiment - An object representing the overall + * sentiment of the text. * @param {object} callback.apiResponse - The full API response. * * @example @@ -745,21 +611,6 @@ Document.prototype.detectEntities = function(options, callback) { * // Error handling omitted. * } * - * // sentiment = 1 - * }); - * - * //- - * // Verbose mode may also be enabled for more detailed results. - * //- - * var options = { - * verbose: true - * }; - * - * document.detectSentiment(options, function(err, sentiment) { - * if (err) { - * // Error handling omitted. - * } - * * // sentiment = { * // score: 1, * // magnitude: 4, @@ -791,8 +642,6 @@ Document.prototype.detectSentiment = function(options, callback) { options = {}; } - var verbose = options.verbose === true; - this.api.Language.analyzeSentiment({ document: this.document, encodingType: this.detectEncodingType_(options) @@ -802,17 +651,7 @@ Document.prototype.detectSentiment = function(options, callback) { return; } - var originalResp = extend(true, {}, resp); - var sentiment = Document.formatSentiment_(resp.documentSentiment, verbose); - - if (verbose) { - sentiment = extend(sentiment, { - sentences: Document.formatSentences_(resp.sentences, verbose), - language: resp.language - }); - } - - callback(null, sentiment, originalResp); + callback(null, resp.documentSentiment, resp); }); }; @@ -827,17 +666,9 @@ Document.prototype.detectSentiment = function(options, callback) { * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: * 'UTF8' if a Buffer, otherwise 'UTF16'. See * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {boolean} options.verbose - Enable verbose mode for more detailed - * results. Default: `false` * @param {function} callback - The callback function. * @param {?error} callback.err - An error occurred while making this request. * @param {object} callback.syntax - The syntax recognized from the text. - * @param {string} callback.syntax.language - The language detected from the - * text. - * @param {string[]} callback.syntax.sentences - Sentences detected from the - * text. - * @param {object[]} callback.syntax.tokens - Parts of speech that were - * detected from the text. * @param {object} callback.apiResponse - The full API response. * * @example @@ -848,62 +679,6 @@ Document.prototype.detectSentiment = function(options, callback) { * * // syntax = { * // sentences: [ - * // 'Google is an American multinational technology company ' + - * // 'specializing in Internet-related services and products.' - * // ], - * // tokens: [ - * // { - * // text: 'Google', - * // partOfSpeech: 'Noun (common and proper)', - * // tag: 'NOUN', - * // aspect: 'PERFECTIVE', - * // case: 'ADVERBIAL', - * // form: 'ADNOMIAL', - * // gender: 'FEMININE', - * // mood: 'IMPERATIVE', - * // number: 'SINGULAR', - * // person: 'FIRST', - * // proper: 'PROPER', - * // reciprocity: 'RECIPROCAL', - * // tense: 'PAST', - * // voice: 'PASSIVE' - * // }, - * // { - * // text: 'is', - * // partOfSpeech: 'Verb (all tenses and modes)', - * // tag: 'VERB', - * // aspect: 'PERFECTIVE', - * // case: 'ADVERBIAL', - * // form: 'ADNOMIAL', - * // gender: 'FEMININE', - * // mood: 'IMPERATIVE', - * // number: 'SINGULAR', - * // person: 'FIRST', - * // proper: 'PROPER', - * // reciprocity: 'RECIPROCAL', - * // tense: 'PAST', - * // voice: 'PASSIVE' - * // }, - * // ... - * // ], - * // language: 'en' - * // } - * }); - * - * //- - * // Verbose mode may also be enabled for more detailed results. - * //- - * var options = { - * verbose: true - * }; - * - * document.detectSyntax(options, function(err, syntax) { - * if (err) { - * // Error handling omitted. - * } - * - * // syntax = { - * // sentences: [ * // { * // text: { * // content: @@ -963,8 +738,6 @@ Document.prototype.detectSyntax = function(options, callback) { options = {}; } - var verbose = options.verbose === true; - this.api.Language.analyzeSyntax({ document: this.document, encodingType: this.detectEncodingType_(options) @@ -974,173 +747,10 @@ Document.prototype.detectSyntax = function(options, callback) { return; } - var originalResp = extend(true, {}, resp); - var syntax = Document.formatTokens_(resp.tokens, verbose); - - if (verbose) { - syntax = { - tokens: syntax, - sentences: Document.formatSentences_(resp.sentences, verbose), - language: resp.language - }; - } - - callback(null, syntax, originalResp); + callback(null, resp.tokens, resp); }); }; -/** - * Take a raw response from the API and make it more user-friendly. - * - * @private - * - * @param {object} entities - A group of entities returned from the API. - * @param {boolean} verbose - Enable verbose mode for more detailed results. - * @return {object} - The formatted entity object. - */ -Document.formatEntities_ = function(entities, verbose) { - var GROUP_NAME_TO_TYPE = { - UNKNOWN: 'unknown', - PERSON: 'people', - LOCATION: 'places', - ORGANIZATION: 'organizations', - EVENT: 'events', - WORK_OF_ART: 'art', - CONSUMER_GOOD: 'goods', - OTHER: 'other' - }; - - var groupedEntities = entities.reduce(function(acc, entity) { - entity = extend(true, {}, entity); - - var groupName = GROUP_NAME_TO_TYPE[entity.type]; - - acc[groupName] = arrify(acc[groupName]); - acc[groupName].push(entity); - acc[groupName].sort(Document.sortByProperty_('salience')); - - return acc; - }, {}); - - if (!verbose) { - // Simplify the response to only include an array of `name`s. - for (var groupName in groupedEntities) { - if (groupedEntities.hasOwnProperty(groupName)) { - groupedEntities[groupName] = - groupedEntities[groupName].map(prop('name')); - } - } - } - - return groupedEntities; -}; - -/** - * Take a raw response from the API and make it more user-friendly. - * - * @private - * - * @param {object[]} sentences - A group of sentence detections returned from - * the API. - * @param {boolean} verbose - Enable verbose mode for more detailed results. - * @return {object[]|string[]} - The formatted sentences or sentence descriptor - * objects in verbose mode. - */ -Document.formatSentences_ = function(sentences, verbose) { - if (!verbose) { - sentences = sentences.map(prop('text')).map(prop('content')); - } - - return sentences; -}; - -/** - * Take a raw response from the API and make it more user-friendly. - * - * @private - * - * @param {object} sentiment - An analysis of the document's sentiment from the - * API. - * @param {boolean} verbose - Enable verbose mode for more detailed results. - * @return {number|object} - The sentiment represented as a number in the range - * of `-1` to `1` or an object containing `score` and `magnitude` - * measurements in verbose mode. - */ -Document.formatSentiment_ = function(sentiment, verbose) { - sentiment = { - score: sentiment.score, - magnitude: sentiment.magnitude - }; - - if (!verbose) { - sentiment = sentiment.score; - } - - return sentiment; -}; - -/** - * Take a raw response from the API and make it more user-friendly. - * - * @private - * - * @param {object[]} tokens - A group of syntax detections returned from the - * API. - * @param {boolean} verbose - Enable verbose mode for more detailed results. - * @return {number|object} - A slimmed down, simplified object or the original - * object in verbose mode. - */ -Document.formatTokens_ = function(tokens, verbose) { - if (!verbose) { - tokens = tokens.map(function(rawToken) { - var token = extend({}, rawToken.partOfSpeech, { - text: rawToken.text.content, - partOfSpeech: Document.PART_OF_SPEECH[rawToken.partOfSpeech.tag] - }); - - if (rawToken.dependencyEdge) { - var label = rawToken.dependencyEdge.label; - - token.dependencyEdge = extend({}, rawToken.dependencyEdge, { - description: Document.LABEL_DESCRIPTIONS[label] - }); - } - - for (var part in token) { - if (token.hasOwnProperty(part) && /UNKNOWN/.test(token[part])) { - token[part] = undefined; - } - } - - return token; - }); - } - - return tokens; -}; - -/** - * Comparator function to sort an array of objects by a property. - * - * @private - * - * @param {string} propertyName - The name of the property to sort by. - * @return {function} - The comparator function. - */ -Document.sortByProperty_ = function(propertyName) { - return function(entityA, entityB) { - if (entityA[propertyName] < entityB[propertyName]) { - return 1; - } - - if (entityA[propertyName] > entityB[propertyName]) { - return -1; - } - - return 0; - }; -}; - /** * Check if the user provided an encodingType, and map it to its API value. * diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 092cbc1d613..c3e39fcb76a 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -87,8 +87,6 @@ function Language(options) { * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. - * @param {boolean} options.verbose - Enable verbose mode for more detailed - * results. Default: `false` * @param {function} callback - See {module:language/document#annotate}. * * @example @@ -131,15 +129,6 @@ function Language(options) { * language.annotate('¿Dónde está la sede de Google?', options, callback); * * //- - * // Verbose mode may also be enabled for more detailed results. - * //- - * var options = { - * verbose: true - * }; - * - * language.annotate('Hello!', options, callback); - * - * //- * // If the callback is omitted, we'll return a Promise. * //- * language.annotate('Hello!').then(function(data) { @@ -181,8 +170,6 @@ Language.prototype.annotate = function(content, options, callback) { * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. - * @param {boolean} options.verbose - Enable verbose mode for more detailed - * results. Default: `false` * @param {function} callback - See {module:language/document#detectEntities}. * * @example @@ -224,15 +211,6 @@ Language.prototype.annotate = function(content, options, callback) { * language.detectEntities('Axel Foley es de Detroit', options, callback); * * //- - * // Verbose mode may also be enabled for more detailed results. - * //- - * var options = { - * verbose: true - * }; - * - * language.detectEntities('Axel Foley is from Detroit', options, callback); - * - * //- * // If the callback is omitted, we'll return a Promise. * //- * language.detectEntities('Axel Foley is from Detroit').then(function(data) { @@ -274,8 +252,6 @@ Language.prototype.detectEntities = function(content, options, callback) { * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. - * @param {boolean} options.verbose - Enable verbose mode for more detailed - * results. Default: `false` * @param {function} callback - See {module:language/document#detectSentiment}. * * @example @@ -308,15 +284,6 @@ Language.prototype.detectEntities = function(content, options, callback) { * language.detectSentiment('<h1>Document Title</h1>', options, callback); * * //- - * // Verbose mode may also be enabled for more detailed results. - * //- - * var options = { - * verbose: true - * }; - * - * language.detectSentiment('Hello!', options, callback); - * - * //- * // If the callback is omitted, we'll return a Promise. * //- * language.detectSentiment('Hello!').then(function(data) { @@ -358,8 +325,6 @@ Language.prototype.detectSentiment = function(content, options, callback) { * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {string} options.language - The language of the text. * @param {string} options.type - The type of document, either `html` or `text`. - * @param {boolean} options.verbose - Enable verbose mode for more detailed - * results. Default: `false` * @param {function} callback - See {module:language/document#detectSyntax}. * * @example @@ -401,15 +366,6 @@ Language.prototype.detectSentiment = function(content, options, callback) { * language.detectSyntax('Axel Foley es de Detroit', options, callback); * * //- - * // Verbose mode may also be enabled for more detailed results. - * //- - * var options = { - * verbose: true - * }; - * - * language.detectSyntax('Axel Foley is from Detroit', options, callback); - * - * //- * // If the callback is omitted, we'll return a Promise. * //- * language.detectSyntax('Axel Foley is from Detroit').then(function(data) { diff --git a/packages/google-cloud-language/system-test/language.js b/packages/google-cloud-language/system-test/language.js index 3d30af222d9..27b9362f2ae 100644 --- a/packages/google-cloud-language/system-test/language.js +++ b/packages/google-cloud-language/system-test/language.js @@ -203,61 +203,44 @@ describe('Language', function() { describe('annotation', function() { it('should work without creating a document', function(done) { if (!CONTENT_TYPE) { - language.annotate(CONTENT, validateAnnotationSimple(done)); + language.annotate(CONTENT, validateAnnotation(done)); return; } language.annotate( CONTENT, { type: CONTENT_TYPE }, - validateAnnotationSimple(done) + validateAnnotation(done) ); }); it('should return the correct simplified response', function(done) { - DOC.annotate(validateAnnotationSimple(done)); - }); - - it('should support verbose mode', function(done) { - DOC.annotate({ verbose: true }, validateAnnotationVerbose(done)); + DOC.annotate(validateAnnotation(done)); }); it('should return only a single feature', function(done) { DOC.annotate({ entities: true - }, validateAnnotationSingleFeatureSimple(done)); - }); - - it('should return a single feat in verbose mode', function(done) { - DOC.annotate({ - entities: true, - verbose: true - }, validateAnnotationSingleFeatureVerbose(done)); + }, validateAnnotationSingleFeature(done)); }); }); describe('entities', function() { it('should work without creating a document', function(done) { if (!CONTENT_TYPE) { - language.detectEntities(CONTENT, validateEntitiesSimple(done)); + language.detectEntities(CONTENT, validateEntities(done)); return; } language.detectEntities( CONTENT, { type: CONTENT_TYPE }, - validateEntitiesSimple(done) + validateEntities(done) ); }); it('should return the correct simplified response', function(done) { - DOC.detectEntities(validateEntitiesSimple(done)); - }); - - it('should support verbose mode', function(done) { - DOC.detectEntities({ - verbose: true - }, validateEntitiesVerbose(done)); + DOC.detectEntities(validateEntities(done)); }); }); @@ -266,7 +249,7 @@ describe('Language', function() { if (!CONTENT_TYPE) { language.detectSentiment( CONTENT, - validateSentimentSimple(done) + validateSentiment(done) ); return; } @@ -274,18 +257,12 @@ describe('Language', function() { language.detectSentiment( CONTENT, { type: CONTENT_TYPE }, - validateSentimentSimple(done) + validateSentiment(done) ); }); it('should return the correct simplified response', function(done) { - DOC.detectSentiment(validateSentimentSimple(done)); - }); - - it('should support verbose mode', function(done) { - DOC.detectSentiment({ - verbose: true - }, validateSentimentVerbose(done)); + DOC.detectSentiment(validateSentiment(done)); }); }); @@ -294,7 +271,7 @@ describe('Language', function() { if (!CONTENT_TYPE) { language.detectSyntax( CONTENT, - validateSyntaxSimple(done) + validateSyntax(done) ); return; } @@ -302,18 +279,12 @@ describe('Language', function() { language.detectSyntax( CONTENT, { type: CONTENT_TYPE }, - validateSyntaxSimple(done) + validateSyntax(done) ); }); it('should return the correct simplified response', function(done) { - DOC.detectSyntax(validateSyntaxSimple(done)); - }); - - it('should support verbose mode', function(done) { - DOC.detectSyntax({ - verbose: true - }, validateSyntaxVerbose(done)); + DOC.detectSyntax(validateSyntax(done)); }); }); }); @@ -339,100 +310,16 @@ describe('Language', function() { }); } - function validateAnnotationSimple(callback) { - return function(err, annotation, apiResponse) { - try { - assert.ifError(err); - - assert.strictEqual(annotation.language, 'en'); - - assert(is.number(annotation.sentiment)); - - assert.deepEqual(annotation.entities, { - people: ['stephen', 'david'], - places: ['michigan'] - }); - - assert.deepEqual(annotation.sentences, TEXT_CONTENT_SENTENCES); - - assert(is.array(annotation.tokens)); - assert.deepEqual(annotation.tokens[0], { - text: 'Hello', - partOfSpeech: 'Other: foreign words, typos, abbreviations', - tag: 'X', - aspect: undefined, - case: undefined, - form: undefined, - gender: undefined, - mood: undefined, - number: undefined, - person: undefined, - proper: undefined, - reciprocity: undefined, - tense: undefined, - voice: undefined, - dependencyEdge: { - description: 'Root', - label: 'ROOT', - headTokenIndex: 0 - } - }); - - assert(is.object(apiResponse)); - - callback(); - } catch(e) { - callback(e); - } - }; - } - - function validateAnnotationVerbose(callback) { + function validateAnnotation(callback) { return function(err, annotation, apiResponse) { try { assert.ifError(err); - assert.strictEqual(annotation.language, 'en'); - - assert(is.object(annotation.sentiment)); - - assert(is.array(annotation.entities.people)); - assert.strictEqual(annotation.entities.people.length, 2); - assert(is.object(annotation.entities.people[0])); - - assert(is.array(annotation.sentences)); - assert(is.object(annotation.sentences[0])); - - assert(is.array(annotation.tokens)); - assert(is.object(annotation.tokens[0])); - assert.strictEqual(annotation.tokens[0].text.content, 'Hello'); - - assert(is.object(apiResponse)); - - callback(); - } catch(e) { - callback(e); - } - }; - } - - function validateAnnotationSingleFeatureSimple(callback) { - return function(err, annotation, apiResponse) { - try { - assert.ifError(err); - - assert.strictEqual(annotation.language, 'en'); - - assert.deepEqual(annotation.entities, { - people: ['stephen', 'david'], - places: ['michigan'] - }); - - assert.strictEqual(annotation.sentences, undefined); - assert.strictEqual(annotation.sentiment, undefined); - assert.strictEqual(annotation.tokens, undefined); - - assert(is.object(apiResponse)); + assert.strictEqual(annotation.language, apiResponse.language); + assert.deepEqual(annotation.sentiment, apiResponse.documentSentiment); + assert.deepEqual(annotation.entities, apiResponse.entities); + assert.deepEqual(annotation.sentences, apiResponse.sentences); + assert.deepEqual(annotation.tokens, apiResponse.tokens); callback(); } catch(e) { @@ -441,16 +328,13 @@ describe('Language', function() { }; } - function validateAnnotationSingleFeatureVerbose(callback) { + function validateAnnotationSingleFeature(callback) { return function(err, annotation, apiResponse) { try { assert.ifError(err); - assert.strictEqual(annotation.language, 'en'); - - assert(is.array(annotation.entities.people)); - assert.strictEqual(annotation.entities.people.length, 2); - assert(is.object(annotation.entities.people[0])); + assert.strictEqual(annotation.language, apiResponse.language); + assert.deepEqual(annotation.entities, apiResponse.entities); assert.strictEqual(annotation.sentences, undefined); assert.strictEqual(annotation.sentiment, undefined); @@ -465,50 +349,11 @@ describe('Language', function() { }; } - function validateEntitiesSimple(callback) { + function validateEntities(callback) { return function(err, entities, apiResponse) { try { assert.ifError(err); - - assert.deepEqual(entities, { - people: ['stephen', 'david'], - places: ['michigan'] - }); - - assert(is.object(apiResponse)); - - callback(); - } catch(e) { - callback(e); - } - }; - } - - function validateEntitiesVerbose(callback) { - return function(err, entities, apiResponse) { - try { - assert.ifError(err); - - assert(is.array(entities.people)); - assert.strictEqual(entities.people.length, 2); - assert(is.object(entities.people[0])); - - assert(is.object(apiResponse)); - - callback(); - } catch(e) { - callback(e); - } - }; - } - - function validateSentimentSimple(callback) { - return function(err, sentiment, apiResponse) { - try { - assert.ifError(err); - - assert(is.number(sentiment)); - assert(is.object(apiResponse)); + assert.strictEqual(entities, apiResponse.entities); callback(); } catch(e) { @@ -517,18 +362,11 @@ describe('Language', function() { }; } - function validateSentimentVerbose(callback) { + function validateSentiment(callback) { return function(err, sentiment, apiResponse) { try { assert.ifError(err); - - assert(is.object(sentiment)); - assert(is.number(sentiment.score)); - assert(is.number(sentiment.magnitude)); - assert.strictEqual(sentiment.language, 'en'); - assert.strictEqual(sentiment.sentences.length, 2); - - assert(is.object(apiResponse)); + assert.strictEqual(sentiment, apiResponse.documentSentiment); callback(); } catch(e) { @@ -537,53 +375,11 @@ describe('Language', function() { }; } - function validateSyntaxSimple(callback) { - return function(err, tokens, apiResponse) { - try { - assert.ifError(err); - assert.strictEqual(tokens.length, 17); - assert.deepEqual(tokens[0], { - aspect: undefined, - case: undefined, - form: undefined, - gender: undefined, - mood: undefined, - number: undefined, - partOfSpeech: 'Other: foreign words, typos, abbreviations', - person: undefined, - proper: undefined, - reciprocity: undefined, - tag: 'X', - tense: undefined, - text: 'Hello', - voice: undefined, - dependencyEdge: { - description: 'Root', - headTokenIndex: 0, - label: 'ROOT' - } - }); - - assert(is.object(apiResponse)); - - callback(); - } catch (e) { - callback(e); - } - }; - } - - function validateSyntaxVerbose(callback) { + function validateSyntax(callback) { return function(err, syntax, apiResponse) { try { assert.ifError(err); - assert.strictEqual(syntax.sentences.length, 2); - assert(is.object(syntax.sentences[0])); - assert.strictEqual(syntax.tokens.length, 17); - assert(is.object(syntax.tokens[0])); - assert.strictEqual(syntax.language, 'en'); - - assert(is.object(apiResponse)); + assert.strictEqual(syntax, apiResponse.tokens); callback(); } catch (e) { diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js index 8c2dee343dc..ab0a5b55c36 100644 --- a/packages/google-cloud-language/test/document.js +++ b/packages/google-cloud-language/test/document.js @@ -18,7 +18,6 @@ var assert = require('assert'); var extend = require('extend'); -var prop = require('propprop'); var proxyquire = require('proxyquire'); var util = require('@google-cloud/common').util; @@ -402,13 +401,6 @@ describe('Document', function() { }; } - beforeEach(function() { - Document.formatSentiment_ = util.noop; - Document.formatEntities_ = util.noop; - Document.formatSentences_ = util.noop; - Document.formatTokens_ = util.noop; - }); - it('should always return the language', function(done) { var apiResponse = apiResponses.default; @@ -431,48 +423,28 @@ describe('Document', function() { annotateText: createAnnotateTextWithResponse(apiResponse) }; - var formattedSentences = []; - Document.formatSentences_ = function(sentences, verbose) { - assert.strictEqual(sentences, apiResponse.sentences); - assert.strictEqual(verbose, false); - return formattedSentences; - }; - - var formattedTokens = []; - Document.formatTokens_ = function(tokens, verbose) { - assert.strictEqual(tokens, apiResponse.tokens); - assert.strictEqual(verbose, false); - return formattedTokens; - }; - document.annotate(function(err, annotation, apiResponse_) { assert.ifError(err); - assert.strictEqual(annotation.sentences, formattedSentences); - assert.strictEqual(annotation.tokens, formattedTokens); + assert.strictEqual(annotation.sentences, apiResponse.sentences); + assert.strictEqual(annotation.tokens, apiResponse.tokens); assert.deepEqual(apiResponse_, apiResponse); done(); }); }); - it('should return the formatted sentiment if available', function(done) { + it('should return the sentiment if available', function(done) { var apiResponse = apiResponses.withSentiment; document.api.Language = { annotateText: createAnnotateTextWithResponse(apiResponse) }; - var formattedSentiment = {}; - Document.formatSentiment_ = function(sentiment, verbose) { - assert.strictEqual(sentiment, apiResponse.documentSentiment); - assert.strictEqual(verbose, false); - return formattedSentiment; - }; - document.annotate(function(err, annotation, apiResponse_) { assert.ifError(err); assert.strictEqual(annotation.language, apiResponse.language); - assert.strictEqual(annotation.sentiment, formattedSentiment); + assert + .strictEqual(annotation.sentiment, apiResponse.documentSentiment); assert.deepEqual(apiResponse_, apiResponse); @@ -480,25 +452,18 @@ describe('Document', function() { }); }); - it('should return the formatted entities if available', function(done) { + it('should return the entities if available', function(done) { var apiResponse = apiResponses.withEntities; document.api.Language = { annotateText: createAnnotateTextWithResponse(apiResponse) }; - var formattedEntities = []; - Document.formatEntities_ = function(entities, verbose) { - assert.strictEqual(entities, apiResponse.entities); - assert.strictEqual(verbose, false); - return formattedEntities; - }; - document.annotate(function(err, annotation, apiResponse_) { assert.ifError(err); assert.strictEqual(annotation.language, apiResponse.language); - assert.strictEqual(annotation.entities, formattedEntities); + assert.strictEqual(annotation.entities, apiResponse.entities); assert.deepEqual(apiResponse_, apiResponse); @@ -525,37 +490,6 @@ describe('Document', function() { done(); }); }); - - it('should allow verbose mode', function(done) { - var apiResponse = apiResponses.withAll; - - document.api.Language = { - annotateText: createAnnotateTextWithResponse(apiResponse) - }; - - var numCallsWithCorrectVerbosityArgument = 0; - - function incrementVerbosityVar(_, verbose) { - if (verbose === true) { - numCallsWithCorrectVerbosityArgument++; - } - } - - Document.formatSentiment_ = incrementVerbosityVar; - Document.formatEntities_ = incrementVerbosityVar; - Document.formatSentences_ = incrementVerbosityVar; - Document.formatTokens_ = incrementVerbosityVar; - - document.annotate({ - verbose: true - }, function(err) { - assert.ifError(err); - - assert.strictEqual(numCallsWithCorrectVerbosityArgument, 4); - - done(); - }); - }); }); }); @@ -606,8 +540,6 @@ describe('Document', function() { entities: [] }; - var originalApiResponse = extend({}, apiResponse); - beforeEach(function() { document.api.Language = { analyzeEntities: function(reqOpts, callback) { @@ -616,40 +548,14 @@ describe('Document', function() { }; }); - it('should format the entities', function(done) { - var formattedEntities = {}; - - Document.formatEntities_ = function(entities, verbose) { - assert.strictEqual(entities, apiResponse.entities); - assert.strictEqual(verbose, false); - return formattedEntities; - }; - - document.detectEntities(function(err, entities) { - assert.ifError(err); - assert.strictEqual(entities, formattedEntities); - done(); - }); - }); - - it('should clone the response object', function(done) { + it('should return the entities', function(done) { document.detectEntities(function(err, entities, apiResponse_) { assert.ifError(err); - assert.notStrictEqual(apiResponse_, apiResponse); - assert.deepEqual(apiResponse_, originalApiResponse); - done(); - }); - }); - it('should allow verbose mode', function(done) { - Document.formatEntities_ = function(entities, verbose) { - assert.strictEqual(verbose, true); + assert.strictEqual(entities, apiResponse.entities); + assert.strictEqual(apiResponse_, apiResponse); done(); - }; - - document.detectEntities({ - verbose: true - }, assert.ifError); + }); }); }); }); @@ -704,11 +610,7 @@ describe('Document', function() { language: 'en' }; - var originalApiResponse = extend({}, apiResponse); - beforeEach(function() { - Document.formatSentiment_ = util.noop; - document.api.Language = { analyzeSentiment: function(reqOpts, callback) { callback(null, apiResponse); @@ -716,61 +618,12 @@ describe('Document', function() { }; }); - it('should format the sentiment', function(done) { - var formattedSentiment = {}; - - Document.formatSentiment_ = function(sentiment, verbose) { - assert.strictEqual(sentiment, apiResponse.documentSentiment); - assert.strictEqual(verbose, false); - return formattedSentiment; - }; - - document.detectSentiment(function(err, sentiment) { - assert.ifError(err); - assert.strictEqual(sentiment, formattedSentiment); - done(); - }); - }); - - it('should clone the response object', function(done) { + it('should return the sentiment object', function(done) { document.detectSentiment(function(err, sentiment, apiResponse_) { assert.ifError(err); - assert.notStrictEqual(apiResponse_, apiResponse); - assert.deepEqual(apiResponse_, originalApiResponse); - done(); - }); - }); - - it('should allow verbose mode', function(done) { - var fakeSentiment = {}; - Document.formatSentiment_ = function(sentiment, verbose) { assert.strictEqual(sentiment, apiResponse.documentSentiment); - assert.strictEqual(verbose, true); - return fakeSentiment; - }; - - var fakeSentences = []; - - Document.formatSentences_ = function(sentences, verbose) { - assert.strictEqual(sentences, apiResponse.sentences); - assert.strictEqual(verbose, true); - return fakeSentences; - }; - - var options = { - verbose: true - }; - - document.detectSentiment(options, function(err, sentiment, resp) { - assert.ifError(err); - - assert.strictEqual(sentiment, fakeSentiment); - assert.strictEqual(sentiment.sentences, fakeSentences); - assert.strictEqual(sentiment.language, 'en'); - - assert.deepEqual(resp, apiResponse); - + assert.strictEqual(apiResponse_, apiResponse); done(); }); }); @@ -827,12 +680,7 @@ describe('Document', function() { language: 'en' }; - var originalApiResponse = extend({}, apiResponse); - beforeEach(function() { - Document.formatTokens_ = util.noop; - Document.formatSentences_ = util.noop; - document.api.Language = { analyzeSyntax: function(reqOpts, callback) { callback(null, apiResponse); @@ -840,308 +688,18 @@ describe('Document', function() { }; }); - it('should format the tokens', function(done) { - var formattedTokens = [{}]; - - Document.formatTokens_ = function(tokens, verbose) { - assert.strictEqual(tokens, apiResponse.tokens); - assert.strictEqual(verbose, false); - return formattedTokens; - }; - - document.detectSyntax(function(err, syntax) { - assert.ifError(err); - assert.strictEqual(syntax, formattedTokens); - done(); - }); - }); - - it('should clone the response object', function(done) { + it('should return the token list', function(done) { document.detectSyntax(function(err, syntax, apiResponse_) { assert.ifError(err); - assert.notStrictEqual(apiResponse_, apiResponse); - assert.deepEqual(apiResponse_, originalApiResponse); - done(); - }); - }); - - it('should allow verbose mode', function(done) { - var fakeTokens = []; - - Document.formatTokens_ = function(tokens, verbose) { - assert.strictEqual(tokens, apiResponse.tokens); - assert.strictEqual(verbose, true); - return fakeTokens; - }; - - var fakeSentences = []; - - Document.formatSentences_ = function(sentences, verbose) { - assert.strictEqual(sentences, apiResponse.sentences); - assert.strictEqual(verbose, true); - return fakeSentences; - }; - - var options = { - verbose: true - }; - - document.detectSyntax(options, function(err, syntax, resp) { - assert.ifError(err); - - assert.strictEqual(syntax.tokens, fakeTokens); - assert.strictEqual(syntax.sentences, fakeSentences); - assert.strictEqual(syntax.language, 'en'); - - assert.deepEqual(resp, apiResponse); + assert.strictEqual(syntax, apiResponse.tokens); + assert.strictEqual(apiResponse_, apiResponse); done(); }); }); }); }); - describe('formatEntities_', function() { - var ENTITIES = [ - { type: 'UNKNOWN', salience: -1, name: 'second' }, - { type: 'UNKNOWN', salience: 1, name: 'first' }, - - { type: 'PERSON', salience: -1, name: 'second' }, - { type: 'PERSON', salience: 1, name: 'first' }, - - { type: 'LOCATION', salience: -1, name: 'second' }, - { type: 'LOCATION', salience: 1, name: 'first' }, - - { type: 'ORGANIZATION', salience: -1, name: 'second' }, - { type: 'ORGANIZATION', salience: 1, name: 'first' }, - - { type: 'EVENT', salience: -1, name: 'second' }, - { type: 'EVENT', salience: 1, name: 'first' }, - - { type: 'WORK_OF_ART', salience: -1, name: 'second' }, - { type: 'WORK_OF_ART', salience: 1, name: 'first' }, - - { type: 'CONSUMER_GOOD', salience: -1, name: 'second' }, - { type: 'CONSUMER_GOOD', salience: 1, name: 'first' }, - - { type: 'OTHER', salience: -1, name: 'second' }, - { type: 'OTHER', salience: 1, name: 'first' } - ]; - - var VERBOSE = false; - - var entitiesCopy = extend(true, {}, ENTITIES); - var FORMATTED_ENTITIES = { - unknown: [ entitiesCopy[1], entitiesCopy[0] ], - people: [ entitiesCopy[3], entitiesCopy[2] ], - places: [ entitiesCopy[5], entitiesCopy[4] ], - organizations: [ entitiesCopy[7], entitiesCopy[6] ], - events: [ entitiesCopy[9], entitiesCopy[8] ], - art: [ entitiesCopy[11], entitiesCopy[10] ], - goods: [ entitiesCopy[13], entitiesCopy[12] ], - other: [ entitiesCopy[15], entitiesCopy[14] ], - }; - - var EXPECTED_FORMATTED_ENTITIES = { - default: extend(true, {}, FORMATTED_ENTITIES), - verbose: extend(true, {}, FORMATTED_ENTITIES) - }; - - for (var entityGroupType in EXPECTED_FORMATTED_ENTITIES.default) { - // Only the `name` property is returned by default: - EXPECTED_FORMATTED_ENTITIES.default[entityGroupType] = - EXPECTED_FORMATTED_ENTITIES.default[entityGroupType].map(prop('name')); - } - - it('should group and sort entities correctly', function() { - var formattedEntities = Document.formatEntities_(ENTITIES, VERBOSE); - - Document.sortByProperty_ = function(propertyName) { - assert.strictEqual(propertyName, 'salience'); - return function() { return -1; }; - }; - - assert.deepEqual(formattedEntities, EXPECTED_FORMATTED_ENTITIES.default); - }); - - it('should group and sort entities correctly in verbose mode', function() { - var formattedEntities = Document.formatEntities_(ENTITIES, true); - - Document.sortByProperty_ = function(propertyName) { - assert.strictEqual(propertyName, 'salience'); - return function() { return -1; }; - }; - - assert.deepEqual(formattedEntities, EXPECTED_FORMATTED_ENTITIES.verbose); - }); - }); - - describe('formatSentences_', function() { - var SENTENCES = [ - { - text: { - content: 'Sentence text', - property: 'value' - } - }, - { - text: { - content: 'Another sentence', - property: 'value' - } - } - ]; - - var VERBOSE = false; - - var EXPECTED_FORMATTED_SENTENCES = { - default: SENTENCES.map(prop('text')).map(prop('content')), - verbose: SENTENCES - }; - - it('should correctly format sentences', function() { - var formattedSentences = Document.formatSentences_(SENTENCES, VERBOSE); - - assert.deepEqual( - formattedSentences, - EXPECTED_FORMATTED_SENTENCES.default - ); - }); - - it('should correctly format sentences in verbose mode', function() { - var formattedSentences = Document.formatSentences_(SENTENCES, true); - - assert.deepEqual( - formattedSentences, - EXPECTED_FORMATTED_SENTENCES.verbose - ); - }); - }); - - describe('formatSentiment_', function() { - var SENTIMENT = { - score: -0.5, - magnitude: 0.5 - }; - - var VERBOSE = false; - - var EXPECTED_FORMATTED_SENTIMENT = { - default: SENTIMENT.score, - verbose: { - score: SENTIMENT.score, - magnitude: SENTIMENT.magnitude - } - }; - - it('should format the sentiment correctly', function() { - var sentiment = extend({}, SENTIMENT); - var formattedSentiment = Document.formatSentiment_(sentiment, VERBOSE); - - assert.deepEqual( - formattedSentiment, - EXPECTED_FORMATTED_SENTIMENT.default - ); - }); - - it('should format the sentiment correctly in verbose mode', function() { - var sentiment = extend({}, SENTIMENT); - var formattedSentiment = Document.formatSentiment_(sentiment, true); - - assert.deepEqual( - formattedSentiment, - EXPECTED_FORMATTED_SENTIMENT.verbose - ); - }); - }); - - describe('formatTokens_', function() { - var TOKENS = [ - { - text: { - content: 'Text content' - }, - partOfSpeech: { - tag: 'PART_OF_SPEECH_TAG', - fakePart: 'UNKNOWN' - }, - property: 'value', - dependencyEdge: { - label: 'FAKE_LABEL' - } - } - ]; - - var VERBOSE = false; - - var LABEL_DESCRIPTIONS = { - FAKE_LABEL: 'fake label description' - }; - - var PART_OF_SPEECH = { - PART_OF_SPEECH_TAG: 'part of speech value' - }; - - var EXPECTED_FORMATTED_TOKENS = { - default: TOKENS.map(function(token) { - return { - text: token.text.content, - partOfSpeech: PART_OF_SPEECH.PART_OF_SPEECH_TAG, - tag: 'PART_OF_SPEECH_TAG', - fakePart: undefined, - dependencyEdge: { - label: 'FAKE_LABEL', - description: LABEL_DESCRIPTIONS.FAKE_LABEL - } - }; - }), - - verbose: TOKENS - }; - - beforeEach(function() { - Document.PART_OF_SPEECH = PART_OF_SPEECH; - Document.LABEL_DESCRIPTIONS = LABEL_DESCRIPTIONS; - }); - - it('should correctly format tokens', function() { - var formattedTokens = Document.formatTokens_(TOKENS, VERBOSE); - - assert.deepEqual(formattedTokens, EXPECTED_FORMATTED_TOKENS.default); - }); - - it('should correctly format tokens in verbose mode', function() { - var formattedTokens = Document.formatTokens_(TOKENS, true); - - assert.deepEqual(formattedTokens, EXPECTED_FORMATTED_TOKENS.verbose); - }); - }); - - describe('sortByProperty_', function() { - var sortFn; - - beforeEach(function() { - sortFn = Document.sortByProperty_('sortedProperty'); - }); - - it('should sort by a property name', function() { - assert.strictEqual( - sortFn({ sortedProperty: 0 }, { sortedProperty: 1 }), - 1 - ); - - assert.strictEqual( - sortFn({ sortedProperty: 1 }, { sortedProperty: -1 }), - -1 - ); - - assert.strictEqual( - sortFn({ sortedProperty: 0 }, { sortedProperty: 0 }), - 0 - ); - }); - }); - describe('detectEncodingType_', function() { it('should return if no encoding type is set', function() { assert.strictEqual(document.detectEncodingType_({ From c6a3e88fc9fbec1142b8bf804c2eb4277d279bfb Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 14 Mar 2017 15:59:34 -0400 Subject: [PATCH 065/488] language @ 0.9.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index b24e928225e..f8bbba41ccd 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.8.0", + "version": "0.9.0", "author": "Google Inc.", "description": "Cloud Natural Language Client Library for Node.js", "contributors": [ From 66d6d70004e7ce1f5728a63a9544d583077b4ee1 Mon Sep 17 00:00:00 2001 From: Ernest Landrito Date: Fri, 17 Mar 2017 15:13:32 -0700 Subject: [PATCH 066/488] Language: Update incorrect Document docs. (#2104) --- packages/google-cloud-language/src/document.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index b727a81b087..fece3587339 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -39,9 +39,8 @@ var is = require('is'); * @param {object|string|module:storage/file} config - Configuration object, the * inline content of the document, or a Storage File object. * @param {string|module:storage/file} options.content - If using `config` as an - * object to specify the encoding and/or language of the document, use this - * property to pass the inline content of the document or a Storage File - * object. + * object to specify the language of the document, use this property to pass + * the inline content of the document or a Storage File object. * @param {string} options.language - The language of the text. * @return {module:language/document} * From 960008eb21887bff975282e797dbedae7247e20b Mon Sep 17 00:00:00 2001 From: Ernest Landrito Date: Mon, 27 Mar 2017 16:04:50 -0700 Subject: [PATCH 067/488] Language: Fix readme to match verbosity change. (#2143) --- packages/google-cloud-language/README.md | 160 ++++++++++++++++++++--- 1 file changed, 143 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index c5ecfb6b059..3a143f9a638 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -18,10 +18,43 @@ var language = require('@google-cloud/language')({ // Get the entities from a sentence. language.detectEntities('Stephen of Michigan!', function(err, entities) { - // entities = { - // people: ['Stephen'], - // places: ['Michigan'] - // } + // entities = [ + // { + // name: 'Stephen', + // type: 'PERSON', + // metadata: { + // mid: '/m/05d8y4q' + // }, + // salience: 0.7309288382530212, + // mentions: [ + // { + // text: { + // content: 'Stephen', + // beginOffset: -1 + // }, + // type: 'PROPER' + // } + // ] + // }, + // { + // name: 'Michigan', + // type: 'LOCATION', + // metadata: { + // mid: '/m/04rrx', + // wikipedia_url: 'http://en.wikipedia.org/wiki/Michigan' + // }, + // salience: 0.26907116174697876, + // mentions: [ + // { + // text: { + // content: 'Michigan', + // beginOffset: -1 + // }, + // type: 'PROPER' + // } + // ] + // } + // ] }); // Create a document if you plan to run multiple detections. @@ -29,31 +62,124 @@ var document = language.document('Contributions welcome!'); // Analyze the sentiment of the document. document.detectSentiment(function(err, sentiment) { - // sentiment = 100 // Large numbers represent more positive sentiments. + // sentiment = { + // magnitude: 0.30000001192092896, + // score: 0.30000001192092896 + // } }); // Parse the syntax of the document. document.annotate(function(err, annotations) { // annotations = { // language: 'en', - // sentiment: 100, - // entities: {}, - // sentences: ['Contributions welcome!'], + // sentiment: { + // magnitude: 0.30000001192092896, + // score: 0.30000001192092896 + // }, + // entities: [ + // { + // name: 'Contributions', + // type: 'OTHER', + // metadata: {}, + // salience: 1, + // mentions: [ + // { + // text: { + // content: 'Contributions', + // beginOffset: -1 + // }, + // type: 'COMMON' + // } + // ] + // } + // ], + // sentences: [ + // { + // text: { + // content: 'Contributions welcome!', + // beginOffset: -1 + // }, + // sentiment: { + // magnitude: 0.30000001192092896, + // score: 0.30000001192092896 + // } + // } + // ], // tokens: [ // { - // text: 'Contributions', - // partOfSpeech: 'Noun (common and proper)', - // partOfSpeechTag: 'NOUN' + // text: { + // content: 'Contributions', + // beginOffset: -1 + // }, + // partOfSpeech: { + // tag: 'NOUN', + // aspect: 'ASPECT_UNKNOWN', + // case: 'CASE_UNKNOWN', + // form: 'FORM_UNKNOWN', + // gender: 'GENDER_UNKNOWN', + // mood: 'MOOD_UNKNOWN', + // number: 'PLURAL', + // person: 'PERSON_UNKNOWN', + // proper: 'PROPER_UNKNOWN', + // reciprocity: 'RECIPROCITY_UNKNOWN', + // tense: 'TENSE_UNKNOWN', + // voice: 'VOICE_UNKNOWN' + // }, + // dependencyEdge: { + // headTokenIndex: 1, + // label: 'NSUBJ' + // }, + // lemma: 'contribution' // }, // { - // text: 'welcome', - // partOfSpeech: 'Verb (all tenses and modes)', - // partOfSpeechTag: 'VERB' + // text: { + // content: 'welcome', + // beginOffset: -1 + // }, + // partOfSpeech: { + // tag: 'VERB', + // aspect: 'ASPECT_UNKNOWN', + // case: 'CASE_UNKNOWN', + // form: 'FORM_UNKNOWN', + // gender: 'GENDER_UNKNOWN', + // mood: 'INDICATIVE', + // number: 'NUMBER_UNKNOWN', + // person: 'PERSON_UNKNOWN', + // proper: 'PROPER_UNKNOWN', + // reciprocity: 'RECIPROCITY_UNKNOWN', + // tense: 'PRESENT', + // voice: 'VOICE_UNKNOWN' + // }, + // dependencyEdge: { + // headTokenIndex: 1, + // label: 'ROOT' + // }, + // lemma: 'welcome' // }, // { - // text: '!', - // partOfSpeech: 'Punctuation', - // partOfSpeechTag: 'PUNCT' + // text: { + // content: '!', + // beginOffset: -1 + // }, + // partOfSpeech: { + // tag: 'PUNCT', + // aspect: 'ASPECT_UNKNOWN', + // case: 'CASE_UNKNOWN', + // form: 'FORM_UNKNOWN', + // gender: 'GENDER_UNKNOWN', + // mood: 'MOOD_UNKNOWN', + // number: 'NUMBER_UNKNOWN', + // person: 'PERSON_UNKNOWN', + // proper: 'PROPER_UNKNOWN', + // reciprocity: 'RECIPROCITY_UNKNOWN', + // tense: 'TENSE_UNKNOWN', + // voice: 'VOICE_UNKNOWN' + // }, + // dependencyEdge: { + // headTokenIndex: 1, + // label: 'P' + // }, + // lemma: '!' // } // ] // } From 6d2cf69bf9a0bd846e046e3e71f4c2d43ad6ac4f Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Fri, 31 Mar 2017 09:38:43 -0700 Subject: [PATCH 068/488] stability guarantee promotions (#2165) --- packages/google-cloud-language/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 3a143f9a638..ab1aca3713e 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -1,4 +1,4 @@ -# @google-cloud/language ([Alpha][versioning]) +# @google-cloud/language ([Beta][versioning]) > Cloud Natural Language Client Library for Node.js *Looking for more Google APIs than just Natural Language? You might want to check out [`google-cloud`][google-cloud].* From 0c9bdb18eb19393176cdbea12652d13afeb974aa Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 31 Mar 2017 13:40:35 -0400 Subject: [PATCH 069/488] Docs fixes (#2170) datastore: fix broken links logging: fix broken links storage: fix broken links language: fix docs spanner: fix formatting in docs --- packages/google-cloud-language/README.md | 74 +---- .../google-cloud-language/src/document.js | 303 +++++++----------- 2 files changed, 113 insertions(+), 264 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index ab1aca3713e..c447ef707c9 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -36,24 +36,7 @@ language.detectEntities('Stephen of Michigan!', function(err, entities) { // } // ] // }, - // { - // name: 'Michigan', - // type: 'LOCATION', - // metadata: { - // mid: '/m/04rrx', - // wikipedia_url: 'http://en.wikipedia.org/wiki/Michigan' - // }, - // salience: 0.26907116174697876, - // mentions: [ - // { - // text: { - // content: 'Michigan', - // beginOffset: -1 - // }, - // type: 'PROPER' - // } - // ] - // } + // // ... // ] }); @@ -69,8 +52,8 @@ document.detectSentiment(function(err, sentiment) { }); // Parse the syntax of the document. -document.annotate(function(err, annotations) { - // annotations = { +document.annotate(function(err, annotation) { + // annotation = { // language: 'en', // sentiment: { // magnitude: 0.30000001192092896, @@ -131,56 +114,7 @@ document.annotate(function(err, annotations) { // }, // lemma: 'contribution' // }, - // { - // text: { - // content: 'welcome', - // beginOffset: -1 - // }, - // partOfSpeech: { - // tag: 'VERB', - // aspect: 'ASPECT_UNKNOWN', - // case: 'CASE_UNKNOWN', - // form: 'FORM_UNKNOWN', - // gender: 'GENDER_UNKNOWN', - // mood: 'INDICATIVE', - // number: 'NUMBER_UNKNOWN', - // person: 'PERSON_UNKNOWN', - // proper: 'PROPER_UNKNOWN', - // reciprocity: 'RECIPROCITY_UNKNOWN', - // tense: 'PRESENT', - // voice: 'VOICE_UNKNOWN' - // }, - // dependencyEdge: { - // headTokenIndex: 1, - // label: 'ROOT' - // }, - // lemma: 'welcome' - // }, - // { - // text: { - // content: '!', - // beginOffset: -1 - // }, - // partOfSpeech: { - // tag: 'PUNCT', - // aspect: 'ASPECT_UNKNOWN', - // case: 'CASE_UNKNOWN', - // form: 'FORM_UNKNOWN', - // gender: 'GENDER_UNKNOWN', - // mood: 'MOOD_UNKNOWN', - // number: 'NUMBER_UNKNOWN', - // person: 'PERSON_UNKNOWN', - // proper: 'PROPER_UNKNOWN', - // reciprocity: 'RECIPROCITY_UNKNOWN', - // tense: 'TENSE_UNKNOWN', - // voice: 'VOICE_UNKNOWN' - // }, - // dependencyEdge: { - // headTokenIndex: 1, - // label: 'P' - // }, - // lemma: '!' - // } + // // ... // ] // } }); diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js index fece3587339..e2499fc52e3 100644 --- a/packages/google-cloud-language/src/document.js +++ b/packages/google-cloud-language/src/document.js @@ -268,58 +268,39 @@ Document.PART_OF_SPEECH = { * // annotation = { * // language: 'en', * // sentiment: { - * // score: 1, - * // magnitude: 4 + * // magnitude: 0.5, + * // score: 0.5 * // }, - * // entities: { - * // organizations: [ - * // { - * // name: 'Google', - * // type: 'ORGANIZATION', - * // metadata: { - * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' - * // }, - * // salience: 0.65137446, - * // mentions: [ - * // { - * // text: { - * // content: 'Google', - * // beginOffset: -1 - * // }, - * // type: 'PROPER' - * // } - * // ] - * // } - * // ], - * // places: [ - * // { - * // name: 'American', - * // type: 'LOCATION', - * // metadata: { - * // wikipedia_url: 'http://en.wikipedia.org/wiki/United_States' + * // entities: [ + * // { + * // name: 'Google', + * // type: 'ORGANIZATION', + * // metadata: { + * // mid: '/m/045c7b', + * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' + * // }, + * // salience: 0.7532734870910645, + * // mentions: [ + * // { + * // text: { + * // content: 'Google', + * // beginOffset: -1 + * // }, + * // type: 'PROPER' * // }, - * // salience: 0.13947370648384094, - * // mentions: [ - * // { - * // text: [ - * // { - * // content: 'American', - * // beginOffset: -1 - * // }, - * // type: 'PROPER' - * // ] - * // } - * // ] + * // // ... * // } - * // ] - * // }, + * // } + * // ], * // sentences: [ * // { * // text: { - * // content: - * // 'Google is an American multinational technology company' + - * // 'specializing in Internet-related services and products.', + * // content: 'Google is an American multinational technology...', * // beginOffset: -1 + * // }, + * // sentiment: { + * // magnitude: 0.5, + * // score: 0.5 * // } * // } * // ], @@ -331,26 +312,25 @@ Document.PART_OF_SPEECH = { * // }, * // partOfSpeech: { * // tag: 'NOUN', - * // aspect: 'PERFECTIVE', - * // case: 'ADVERBIAL', - * // form: 'ADNOMIAL', - * // gender: 'FEMININE', - * // mood: 'IMPERATIVE', + * // aspect: 'ASPECT_UNKNOWN', + * // case: 'CASE_UNKNOWN', + * // form: 'FORM_UNKNOWN', + * // gender: 'GENDER_UNKNOWN', + * // mood: 'MOOD_UNKNOWN', * // number: 'SINGULAR', - * // person: 'FIRST', + * // person: 'PERSON_UNKNOWN', * // proper: 'PROPER', - * // reciprocity: 'RECIPROCAL', - * // tense: 'PAST', - * // voice: 'PASSIVE' + * // reciprocity: 'RECIPROCITY_UNKNOWN', + * // tense: 'TENSE_UNKNOWN', + * // voice: 'VOICE_UNKNOWN' * // }, * // dependencyEdge: { * // headTokenIndex: 1, - * // label: 'NSUBJ', - * // description: 'Nominal subject' + * // label: 'NSUBJ' * // }, * // lemma: 'Google' * // }, - * // ... + * // // ... * // ] * // } * }); @@ -371,51 +351,30 @@ Document.PART_OF_SPEECH = { * // annotation = { * // language: 'en', * // sentiment: { - * // score: 1, - * // magnitude: 4 + * // magnitude: 0.5, + * // score: 0.5 * // }, - * // entities: { - * // organizations: [ - * // { - * // name: 'Google', - * // type: 'ORGANIZATION', - * // metadata: { - * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' - * // }, - * // salience: 0.65137446, - * // mentions: [ - * // { - * // text: { - * // content: 'Google', - * // beginOffset: -1 - * // }, - * // type: 'PROPER' - * // } - * // ] - * // } - * // ], - * // places: [ - * // { - * // name: 'American', - * // type: 'LOCATION', - * // metadata: { - * // wikipedia_url: 'http://en.wikipedia.org/wiki/United_States' + * // entities: [ + * // { + * // name: 'Google', + * // type: 'ORGANIZATION', + * // metadata: { + * // mid: '/m/045c7b', + * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' + * // }, + * // salience: 0.7532734870910645, + * // mentions: [ + * // { + * // text: { + * // content: 'Google', + * // beginOffset: -1 + * // }, + * // type: 'PROPER' * // }, - * // salience: 0.13947370648384094, - * // mentions: [ - * // { - * // text: [ - * // { - * // content: 'American', - * // beginOffset: -1 - * // }, - * // type: 'PROPER' - * // ] - * // } - * // ] + * // // ... * // } - * // ] - * // }, + * // } + * // ] * // } * }); * @@ -520,44 +479,28 @@ Document.prototype.annotate = function(options, callback) { * // Error handling omitted. * } * - * // entities = { - * // organizations: [ - * // { - * // name: 'Google', - * // type: 'ORGANIZATION', - * // metadata: { - * // wikipedia_url: 'http: * //en.wikipedia.org/wiki/Google' - * // }, - * // salience: 0.65137446, - * // mentions: [ - * // { - * // text: { - * // content: 'Google', - * // beginOffset: -1 - * // } - * // } - * // ] - * // } - * // ], - * // places: [ - * // { - * // name: 'American', - * // type: 'LOCATION', - * // metadata: { - * // wikipedia_url: 'http: * //en.wikipedia.org/wiki/United_States' + * // entities = [ + * // { + * // name: 'Google', + * // type: 'ORGANIZATION', + * // metadata: { + * // mid: '/m/045c7b', + * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' + * // }, + * // salience: 0.7532734870910645, + * // mentions: [ + * // { + * // text: { + * // content: 'Google', + * // beginOffset: -1 + * // }, + * // type: 'PROPER' * // }, - * // salience: 0.13947371, - * // mentions: [ - * // { - * // text: { - * // content: 'American', - * // beginOffset: -1 - * // } - * // } - * // ] + * // // ... * // } - * // ] - * // } + * // }, + * // // ... + * // ] * }); * * //- @@ -611,19 +554,8 @@ Document.prototype.detectEntities = function(options, callback) { * } * * // sentiment = { - * // score: 1, - * // magnitude: 4, - * // sentences: [ - * // { - * // text: { - * // content: - * // 'Google is an American multinational technology company' + - * // 'specializing in Internet-related services and products.', - * // beginOffset: -1 - * // } - * // } - * // ], - * // language: 'en' + * // magnitude: 0.5, + * // score: 0.5 * // } * }); * @@ -667,7 +599,7 @@ Document.prototype.detectSentiment = function(options, callback) { * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) * @param {function} callback - The callback function. * @param {?error} callback.err - An error occurred while making this request. - * @param {object} callback.syntax - The syntax recognized from the text. + * @param {object[]} callback.syntax - The syntax recognized from the text. * @param {object} callback.apiResponse - The full API response. * * @example @@ -676,51 +608,34 @@ Document.prototype.detectSentiment = function(options, callback) { * // Error handling omitted. * } * - * // syntax = { - * // sentences: [ - * // { - * // text: { - * // content: - * // 'Google is an American multinational technology company' + - * // 'specializing in Internet-related services and products.', - * // beginOffset: -1 - * // }, - * // sentiment: { - * // score: 1 - * // magnitude: 4 - * // } - * // } - * // ], - * // tokens: [ - * // { - * // text: { - * // content: 'Google', - * // beginOffset: -1 - * // }, - * // partOfSpeech: { - * // tag: 'NOUN', - * // aspect: 'PERFECTIVE', - * // case: 'ADVERBIAL', - * // form: 'ADNOMIAL', - * // gender: 'FEMININE', - * // mood: 'IMPERATIVE', - * // number: 'SINGULAR', - * // person: 'FIRST', - * // proper: 'PROPER', - * // reciprocity: 'RECIPROCAL', - * // tense: 'PAST', - * // voice: 'PASSIVE' - * // }, - * // dependencyEdge: { - * // headTokenIndex: 1, - * // label: 'NSUBJ', - * // description: 'Nominal subject' - * // }, - * // lemme: 'Google' - * // } - * // ], - * // language: 'en' - * // } + * // syntax = [ + * // { + * // text: { + * // content: 'Google', + * // beginOffset: -1 + * // }, + * // partOfSpeech: { + * // tag: 'NOUN', + * // aspect: 'ASPECT_UNKNOWN', + * // case: 'CASE_UNKNOWN', + * // form: 'FORM_UNKNOWN', + * // gender: 'GENDER_UNKNOWN', + * // mood: 'MOOD_UNKNOWN', + * // number: 'SINGULAR', + * // person: 'PERSON_UNKNOWN', + * // proper: 'PROPER', + * // reciprocity: 'RECIPROCITY_UNKNOWN', + * // tense: 'TENSE_UNKNOWN', + * // voice: 'VOICE_UNKNOWN' + * // }, + * // dependencyEdge: { + * // headTokenIndex: 1, + * // label: 'NSUBJ' + * // }, + * // lemma: 'Google' + * // }, + * // // ... + * // ] * }); * * //- From 3d4d99da2b940aa345dc6c3e0b94bb13d3ab458e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 31 Mar 2017 13:50:44 -0400 Subject: [PATCH 070/488] drop support for 0.12 (#2171) * all: drop support for 0.12 [ci skip] * scripts: add more modules to blacklist for now * update common deps for service modules --- packages/google-cloud-language/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f8bbba41ccd..238b1f7d520 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,7 +52,7 @@ "language" ], "dependencies": { - "@google-cloud/common": "^0.12.0", + "@google-cloud/common": "^0.13.0", "extend": "^3.0.0", "google-gax": "^0.12.0", "google-proto-files": "^0.10.0", @@ -73,6 +73,6 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=0.12.0" + "node": ">=4.0.0" } } From fbd9eb269798fa9b88aced70e9fc6262ce1c7188 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 31 Mar 2017 14:57:50 -0400 Subject: [PATCH 071/488] language @ 0.10.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 238b1f7d520..f9dc350a457 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.9.0", + "version": "0.10.0", "author": "Google Inc.", "description": "Cloud Natural Language Client Library for Node.js", "contributors": [ From e9fbf3f00ac86cd5e491ddece12158c6176f7f50 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Fri, 7 Apr 2017 10:24:12 -0700 Subject: [PATCH 072/488] Natural Language v1beta2 GAPIC. (#2188) --- packages/google-cloud-language/src/index.js | 2 + .../src/v1beta2/index.js | 34 ++ .../src/v1beta2/language_service_client.js | 429 ++++++++++++++++++ .../language_service_client_config.json | 53 +++ 4 files changed, 518 insertions(+) create mode 100644 packages/google-cloud-language/src/v1beta2/index.js create mode 100644 packages/google-cloud-language/src/v1beta2/language_service_client.js create mode 100644 packages/google-cloud-language/src/v1beta2/language_service_client_config.json diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index c3e39fcb76a..ff718674a86 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -24,6 +24,7 @@ var common = require('@google-cloud/common'); var extend = require('extend'); var is = require('is'); var v1 = require('./v1'); +var v1beta2 = require('./v1beta2'); /** * @type {module:language/document} @@ -543,3 +544,4 @@ common.util.promisifyAll(Language, { module.exports = Language; module.exports.v1 = v1; +module.exports.v1beta2 = v1beta2; diff --git a/packages/google-cloud-language/src/v1beta2/index.js b/packages/google-cloud-language/src/v1beta2/index.js new file mode 100644 index 00000000000..04dc3c3a3f5 --- /dev/null +++ b/packages/google-cloud-language/src/v1beta2/index.js @@ -0,0 +1,34 @@ +/* + * Copyright 2016 Google Inc. All rights reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; + +var languageServiceClient = require('./language_service_client'); +var gax = require('google-gax'); +var extend = require('extend'); + +function v1beta2(options) { + options = extend({ + scopes: v1beta2.ALL_SCOPES + }, options); + var gaxGrpc = gax.grpc(options); + return languageServiceClient(gaxGrpc); +} + +v1beta2.GAPIC_VERSION = '0.7.1'; +v1beta2.SERVICE_ADDRESS = languageServiceClient.SERVICE_ADDRESS; +v1beta2.ALL_SCOPES = languageServiceClient.ALL_SCOPES; + +module.exports = v1beta2; diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js new file mode 100644 index 00000000000..9f44f3af95a --- /dev/null +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -0,0 +1,429 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * EDITING INSTRUCTIONS + * This file was generated from the file + * https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto, + * and updates to that file get reflected here through a refresh process. + * For the short term, the refresh process will only be runnable by Google + * engineers. + * + * The only allowed edits are to method and file documentation. A 3-way + * merge preserves those additions if the generated source changes. + */ +/* TODO: introduce line-wrapping so that it never exceeds the limit. */ +/* jscs: disable maximumLineLength */ +'use strict'; + +var configData = require('./language_service_client_config'); +var extend = require('extend'); +var gax = require('google-gax'); + +var SERVICE_ADDRESS = 'language.googleapis.com'; + +var DEFAULT_SERVICE_PORT = 443; + +var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; + +/** + * The scopes needed to make gRPC calls to all of the methods defined in + * this service. + */ +var ALL_SCOPES = [ + 'https://www.googleapis.com/auth/cloud-platform' +]; + +/** + * Provides text analysis operations such as sentiment analysis and entity + * recognition. + * + * This will be created through a builder function which can be obtained by the module. + * See the following example of how to initialize the module and how to access to the builder. + * @see {@link languageServiceClient} + * + * @example + * var languageV1beta2 = require('@google-cloud/language').v1beta2({ + * // optional auth parameters. + * }); + * var client = languageV1beta2.languageServiceClient(); + * + * @class + */ +function LanguageServiceClient(gaxGrpc, grpcClients, opts) { + opts = extend({ + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {} + }, opts); + + var googleApiClient = [ + 'gl-node/' + process.versions.node + ]; + if (opts.libName && opts.libVersion) { + googleApiClient.push(opts.libName + '/' + opts.libVersion); + } + googleApiClient.push( + CODE_GEN_NAME_VERSION, + 'gax/' + gax.version, + 'grpc/' + gaxGrpc.grpcVersion + ); + + var defaults = gaxGrpc.constructSettings( + 'google.cloud.language.v1beta2.LanguageService', + configData, + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); + + var self = this; + + this.auth = gaxGrpc.auth; + var languageServiceStub = gaxGrpc.createStub( + grpcClients.google.cloud.language.v1beta2.LanguageService, + opts); + var languageServiceStubMethods = [ + 'analyzeSentiment', + 'analyzeEntities', + 'analyzeEntitySentiment', + 'analyzeSyntax', + 'annotateText' + ]; + languageServiceStubMethods.forEach(function(methodName) { + self['_' + methodName] = gax.createApiCall( + languageServiceStub.then(function(languageServiceStub) { + return function() { + var args = Array.prototype.slice.call(arguments, 0); + return languageServiceStub[methodName].apply(languageServiceStub, args); + }; + }), + defaults[methodName], + null); + }); +} + + +/** + * Get the project ID used by this class. + * @param {function(Error, string)} callback - the callback to be called with + * the current project Id. + */ +LanguageServiceClient.prototype.getProjectId = function(callback) { + return this.auth.getProjectId(callback); +}; + +// Service calls + +/** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. Currently, `analyzeSentiment` only supports English text + * ({@link Document.language}="EN"). + * + * This object should have the same structure as [Document]{@link Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * var client = languageV1beta2.languageServiceClient(); + * var document = {}; + * client.analyzeSentiment({document: document}).then(function(responses) { + * var response = responses[0]; + * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); + * }); + */ +LanguageServiceClient.prototype.analyzeSentiment = function(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + + return this._analyzeSentiment(request, options, callback); +}; + +/** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * @param {number} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * var client = languageV1beta2.languageServiceClient(); + * var document = {}; + * var encodingType = languageV1beta2.EncodingType.NONE; + * var request = { + * document: document, + * encodingType: encodingType + * }; + * client.analyzeEntities(request).then(function(responses) { + * var response = responses[0]; + * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); + * }); + */ +LanguageServiceClient.prototype.analyzeEntities = function(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + + return this._analyzeEntities(request, options, callback); +}; + +/** + * Finds entities, similar to {@link AnalyzeEntities} in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * @param {number} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link AnalyzeEntitySentimentResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * var client = languageV1beta2.languageServiceClient(); + * var document = {}; + * var encodingType = languageV1beta2.EncodingType.NONE; + * var request = { + * document: document, + * encodingType: encodingType + * }; + * client.analyzeEntitySentiment(request).then(function(responses) { + * var response = responses[0]; + * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); + * }); + */ +LanguageServiceClient.prototype.analyzeEntitySentiment = function(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + + return this._analyzeEntitySentiment(request, options, callback); +}; + +/** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * @param {number} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link AnalyzeSyntaxResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link AnalyzeSyntaxResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * var client = languageV1beta2.languageServiceClient(); + * var document = {}; + * var encodingType = languageV1beta2.EncodingType.NONE; + * var request = { + * document: document, + * encodingType: encodingType + * }; + * client.analyzeSyntax(request).then(function(responses) { + * var response = responses[0]; + * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); + * }); + */ +LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + + return this._analyzeSyntax(request, options, callback); +}; + +/** + * A convenience method that provides all syntax, sentiment, and entity + * features in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * @param {Object} request.features + * The enabled features. + * + * This object should have the same structure as [Features]{@link Features} + * @param {number} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * var client = languageV1beta2.languageServiceClient(); + * var document = {}; + * var features = {}; + * var encodingType = languageV1beta2.EncodingType.NONE; + * var request = { + * document: document, + * features: features, + * encodingType: encodingType + * }; + * client.annotateText(request).then(function(responses) { + * var response = responses[0]; + * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); + * }); + */ +LanguageServiceClient.prototype.annotateText = function(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + + return this._annotateText(request, options, callback); +}; + +function LanguageServiceClientBuilder(gaxGrpc) { + if (!(this instanceof LanguageServiceClientBuilder)) { + return new LanguageServiceClientBuilder(gaxGrpc); + } + + var languageServiceClient = gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/cloud/language/v1beta2/language_service.proto' + }]); + extend(this, languageServiceClient.google.cloud.language.v1beta2); + + + /** + * Build a new instance of {@link LanguageServiceClient}. + * + * @param {Object=} opts - The optional parameters. + * @param {String=} opts.servicePath + * The domain name of the API remote host. + * @param {number=} opts.port + * The port on which to connect to the remote host. + * @param {grpc.ClientCredentials=} opts.sslCreds + * A ClientCredentials for use with an SSL-enabled channel. + * @param {Object=} opts.clientConfig + * The customized config to build the call settings. See + * {@link gax.constructSettings} for the format. + */ + this.languageServiceClient = function(opts) { + return new LanguageServiceClient(gaxGrpc, languageServiceClient, opts); + }; + extend(this.languageServiceClient, LanguageServiceClient); +} +module.exports = LanguageServiceClientBuilder; +module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json new file mode 100644 index 00000000000..e394406ed24 --- /dev/null +++ b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json @@ -0,0 +1,53 @@ +{ + "interfaces": { + "google.cloud.language.v1beta2.LanguageService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "AnalyzeSentiment": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "AnalyzeEntities": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "AnalyzeEntitySentiment": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "AnalyzeSyntax": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "AnnotateText": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} From 8afa85d648320344eb12da886b96357cbf0a8ff4 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 10 Apr 2017 21:38:40 -0400 Subject: [PATCH 073/488] update deps --- packages/google-cloud-language/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f9dc350a457..68b66db7ba4 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -54,8 +54,8 @@ "dependencies": { "@google-cloud/common": "^0.13.0", "extend": "^3.0.0", - "google-gax": "^0.12.0", - "google-proto-files": "^0.10.0", + "google-gax": "^0.13.0", + "google-proto-files": "^0.11.0", "is": "^3.0.1", "string-format-obj": "^1.1.0" }, From 2abd2fd348073051888933f9f70f1cee4a052ea5 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 10 Apr 2017 23:23:33 -0400 Subject: [PATCH 074/488] language @ 0.10.1 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 68b66db7ba4..972ce58b404 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.10.0", + "version": "0.10.1", "author": "Google Inc.", "description": "Cloud Natural Language Client Library for Node.js", "contributors": [ From c6c553fbe076cc518caae4439f1429a7ba751849 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Tue, 11 Apr 2017 08:34:39 -0700 Subject: [PATCH 075/488] Language: Expose an apiVersion parameter (#2203) --- packages/google-cloud-language/src/index.js | 19 ++++++- packages/google-cloud-language/test/index.js | 54 +++++++++++++++++++- 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index ff718674a86..00bbe851b12 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -26,6 +26,11 @@ var is = require('is'); var v1 = require('./v1'); var v1beta2 = require('./v1beta2'); +var GAPIC_APIS = { + v1: v1, + v1beta2: v1beta2 +}; + /** * @type {module:language/document} * @private @@ -51,6 +56,10 @@ var Document = require('./document.js'); * @resource [Cloud Natural Language API Documentation]{@link https://cloud.google.com/natural-language/docs} * * @param {object} options - [Configuration object](#/docs). + * @param {string} options.apiVersion - Either `v1` or `v1beta2`. `v1beta2` is a + * *newer* release than `v1`, and still in beta. By choosing it, you are + * opting into new, back-end behavior which is not officially supported by + * the design of this API. (Default: `v1`) */ function Language(options) { if (!(this instanceof Language)) { @@ -63,8 +72,16 @@ function Language(options) { libVersion: require('../package.json').version }); + var gapic = GAPIC_APIS[options.apiVersion || 'v1']; + + if (!gapic) { + throw new Error('Invalid `apiVersion` specified. Use "v1" or "v1beta2".'); + } + + delete options.apiVersion; + this.api = { - Language: v1(options).languageServiceClient(options) + Language: gapic(options).languageServiceClient(options) }; } diff --git a/packages/google-cloud-language/test/index.js b/packages/google-cloud-language/test/index.js index e9658ade128..45237e97caa 100644 --- a/packages/google-cloud-language/test/index.js +++ b/packages/google-cloud-language/test/index.js @@ -48,6 +48,17 @@ function fakeV1() { }; } +var fakeV1Beta2Override; +function fakeV1Beta2() { + if (fakeV1Beta2Override) { + return fakeV1Beta2Override.apply(null, arguments); + } + + return { + languageServiceClient: util.noop + }; +} + describe('Language', function() { var Language; var language; @@ -60,12 +71,14 @@ describe('Language', function() { util: fakeUtil }, './document.js': FakeDocument, - './v1': fakeV1 + './v1': fakeV1, + './v1beta2': fakeV1Beta2 }); }); beforeEach(function() { fakeV1Override = null; + fakeV1Beta2Override = null; language = new Language(OPTIONS); }); @@ -123,6 +136,45 @@ describe('Language', function() { Language: expectedLanguageService }); }); + + it('should create a gax api client for v1beta2', function() { + var expectedLanguageService = {}; + + fakeV1Override = function() { + throw new Error('v1 should not be initialized.'); + }; + + fakeV1Beta2Override = function(options) { + var expected = { + libName: 'gccl', + libVersion: require('../package.json').version + }; + assert.deepStrictEqual(options, expected); + + return { + languageServiceClient: function(options) { + assert.deepStrictEqual(options, expected); + return expectedLanguageService; + } + }; + }; + + var language = new Language({ + apiVersion: 'v1beta2' + }); + + assert.deepEqual(language.api, { + Language: expectedLanguageService + }); + }); + + it('should not accept an unrecognized version', function() { + assert.throws(function() { + new Language({ + apiVersion: 'v1beta42' + }); + }, new RegExp('Invalid `apiVersion` specified. Use "v1" or "v1beta2".')); + }); }); describe('annotate', function() { From 0116d6c5071bbd09c0a97268200083ee5295b08a Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 11 Apr 2017 11:37:39 -0400 Subject: [PATCH 076/488] language @ 0.10.2 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 972ce58b404..aa650dc7d01 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.10.1", + "version": "0.10.2", "author": "Google Inc.", "description": "Cloud Natural Language Client Library for Node.js", "contributors": [ From 51a1f731c3ff38cf0918206facd7685a223c9c27 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 12 Apr 2017 14:33:06 -0700 Subject: [PATCH 077/488] Bring ML APIs up to standard. (#346) --- .../google-cloud-language/samples/README.md | 23 ++++++++----------- .../samples/package.json | 6 ++--- .../samples/quickstart.js | 10 +++++--- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 85cac447a48..78a9983f6f4 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/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/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 957b286869d..9cdecaa5f17 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/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/packages/google-cloud-language/samples/quickstart.js b/packages/google-cloud-language/samples/quickstart.js index fd40ed8a2b8..e3b9ed78eee 100644 --- a/packages/google-cloud-language/samples/quickstart.js +++ b/packages/google-cloud-language/samples/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] From 4eb582ef079e0823c868c22bfe502c9735943eb8 Mon Sep 17 00:00:00 2001 From: Eric Uldall Date: Fri, 14 Apr 2017 09:19:55 -0700 Subject: [PATCH 078/488] updated FQDN's to googleapis.com with a trailing dot (#2214) --- .../google-cloud-language/src/v1/language_service_client.js | 4 ++-- .../src/v1beta2/language_service_client.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 3ff283512f9..06c0a5fd2d1 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -31,7 +31,7 @@ var configData = require('./language_service_client_config'); var extend = require('extend'); var gax = require('google-gax'); -var SERVICE_ADDRESS = 'language.googleapis.com'; +var SERVICE_ADDRESS = 'language.googleapis.com.'; var DEFAULT_SERVICE_PORT = 443; @@ -369,4 +369,4 @@ function LanguageServiceClientBuilder(gaxGrpc) { } module.exports = LanguageServiceClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 9f44f3af95a..8b7f9c87fe5 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -31,7 +31,7 @@ var configData = require('./language_service_client_config'); var extend = require('extend'); var gax = require('google-gax'); -var SERVICE_ADDRESS = 'language.googleapis.com'; +var SERVICE_ADDRESS = 'language.googleapis.com.'; var DEFAULT_SERVICE_PORT = 443; @@ -426,4 +426,4 @@ function LanguageServiceClientBuilder(gaxGrpc) { } module.exports = LanguageServiceClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; From 63ab2bba4170bf627a73c56e09a237080aaaa03a Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Fri, 14 Apr 2017 12:30:56 -0400 Subject: [PATCH 079/488] language @ 0.10.3 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index aa650dc7d01..550f0c46c5b 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.10.2", + "version": "0.10.3", "author": "Google Inc.", "description": "Cloud Natural Language Client Library for Node.js", "contributors": [ From 6ca15432184551deb6f5acd5465716734abf2c3f Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Fri, 21 Apr 2017 15:10:40 -0700 Subject: [PATCH 080/488] Add sample for Natural Language 1.1 launch (#352) * Fix NL tests * Add analyzeEntitySentiment sample * Fix failing tests * Add NL 1.0 features * Update dependencies --- packages/google-cloud-language/samples/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 9cdecaa5f17..fcabdb4d2eb 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -8,9 +8,9 @@ "test": "cd ..; npm run st -- --verbose language/system-test/*.test.js" }, "dependencies": { - "@google-cloud/language": "0.10.2", - "@google-cloud/storage": "1.0.0", - "yargs": "7.0.2" + "@google-cloud/language": "0.10.3", + "@google-cloud/storage": "1.1.0", + "yargs": "7.1.0" }, "engines": { "node": ">=4.3.2" From d575e4e980af969160e5f9f3fab7ef89b4b213c7 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 24 Apr 2017 14:40:11 -0700 Subject: [PATCH 081/488] Cleanup App Engine samples and re-work tests. (#354) --- .../google-cloud-language/samples/README.md | 26 +++++++++++++++++-- .../samples/package.json | 25 +++++++++++++++--- .../samples/quickstart.js | 2 +- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 78a9983f6f4..86860a53c82 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -15,14 +15,21 @@ Learning API. * [Samples](#samples) * [Analyze](#analyze) * [Slackbot](#slackbot) +* [Running the tests](#running-the-tests) ## Setup -1. Read [Prerequisites][prereq] and [How to run a sample][run] first. -1. Install dependencies: +1. Read [Prerequisites][prereq] and [How to run a sample][run] first. +1. Install dependencies: + + With `npm`: npm install + With `yarn`: + + yarn install + [prereq]: ../README.md#prerequisities [run]: ../README.md#how-to-run-a-sample @@ -67,3 +74,18 @@ The example in the [slackbot](./slackbot) subdirectory shows a Slack bot built u It runs on a Google Container Engine (Kubernetes) cluster, and uses one of the Google Cloud Platform's ML APIs, the Natural Language (NL) API, to interact in a Slack channel. See its [README](./slackbot/README.md) for more information. + +## Running the tests + +1. Set the `GCLOUD_PROJECT` and `GOOGLE_APPLICATION_CREDENTIALS` environment + variables. + +1. Run the tests: + + With `npm`: + + npm test + + With `yarn`: + + yarn test diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index fcabdb4d2eb..34c789e34f9 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -2,17 +2,34 @@ "name": "nodejs-docs-samples-language", "version": "0.0.1", "private": true, - "license": "Apache Version 2.0", + "license": "Apache-2.0", "author": "Google Inc.", + "repository": { + "type": "git", + "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" + }, + "cloud": { + "requiresKeyFile": true, + "requiresProjectId": true + }, + "engines": { + "node": ">=4.3.2" + }, "scripts": { - "test": "cd ..; npm run st -- --verbose language/system-test/*.test.js" + "lint": "samples lint \"*.js\" \"system-test/*.js\" \"slackbot/*.js\" \"slackbot/system-test/*.js\"", + "pretest": "npm run lint", + "system-test": "ava -T 20s --verbose system-test/*.test.js", + "test": "npm run system-test" }, "dependencies": { "@google-cloud/language": "0.10.3", "@google-cloud/storage": "1.1.0", "yargs": "7.1.0" }, - "engines": { - "node": ">=4.3.2" + "devDependencies": { + "@google-cloud/nodejs-repo-tools": "1.3.1", + "ava": "0.19.1", + "proxyquire": "1.7.11", + "sinon": "2.1.0" } } diff --git a/packages/google-cloud-language/samples/quickstart.js b/packages/google-cloud-language/samples/quickstart.js index e3b9ed78eee..cadb7c4d3db 100644 --- a/packages/google-cloud-language/samples/quickstart.js +++ b/packages/google-cloud-language/samples/quickstart.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 From 5d99858fa637de6b14230b0259cd789fa649c1c6 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Tue, 2 May 2017 08:54:19 -0700 Subject: [PATCH 082/488] Upgrade to repo tools v1.4.7 (#370) --- .../google-cloud-language/samples/README.md | 83 +++++++++++++------ .../samples/package.json | 39 +++++++-- 2 files changed, 92 insertions(+), 30 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 86860a53c82..a15b3c89e19 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -2,19 +2,17 @@ # Google Cloud Natural Language API Node.js Samples -[Cloud Natural Language API][language_docs] provides natural language -understanding technologies to developers, including sentiment analysis, entity -recognition, and syntax analysis. This API is part of the larger Cloud Machine -Learning API. +[![Build](https://storage.googleapis.com/cloud-docs-samples-badges/GoogleCloudPlatform/nodejs-docs-samples/nodejs-docs-samples-language.svg)]() -[language_docs]: https://cloud.google.com/natural-language/docs/ +[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API. ## Table of Contents * [Setup](#setup) * [Samples](#samples) - * [Analyze](#analyze) - * [Slackbot](#slackbot) + * [Analyze v1](#analyze-v1) + * [Analyze v1beta2](#analyze-v1beta2) + * [Slack Bot](#slack-bot) * [Running the tests](#running-the-tests) ## Setup @@ -35,11 +33,12 @@ Learning API. ## Samples -### Analyze +### Analyze v1 -View the [documentation][analyze_docs] or the [source code][analyze_code]. -__Usage:__ `node analyze.js --help` +View the [documentation][analyze-v1_0_docs] or the [source code][analyze-v1_0_code]. + +__Usage:__ `node analyze.v1.js --help` ``` Commands: @@ -54,26 +53,62 @@ Options: --help Show help [boolean] Examples: - 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-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-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt + node analyze.v1.js sentiment-text "President Obama is speaking at the White House." + node analyze.v1.js sentiment-file my-bucket file.txt Detects sentiment in gs://my-bucket/file.txt + node analyze.v1.js entities-text "President Obama is speaking at the White House." + node analyze.v1.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt + node analyze.v1.js syntax-text "President Obama is speaking at the White House." + node analyze.v1.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 ``` -[analyze_docs]: https://cloud.google.com/natural-language/docs -[analyze_code]: analyze.js +[analyze-v1_0_docs]: https://cloud.google.com/natural-language/docs/ +[analyze-v1_0_code]: analyze.v1.js + +### Analyze v1beta2 + + +View the [documentation][analyze-v1beta2_1_docs] or the [source code][analyze-v1beta2_1_code]. + +__Usage:__ `node analyze.v1beta2.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. + entity-sentiment-text Detects sentiment of the entities in a string. + entity-sentiment-file Detects sentiment of the entities in a file in Google Cloud Storage. + +Options: + --help Show help [boolean] + +Examples: + node analyze.v1beta2.js sentiment-text "President Obama is speaking at the White House." + node analyze.v1beta2.js sentiment-file my-bucket file.txt Detects sentiment in gs://my-bucket/file.txt + node analyze.v1beta2.js entities-text "President Obama is speaking at the White House." + node analyze.v1beta2.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt + node analyze.v1beta2.js syntax-text "President Obama is speaking at the White House." + node analyze.v1beta2.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt + node analyze.v1beta2.js entity-sentiment-text "President Obama is speaking at the White House." + node analyze.v1beta2.js entity-sentiment-file my-bucket Detects sentiment of entities in gs://my-bucket/file.txt + file.txt + +For more information, see https://cloud.google.com/natural-language/docs +``` + +[analyze-v1beta2_1_docs]: https://cloud.google.com/natural-language/docs/ +[analyze-v1beta2_1_code]: analyze.v1beta2.js + +### Slack Bot + -### Slackbot +View the [README](slackbot/README.md). -The example in the [slackbot](./slackbot) subdirectory shows a Slack bot built using the -[Botkit](https://github.com/howdyai/botkit) library. -It runs on a Google Container Engine (Kubernetes) cluster, and uses one of the Google Cloud Platform's ML -APIs, the Natural Language (NL) API, to interact in a Slack channel. -See its [README](./slackbot/README.md) for more information. ## Running the tests diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 34c789e34f9..16bd919350d 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -8,15 +8,16 @@ "type": "git", "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" }, - "cloud": { - "requiresKeyFile": true, - "requiresProjectId": true - }, "engines": { "node": ">=4.3.2" }, + "semistandard": { + "ignore": [ + "node_modules" + ] + }, "scripts": { - "lint": "samples lint \"*.js\" \"system-test/*.js\" \"slackbot/*.js\" \"slackbot/system-test/*.js\"", + "lint": "samples lint", "pretest": "npm run lint", "system-test": "ava -T 20s --verbose system-test/*.test.js", "test": "npm run system-test" @@ -27,9 +28,35 @@ "yargs": "7.1.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.3.1", + "@google-cloud/nodejs-repo-tools": "1.4.7", "ava": "0.19.1", "proxyquire": "1.7.11", "sinon": "2.1.0" + }, + "cloud-repo-tools": { + "requiresKeyFile": true, + "requiresProjectId": true, + "product": "nl", + "samples": [ + { + "id": "analyze-v1", + "name": "Analyze v1", + "file": "analyze.v1.js", + "docs_link": "https://cloud.google.com/natural-language/docs/", + "usage": "node analyze.v1.js --help" + }, + { + "id": "analyze-v1beta2", + "name": "Analyze v1beta2", + "file": "analyze.v1beta2.js", + "docs_link": "https://cloud.google.com/natural-language/docs/", + "usage": "node analyze.v1beta2.js --help" + }, + { + "id": "slackbot", + "name": "Slack Bot", + "ref": "slackbot/README.md" + } + ] } } From 48d5c9d1aab71b6d26818c613d4b81171d40f49a Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 9 May 2017 11:25:42 -0400 Subject: [PATCH 083/488] Revert "updated FQDN's to googleapis.com with a trailing dot (#2214)" (#2283) This reverts commit 13d4ed52402bfb4394aea505b4bab8e6caace989. --- .../google-cloud-language/src/v1/language_service_client.js | 4 ++-- .../src/v1beta2/language_service_client.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 06c0a5fd2d1..3ff283512f9 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -31,7 +31,7 @@ var configData = require('./language_service_client_config'); var extend = require('extend'); var gax = require('google-gax'); -var SERVICE_ADDRESS = 'language.googleapis.com.'; +var SERVICE_ADDRESS = 'language.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; @@ -369,4 +369,4 @@ function LanguageServiceClientBuilder(gaxGrpc) { } module.exports = LanguageServiceClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 8b7f9c87fe5..9f44f3af95a 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -31,7 +31,7 @@ var configData = require('./language_service_client_config'); var extend = require('extend'); var gax = require('google-gax'); -var SERVICE_ADDRESS = 'language.googleapis.com.'; +var SERVICE_ADDRESS = 'language.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; @@ -426,4 +426,4 @@ function LanguageServiceClientBuilder(gaxGrpc) { } module.exports = LanguageServiceClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file From 79de6d8bb22e79d49a4a125602f7c13804d8f3e2 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 10 May 2017 16:47:18 -0700 Subject: [PATCH 084/488] Upgrade repo tools and regenerate READMEs. (#384) --- packages/google-cloud-language/samples/README.md | 16 +++++++--------- .../google-cloud-language/samples/package.json | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index a15b3c89e19..9f93d1cc70b 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -4,7 +4,7 @@ [![Build](https://storage.googleapis.com/cloud-docs-samples-badges/GoogleCloudPlatform/nodejs-docs-samples/nodejs-docs-samples-language.svg)]() -[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API. +[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. ## Table of Contents @@ -20,11 +20,11 @@ 1. Read [Prerequisites][prereq] and [How to run a sample][run] first. 1. Install dependencies: - With `npm`: + With **npm**: npm install - With `yarn`: + With **yarn**: yarn install @@ -35,7 +35,6 @@ ### Analyze v1 - View the [documentation][analyze-v1_0_docs] or the [source code][analyze-v1_0_code]. __Usage:__ `node analyze.v1.js --help` @@ -68,7 +67,6 @@ For more information, see https://cloud.google.com/natural-language/docs ### Analyze v1beta2 - View the [documentation][analyze-v1beta2_1_docs] or the [source code][analyze-v1beta2_1_code]. __Usage:__ `node analyze.v1beta2.js --help` @@ -110,17 +108,17 @@ For more information, see https://cloud.google.com/natural-language/docs View the [README](slackbot/README.md). + ## Running the tests -1. Set the `GCLOUD_PROJECT` and `GOOGLE_APPLICATION_CREDENTIALS` environment - variables. +1. Set the **GCLOUD_PROJECT** and **GOOGLE_APPLICATION_CREDENTIALS** environment variables. 1. Run the tests: - With `npm`: + With **npm**: npm test - With `yarn`: + With **yarn**: yarn test diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 16bd919350d..08e2b3093d4 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -28,7 +28,7 @@ "yargs": "7.1.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.7", + "@google-cloud/nodejs-repo-tools": "1.4.13", "ava": "0.19.1", "proxyquire": "1.7.11", "sinon": "2.1.0" From 300de4fb48cca97b72e4e5d6b359bfea6ec7e294 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sat, 13 May 2017 15:16:56 -0400 Subject: [PATCH 085/488] language @ 0.10.4 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 550f0c46c5b..9e8d288919b 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.10.3", + "version": "0.10.4", "author": "Google Inc.", "description": "Cloud Natural Language Client Library for Node.js", "contributors": [ From b5993ab2f15ca472fa5bec7989ec557d42fcfd80 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Tue, 16 May 2017 09:33:07 -0700 Subject: [PATCH 086/488] Upgrade repo tools and regenerate READMEs. --- packages/google-cloud-language/samples/README.md | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 9f93d1cc70b..f944f0cae28 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -28,7 +28,7 @@ yarn install -[prereq]: ../README.md#prerequisities +[prereq]: ../README.md#prerequisites [run]: ../README.md#how-to-run-a-sample ## Samples diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 08e2b3093d4..caeb1e0266e 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -28,7 +28,7 @@ "yargs": "7.1.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.13", + "@google-cloud/nodejs-repo-tools": "1.4.14", "ava": "0.19.1", "proxyquire": "1.7.11", "sinon": "2.1.0" From 221561455a127da186f2f62546812edabc0f47a0 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sun, 4 Jun 2017 14:48:28 -0400 Subject: [PATCH 087/488] update deps --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 9e8d288919b..f5ada8d579f 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -55,7 +55,7 @@ "@google-cloud/common": "^0.13.0", "extend": "^3.0.0", "google-gax": "^0.13.0", - "google-proto-files": "^0.11.0", + "google-proto-files": "^0.12.0", "is": "^3.0.1", "string-format-obj": "^1.1.0" }, From 861a43c63928a81d83a01e095409296f7ab5f3bf Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sun, 4 Jun 2017 14:51:30 -0400 Subject: [PATCH 088/488] language @ 0.10.5 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f5ada8d579f..c7b8ff06538 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.10.4", + "version": "0.10.5", "author": "Google Inc.", "description": "Cloud Natural Language Client Library for Node.js", "contributors": [ From bd3bba2dab6b77a587f50f00099f381fe8eb8db1 Mon Sep 17 00:00:00 2001 From: Song Wang Date: Thu, 15 Jun 2017 09:58:13 -0700 Subject: [PATCH 089/488] update gapic retry config (#2390) --- .../src/v1beta2/language_service_client_config.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json index e394406ed24..8018f8a7bbf 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json @@ -6,9 +6,7 @@ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], - "non_idempotent": [ - "UNAVAILABLE" - ] + "non_idempotent": [] }, "retry_params": { "default": { From 004f33cc6edd00f4270672a0177dcf1e8fb879d9 Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Mon, 19 Jun 2017 16:59:32 -0700 Subject: [PATCH 090/488] Add + run dependency updating (bash) script (#401) * Add + run dependency updating script * Address comments Change-Id: I67af9d3ab9e461b579dbaee92274b6163d73c23e * Run dependency script again Change-Id: Icbec4acb2cc6bcfa40e0a3a705c5a1059d64efa5 * Update license Change-Id: Ic1dd0a1bd34356e415bdbf005b81a71a8d2695c2 * Update (more) dependencies Change-Id: Idaed95b9cfe486797fa75946b6f55e7e702217b8 --- packages/google-cloud-language/samples/package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index caeb1e0266e..c1a59c26e80 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -23,15 +23,15 @@ "test": "npm run system-test" }, "dependencies": { - "@google-cloud/language": "0.10.3", - "@google-cloud/storage": "1.1.0", - "yargs": "7.1.0" + "@google-cloud/language": "0.10.5", + "@google-cloud/storage": "1.1.1", + "yargs": "8.0.2" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.14", + "@google-cloud/nodejs-repo-tools": "1.4.15", "ava": "0.19.1", - "proxyquire": "1.7.11", - "sinon": "2.1.0" + "proxyquire": "1.8.0", + "sinon": "2.3.4" }, "cloud-repo-tools": { "requiresKeyFile": true, From 2ccb3002594bd805608df6acaa40a2b03f5d56f7 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 5 Jul 2017 17:07:20 -0400 Subject: [PATCH 091/488] language @ 0.10.6 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index c7b8ff06538..0d28b028c63 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "0.10.5", + "version": "0.10.6", "author": "Google Inc.", "description": "Cloud Natural Language Client Library for Node.js", "contributors": [ From 9fc73d8eae52e56351263e3b053d683546f943e3 Mon Sep 17 00:00:00 2001 From: Song Wang Date: Wed, 26 Jul 2017 14:21:18 -0700 Subject: [PATCH 092/488] Language Partial Veneer (#2422) --- packages/google-cloud-language/README.md | 210 +-- packages/google-cloud-language/package.json | 33 +- .../smoke-test/language_service_smoke_test.js | 40 + .../google-cloud-language/src/document.js | 706 -------- packages/google-cloud-language/src/index.js | 573 +----- .../src/v1/doc/doc_language_service.js | 1557 ++++++++++++++++ .../google-cloud-language/src/v1/index.js | 5 +- .../src/v1/language_service_client.js | 74 +- .../src/v1beta2/doc/doc_language_service.js | 1613 +++++++++++++++++ .../src/v1beta2/index.js | 4 +- .../src/v1beta2/language_service_client.js | 72 +- .../system-test/language.js | 391 ---- .../google-cloud-language/test/document.js | 767 -------- .../google-cloud-language/test/gapic-v1.js | 231 +++ .../test/gapic-v1beta2.js | 279 +++ packages/google-cloud-language/test/index.js | 425 ----- 16 files changed, 3924 insertions(+), 3056 deletions(-) create mode 100644 packages/google-cloud-language/smoke-test/language_service_smoke_test.js delete mode 100644 packages/google-cloud-language/src/document.js create mode 100644 packages/google-cloud-language/src/v1/doc/doc_language_service.js create mode 100644 packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js delete mode 100644 packages/google-cloud-language/system-test/language.js delete mode 100644 packages/google-cloud-language/test/document.js create mode 100644 packages/google-cloud-language/test/gapic-v1.js create mode 100644 packages/google-cloud-language/test/gapic-v1beta2.js delete mode 100644 packages/google-cloud-language/test/index.js diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index c447ef707c9..0a252c3876f 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -1,181 +1,49 @@ -# @google-cloud/language ([Beta][versioning]) -> Cloud Natural Language Client Library for Node.js +# Node.js Client for Google Cloud Natural Language API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-node#versioning)) -*Looking for more Google APIs than just Natural Language? You might want to check out [`google-cloud`][google-cloud].* +[Google Cloud Natural Language API][Product Documentation]: Google Cloud Natural Language API provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, and text annotations. +- [Client Library Documentation][] +- [Product Documentation][] -- [API Documentation][gcloud-language-docs] -- [Official Documentation][cloud-language-docs] +## Quick Start +In order to use this library, you first need to go through the following steps: +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +2. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/api/language) +3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/master/guides/authentication) -```sh -$ npm install --save @google-cloud/language -``` -```js -var language = require('@google-cloud/language')({ - projectId: 'grape-spaceship-123', - keyFilename: '/path/to/keyfile.json' -}); - -// Get the entities from a sentence. -language.detectEntities('Stephen of Michigan!', function(err, entities) { - // entities = [ - // { - // name: 'Stephen', - // type: 'PERSON', - // metadata: { - // mid: '/m/05d8y4q' - // }, - // salience: 0.7309288382530212, - // mentions: [ - // { - // text: { - // content: 'Stephen', - // beginOffset: -1 - // }, - // type: 'PROPER' - // } - // ] - // }, - // // ... - // ] -}); - -// Create a document if you plan to run multiple detections. -var document = language.document('Contributions welcome!'); - -// Analyze the sentiment of the document. -document.detectSentiment(function(err, sentiment) { - // sentiment = { - // magnitude: 0.30000001192092896, - // score: 0.30000001192092896 - // } -}); - -// Parse the syntax of the document. -document.annotate(function(err, annotation) { - // annotation = { - // language: 'en', - // sentiment: { - // magnitude: 0.30000001192092896, - // score: 0.30000001192092896 - // }, - // entities: [ - // { - // name: 'Contributions', - // type: 'OTHER', - // metadata: {}, - // salience: 1, - // mentions: [ - // { - // text: { - // content: 'Contributions', - // beginOffset: -1 - // }, - // type: 'COMMON' - // } - // ] - // } - // ], - // sentences: [ - // { - // text: { - // content: 'Contributions welcome!', - // beginOffset: -1 - // }, - // sentiment: { - // magnitude: 0.30000001192092896, - // score: 0.30000001192092896 - // } - // } - // ], - // tokens: [ - // { - // text: { - // content: 'Contributions', - // beginOffset: -1 - // }, - // partOfSpeech: { - // tag: 'NOUN', - // aspect: 'ASPECT_UNKNOWN', - // case: 'CASE_UNKNOWN', - // form: 'FORM_UNKNOWN', - // gender: 'GENDER_UNKNOWN', - // mood: 'MOOD_UNKNOWN', - // number: 'PLURAL', - // person: 'PERSON_UNKNOWN', - // proper: 'PROPER_UNKNOWN', - // reciprocity: 'RECIPROCITY_UNKNOWN', - // tense: 'TENSE_UNKNOWN', - // voice: 'VOICE_UNKNOWN' - // }, - // dependencyEdge: { - // headTokenIndex: 1, - // label: 'NSUBJ' - // }, - // lemma: 'contribution' - // }, - // // ... - // ] - // } -}); - -// Promises are also supported by omitting callbacks. -document.annotate().then(function(data) { - var annotations = data[0]; -}); - -// It's also possible to integrate with third-party Promise libraries. -var language = require('@google-cloud/language')({ - promise: require('bluebird') -}); +### Installation ``` - - -## Authentication - -It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Cloud services. - -### On Google Cloud Platform - -If you are running this client on Google Cloud Platform, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access. - -``` js -var language = require('@google-cloud/language')(); -// ...you're good to go! +$ npm install --save @google-cloud/language ``` -### Elsewhere - -If you are not running this client on Google Cloud Platform, you need a Google Developers service account. To create a service account: - -1. Visit the [Google Developers Console][dev-console]. -2. Create a new project or click on an existing project. -3. Navigate to **APIs & auth** > **APIs section** and turn on the following APIs (you may need to enable billing in order to use these services): - * Google Cloud Natural Language API -4. Navigate to **APIs & auth** > **Credentials** and then: - * If you want to use a new service account key, click on **Create credentials** and select **Service account key**. After the account key is created, you will be prompted to download the JSON key file that the library uses to authenticate your requests. - * If you want to generate a new service account key for an existing service account, click on **Generate new JSON key** and download the JSON key file. - -``` js -var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123' - -var language = require('@google-cloud/language')({ - projectId: projectId, - - // The path to your key file: - keyFilename: '/path/to/keyfile.json' - - // Or the contents of the key file: - credentials: require('./path/to/keyfile.json') -}); - -// ...you're good to go! +### Preview +#### LanguageServiceClient +```js + var language = require('@google-cloud/language'); + + var client = language({ + // optional auth parameters. + }); + + var content = 'Hello, world!'; + var type = language.v1.types.Document.Type.PLAIN_TEXT; + var document = { + content : content, + type : type + }; + client.analyzeSentiment({document: document}).then(function(responses) { + var response = responses[0]; + // doThingsWith(response) + }) + .catch(function(err) { + console.error(err); + }); ``` +### Next Steps +- Read the [Client Library Documentation][] for Google Cloud Natural Language API to see other available methods on the client. +- Read the [Google Cloud Natural Language API Product documentation][Product Documentation] to learn more about the product and see How-to Guides. +- View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/README.md) to see the full list of Cloud APIs that we cover. -[versioning]: https://github.com/GoogleCloudPlatform/google-cloud-node#versioning -[google-cloud]: https://github.com/GoogleCloudPlatform/google-cloud-node/ -[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using -[dev-console]: https://console.developers.google.com/project -[gcloud-language-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/language -[cloud-language-docs]: https://cloud.google.com/natural-language/docs +[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/language +[Product Documentation]: https://cloud.google.com/language \ No newline at end of file diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 0d28b028c63..5ae5dd36525 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,8 +1,9 @@ { + "repository": "GoogleCloudPlatform/google-cloud-node", "name": "@google-cloud/language", "version": "0.10.6", - "author": "Google Inc.", - "description": "Cloud Natural Language Client Library for Node.js", + "author": "Google Inc", + "description": "Google Cloud Natural Language API client for Node.js", "contributors": [ { "name": "Burcu Dogan", @@ -29,14 +30,12 @@ "email": "sawchuk@gmail.com" } ], - "main": "./src/index.js", + "main": "src/index.js", "files": [ "src", "AUTHORS", - "CONTRIBUTORS", "COPYING" ], - "repository": "googlecloudplatform/google-cloud-node", "keywords": [ "google apis client", "google api client", @@ -46,30 +45,22 @@ "google cloud platform", "google cloud", "cloud", - "google cloud natural language", - "google cloud language", - "natural language", - "language" + "google language", + "language", + "Google Cloud Natural Language API" ], "dependencies": { - "@google-cloud/common": "^0.13.0", - "extend": "^3.0.0", - "google-gax": "^0.13.0", "google-proto-files": "^0.12.0", - "is": "^3.0.1", - "string-format-obj": "^1.1.0" + "google-gax": "^0.13.2", + "extend": "^3.0.0" }, "devDependencies": { - "@google-cloud/storage": "*", - "mocha": "^3.0.2", - "proxyquire": "^1.7.10", - "through2": "^2.0.1", - "uuid": "^3.0.1" + "mocha": "^3.2.0" }, "scripts": { "publish-module": "node ../../scripts/publish.js language", - "test": "mocha test/*.js", - "system-test": "mocha system-test/*.js --no-timeouts --bail" + "smoke-test": "mocha smoke-test/*.js --timeout 5000", + "test": "mocha test/*.js" }, "license": "Apache-2.0", "engines": { diff --git a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js new file mode 100644 index 00000000000..1f38b3207a2 --- /dev/null +++ b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js @@ -0,0 +1,40 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; + +describe('LanguageServiceSmokeTest', function() { + + it('successfully makes a call to the service', function(done) { + var language = require('../src'); + + var client = language.v1({ + // optional auth parameters. + }); + + var content = 'Hello, world!'; + var type = language.v1.types.Document.Type.PLAIN_TEXT; + var document = { + content : content, + type : type + }; + client.analyzeSentiment({document: document}).then(function(responses) { + var response = responses[0]; + console.log(response); + }) + .then(done) + .catch(done); + }); +}); \ No newline at end of file diff --git a/packages/google-cloud-language/src/document.js b/packages/google-cloud-language/src/document.js deleted file mode 100644 index e2499fc52e3..00000000000 --- a/packages/google-cloud-language/src/document.js +++ /dev/null @@ -1,706 +0,0 @@ -/*! - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*! - * @module language/document - */ - -'use strict'; - -var common = require('@google-cloud/common'); -var extend = require('extend'); -var format = require('string-format-obj'); -var is = require('is'); - -/*! Developer Documentation - * - * @param {module:language} language - The parent Language object. - */ -/* - * Create a Natural Language Document object. From this object, you will be able - * to run multiple detections. - * - * @constructor - * @alias module:language/document - * - * @param {object|string|module:storage/file} config - Configuration object, the - * inline content of the document, or a Storage File object. - * @param {string|module:storage/file} options.content - If using `config` as an - * object to specify the language of the document, use this property to pass - * the inline content of the document or a Storage File object. - * @param {string} options.language - The language of the text. - * @return {module:language/document} - * - * @example - * var textToAnalyze = [ - * 'Google is an American multinational technology company specializing in', - * 'Internet-related services and products.' - * ].join(' '); - * - * var document = language.document(textToAnalyze); - * - * //- - * // Create a Document object with pre-defined configuration, such as its - * // language. - * //- - * var spanishDocument = language.document('¿Dónde está la sede de Google?', { - * language: 'es' - * }); - */ -function Document(language, config) { - var content = config.content || config; - - this.api = language.api; - this.encodingType = this.detectEncodingType_(config); - - this.document = {}; - - if (config.language) { - this.document.language = config.language; - } - - if (config.type) { - this.document.type = config.type.toUpperCase(); - - if (this.document.type === 'TEXT') { - this.document.type = 'PLAIN_TEXT'; - } - } else { - // Default to plain text. - this.document.type = 'PLAIN_TEXT'; - } - - if (common.util.isCustomType(content, 'storage/file')) { - this.document.gcsContentUri = format('gs://{bucket}/{file}', { - bucket: encodeURIComponent(content.bucket.id), - file: encodeURIComponent(content.id) - }); - } else { - this.document.content = content; - - if (Buffer.isBuffer(content)) { - this.encodingType = 'UTF8'; - } - } -} - -/** - * Labels that can be used to represent a token. - * - * @private - * @type {object} - */ -Document.LABEL_DESCRIPTIONS = { - UNKNOWN: 'Unknown', - ABBREV: 'Abbreviation modifier', - ACOMP: 'Adjectival complement', - ADVCL: 'Adverbial clause modifier', - ADVMOD: 'Adverbial modifier', - AMOD: 'Adjectival modifier of an NP', - APPOS: 'Appositional modifier of an NP', - ATTR: 'Attribute dependent of a copular verb', - AUX: 'Auxiliary (non-main) verb', - AUXPASS: 'Passive auxiliary', - CC: 'Coordinating conjunction', - CCOMP: 'Clausal complement of a verb or adjective', - CONJ: 'Conjunct', - CSUBJ: 'Clausal subject', - CSUBJPASS: 'Clausal passive subject', - DEP: 'Dependency (unable to determine)', - DET: 'Determiner', - DISCOURSE: 'Discourse', - DOBJ: 'Direct object', - EXPL: 'Expletive', - GOESWITH: ' Goes with (part of a word in a text not well edited)', - IOBJ: 'Indirect object', - MARK: 'Marker (word introducing a subordinate clause)', - MWE: 'Multi-word expression', - MWV: 'Multi-word verbal expression', - NEG: 'Negation modifier', - NN: 'Noun compound modifier', - NPADVMOD: 'Noun phrase used as an adverbial modifier', - NSUBJ: 'Nominal subject', - NSUBJPASS: 'Passive nominal subject', - NUM: 'Numeric modifier of a noun', - NUMBER: 'Element of compound number', - P: 'Punctuation mark', - PARATAXIS: 'Parataxis relation', - PARTMOD: 'Participial modifier', - PCOMP: 'The complement of a preposition is a clause', - POBJ: 'Object of a preposition', - POSS: 'Possession modifier', - POSTNEG: 'Postverbal negative particle', - PRECOMP: 'Predicate complement', - PRECONJ: 'Preconjunt', - PREDET: 'Predeterminer', - PREF: 'Prefix', - PREP: 'Prepositional modifier', - PRONL: 'The relationship between a verb and verbal morpheme', - PRT: 'Particle', - PS: 'Associative or possessive marker', - QUANTMOD: 'Quantifier phrase modifier', - RCMOD: 'Relative clause modifier', - RCMODREL: 'Complementizer in relative clause', - RDROP: 'Ellipsis without a preceding predicate', - REF: 'Referent', - REMNANT: 'Remnant', - REPARANDUM: 'Reparandum', - ROOT: 'Root', - SNUM: 'Suffix specifying a unit of number', - SUFF: 'Suffix', - TMOD: 'Temporal modifier', - TOPIC: 'Topic marker', - VMOD: 'Clause headed by an infinite form of the verb that modifies a noun', - VOCATIVE: 'Vocative', - XCOMP: 'Open clausal complement', - SUFFIX: 'Name suffix', - TITLE: 'Name title', - ADVPHMOD: 'Adverbial phrase modifier', - AUXCAUS: 'Causative auxiliary', - AUXVV: 'Helper auxiliary', - DTMOD: 'Rentaishi (Prenominal modifier)', - FOREIGN: 'Foreign words', - KW: 'Keyword', - LIST: 'List for chains of comparable items', - NOMC: 'Nominalized clause', - NOMCSUBJ: 'Nominalized clausal subject', - NOMCSUBJPASS: 'Nominalized clausal passive', - NUMC: 'Compound of numeric modifier', - COP: 'Copula', - DISLOCATED: 'Dislocated relation (for fronted/topicalized elements)' -}; - -/** - * The parts of speech that will be recognized by the Natural Language API. - * - * @private - * @type {object} - */ -Document.PART_OF_SPEECH = { - UNKNOWN: 'Unknown', - ADJ: 'Adjective', - ADP: 'Adposition (preposition and postposition)', - ADV: 'Adverb', - CONJ: 'Conjunction', - DET: 'Determiner', - NOUN: 'Noun (common and proper)', - NUM: 'Cardinal number', - PRON: 'Pronoun', - PRT: 'Particle or other function word', - PUNCT: 'Punctuation', - VERB: 'Verb (all tenses and modes)', - X: 'Other: foreign words, typos, abbreviations', - AFFIX: 'Affix' -}; - -/** - * Run an annotation of the text from the document. - * - * By default, all annotation types are requested: - * - * - The sentiment of the document (positive or negative) - * - The entities of the document (people, places, things, etc.) - * - The syntax of the document (adjectives, nouns, verbs, etc.) - * - * See the examples below for how to request a subset of those types. - * - * If you only need one type of annotation, you may appreciate one of these - * other methods from our API: - * - * - {module:language#detectEntities} - * - {module:language#detectSentiment} - * - {module:language#detectSyntax} - * - * @resource [documents.annotateText API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText} - * - * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/annotateText#features). - * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also - * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: - * 'UTF8' if a Buffer, otherwise 'UTF16'. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {boolean} options.entities - Detect the entities from this document. - * By default, all features (`entities`, `sentiment`, and `syntax`) are - * enabled. By overriding any of these values, all defaults are switched to - * `false`. (Alias for `options.extractEntities`) - * @param {number} options.sentiment - Detect the sentiment from this document. - * By default, all features (`entities`, `sentiment`, and `syntax`) are - * enabled. By overriding any of these values, all defaults are switched to - * `false`. (Alias for `options.extractSentiment`) - * @param {boolean} options.syntax - Detect the syntax from this document. By - * default, all features (`entities`, `sentiment`, and `syntax`) are - * enabled. By overriding any of these values, all defaults are switched to - * `false`. (Alias for `options.extractDocumentSyntax`) - * @param {function} callback - The callback function. - * @param {?error} callback.err - An error occurred while making this request. - * @param {object} callback.annotation - The formatted API response. - * @param {string} callback.annotation.language - The language detected from the - * text. - * @param {number} callback.annotation.sentiment - An object representing the - * overall sentiment of the text. - * @param {object} callback.annotation.entities - The recognized entities from - * the text, grouped by the type of entity. - * @param {string[]} callback.annotation.sentences - Sentences detected from the - * text. - * @param {object[]} callback.annotation.tokens - Parts of speech that were - * detected from the text. - * @param {object} callback.apiResponse - The full API response. - * - * @example - * document.annotate(function(err, annotation) { - * if (err) { - * // Error handling omitted. - * } - * - * // annotation = { - * // language: 'en', - * // sentiment: { - * // magnitude: 0.5, - * // score: 0.5 - * // }, - * // entities: [ - * // { - * // name: 'Google', - * // type: 'ORGANIZATION', - * // metadata: { - * // mid: '/m/045c7b', - * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' - * // }, - * // salience: 0.7532734870910645, - * // mentions: [ - * // { - * // text: { - * // content: 'Google', - * // beginOffset: -1 - * // }, - * // type: 'PROPER' - * // }, - * // // ... - * // } - * // } - * // ], - * // sentences: [ - * // { - * // text: { - * // content: 'Google is an American multinational technology...', - * // beginOffset: -1 - * // }, - * // sentiment: { - * // magnitude: 0.5, - * // score: 0.5 - * // } - * // } - * // ], - * // tokens: [ - * // { - * // text: { - * // content: 'Google', - * // beginOffset: -1 - * // }, - * // partOfSpeech: { - * // tag: 'NOUN', - * // aspect: 'ASPECT_UNKNOWN', - * // case: 'CASE_UNKNOWN', - * // form: 'FORM_UNKNOWN', - * // gender: 'GENDER_UNKNOWN', - * // mood: 'MOOD_UNKNOWN', - * // number: 'SINGULAR', - * // person: 'PERSON_UNKNOWN', - * // proper: 'PROPER', - * // reciprocity: 'RECIPROCITY_UNKNOWN', - * // tense: 'TENSE_UNKNOWN', - * // voice: 'VOICE_UNKNOWN' - * // }, - * // dependencyEdge: { - * // headTokenIndex: 1, - * // label: 'NSUBJ' - * // }, - * // lemma: 'Google' - * // }, - * // // ... - * // ] - * // } - * }); - * - * //- - * // To request only certain annotation types, provide an options object. - * //- - * var options = { - * entities: true, - * sentiment: true - * }; - * - * document.annotate(function(err, annotation) { - * if (err) { - * // Error handling omitted. - * } - * - * // annotation = { - * // language: 'en', - * // sentiment: { - * // magnitude: 0.5, - * // score: 0.5 - * // }, - * // entities: [ - * // { - * // name: 'Google', - * // type: 'ORGANIZATION', - * // metadata: { - * // mid: '/m/045c7b', - * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' - * // }, - * // salience: 0.7532734870910645, - * // mentions: [ - * // { - * // text: { - * // content: 'Google', - * // beginOffset: -1 - * // }, - * // type: 'PROPER' - * // }, - * // // ... - * // } - * // } - * // ] - * // } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * document.annotate().then(function(data) { - * var annotation = data[0]; - * var apiResponse = data[1]; - * }); - */ -Document.prototype.annotate = function(options, callback) { - if (is.fn(options)) { - callback = options; - options = {}; - } - - var features = { - extractDocumentSentiment: true, - extractEntities: true, - extractSyntax: true - }; - - var featuresRequested = { - extractDocumentSentiment: - (options.extractDocumentSentiment || options.sentiment) === true, - extractEntities: - (options.extractEntities || options.entities) === true, - extractSyntax: - (options.extractSyntax || options.syntax) === true - }; - - var numFeaturesRequested = 0; - - for (var featureRequested in featuresRequested) { - if (featuresRequested[featureRequested]) { - numFeaturesRequested++; - } - } - - if (numFeaturesRequested > 0) { - features = featuresRequested; - } - - this.api.Language.annotateText({ - document: this.document, - features: features, - encodingType: this.detectEncodingType_(options) - }, function(err, resp) { - if (err) { - callback(err, null, resp); - return; - } - - var originalResp = extend(true, {}, resp); - - var annotation = { - language: resp.language - }; - - if (resp.documentSentiment && features.extractDocumentSentiment) { - annotation.sentiment = resp.documentSentiment; - } - - if (resp.entities) { - annotation.entities = resp.entities; - } - - // This prevents empty `sentences` and `tokens` arrays being returned to - // users who never wanted sentences or tokens to begin with. - if (numFeaturesRequested === 0 || featuresRequested.extractSyntax) { - annotation.sentences = resp.sentences; - annotation.tokens = resp.tokens; - } - - callback(null, annotation, originalResp); - }); -}; - -/** - * Detect entities from the document. - * - * @resource [documents.analyzeEntities API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities} - * - * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities#request-body). - * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also - * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: - * 'UTF8' if a Buffer, otherwise 'UTF16'. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {boolean} options.verbose - Enable verbose mode for more detailed - * results. Default: `false` - * @param {function} callback - The callback function. - * @param {?error} callback.err - An error occurred while making this request. - * @param {object} callback.entities - The recognized entities from the text, - * grouped by the type of entity. - * @param {object} callback.apiResponse - The full API response. - * - * @example - * document.detectEntities(function(err, entities) { - * if (err) { - * // Error handling omitted. - * } - * - * // entities = [ - * // { - * // name: 'Google', - * // type: 'ORGANIZATION', - * // metadata: { - * // mid: '/m/045c7b', - * // wikipedia_url: 'http://en.wikipedia.org/wiki/Google' - * // }, - * // salience: 0.7532734870910645, - * // mentions: [ - * // { - * // text: { - * // content: 'Google', - * // beginOffset: -1 - * // }, - * // type: 'PROPER' - * // }, - * // // ... - * // } - * // }, - * // // ... - * // ] - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * document.detectEntities().then(function(data) { - * var entities = data[0]; - * var apiResponse = data[1]; - * }); - */ -Document.prototype.detectEntities = function(options, callback) { - if (is.fn(options)) { - callback = options; - options = {}; - } - - this.api.Language.analyzeEntities({ - document: this.document, - encodingType: this.detectEncodingType_(options) - }, function(err, resp) { - if (err) { - callback(err, null, resp); - return; - } - - callback(null, resp.entities, resp); - }); -}; - -/** - * Detect the sentiment of the text in this document. - * - * @resource [documents.analyzeSentiment API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment} - * - * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment#request-body). - * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also - * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: - * 'UTF8' if a Buffer, otherwise 'UTF16'. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {function} callback - The callback function. - * @param {?error} callback.err - An error occurred while making this request. - * @param {number} callback.sentiment - An object representing the overall - * sentiment of the text. - * @param {object} callback.apiResponse - The full API response. - * - * @example - * document.detectSentiment(function(err, sentiment) { - * if (err) { - * // Error handling omitted. - * } - * - * // sentiment = { - * // magnitude: 0.5, - * // score: 0.5 - * // } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * document.detectSentiment().then(function(data) { - * var sentiment = data[0]; - * var apiResponse = data[1]; - * }); - */ -Document.prototype.detectSentiment = function(options, callback) { - if (is.fn(options)) { - callback = options; - options = {}; - } - - this.api.Language.analyzeSentiment({ - document: this.document, - encodingType: this.detectEncodingType_(options) - }, function(err, resp) { - if (err) { - callback(err, null, resp); - return; - } - - callback(null, resp.documentSentiment, resp); - }); -}; - -/** - * Detect syntax from the document. - * - * @resource [documents.analyzeSyntax API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax} - * - * @param {object=} options - Configuration object. See - * [documents.annotateSyntax](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax#request-body). - * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also - * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: - * 'UTF8' if a Buffer, otherwise 'UTF16'. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {function} callback - The callback function. - * @param {?error} callback.err - An error occurred while making this request. - * @param {object[]} callback.syntax - The syntax recognized from the text. - * @param {object} callback.apiResponse - The full API response. - * - * @example - * document.detectSyntax(function(err, syntax) { - * if (err) { - * // Error handling omitted. - * } - * - * // syntax = [ - * // { - * // text: { - * // content: 'Google', - * // beginOffset: -1 - * // }, - * // partOfSpeech: { - * // tag: 'NOUN', - * // aspect: 'ASPECT_UNKNOWN', - * // case: 'CASE_UNKNOWN', - * // form: 'FORM_UNKNOWN', - * // gender: 'GENDER_UNKNOWN', - * // mood: 'MOOD_UNKNOWN', - * // number: 'SINGULAR', - * // person: 'PERSON_UNKNOWN', - * // proper: 'PROPER', - * // reciprocity: 'RECIPROCITY_UNKNOWN', - * // tense: 'TENSE_UNKNOWN', - * // voice: 'VOICE_UNKNOWN' - * // }, - * // dependencyEdge: { - * // headTokenIndex: 1, - * // label: 'NSUBJ' - * // }, - * // lemma: 'Google' - * // }, - * // // ... - * // ] - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * document.detectSyntax().then(function(data) { - * var syntax = data[0]; - * var apiResponse = data[1]; - * }); - */ -Document.prototype.detectSyntax = function(options, callback) { - if (is.fn(options)) { - callback = options; - options = {}; - } - - this.api.Language.analyzeSyntax({ - document: this.document, - encodingType: this.detectEncodingType_(options) - }, function(err, resp) { - if (err) { - callback(err, null, resp); - return; - } - - callback(null, resp.tokens, resp); - }); -}; - -/** - * Check if the user provided an encodingType, and map it to its API value. - * - * @param {object} options - Configuration object. - * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also - * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: - * 'UTF8' if a Buffer, otherwise 'UTF16'. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @return {string} - The encodingType, as understood by the API. - */ -Document.prototype.detectEncodingType_ = function(options) { - var encoding = options.encoding || options.encodingType || this.encodingType; - - if (!encoding) { - return; - } - - encoding = encoding.toUpperCase().replace(/[ -]/g, ''); - - if (encoding === 'BUFFER') { - encoding = 'UTF8'; - } - - if (encoding === 'STRING') { - encoding = 'UTF16'; - } - - return encoding; -}; - -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -common.util.promisifyAll(Document); - -module.exports = Document; - diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 00bbe851b12..7919b904585 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -1,11 +1,11 @@ -/*! - * Copyright 2016 Google Inc. All Rights Reserved. +/* + * Copyright 2017, Google Inc. All rights reserved. * * 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 * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,549 +16,90 @@ /*! * @module language + * @name Language */ 'use strict'; -var common = require('@google-cloud/common'); var extend = require('extend'); -var is = require('is'); -var v1 = require('./v1'); -var v1beta2 = require('./v1beta2'); - -var GAPIC_APIS = { - v1: v1, - v1beta2: v1beta2 +var gapic = { + v1: require('./v1'), + v1beta2: require('./v1beta2') }; +var gaxGrpc = require('google-gax').grpc(); -/** - * @type {module:language/document} - * @private - */ -var Document = require('./document.js'); +const VERSION = require('../package.json').version; /** - * The [Cloud Natural Language](https://cloud.google.com/natural-language/docs) - * API provides natural language understanding technologies to developers, - * including sentiment analysis, entity recognition, and syntax analysis. This - * API is part of the larger Cloud Machine Learning API. + * Create a V1 languageServiceClient with additional helpers for common + * tasks. * - * The Cloud Natural Language API currently supports English, Spanish, and - * Japanese for - * [sentiment analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeSentiment), - * [entity analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeEntities) - * and - * [syntax analysis](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/annotateText). + * Provides text analysis operations such as sentiment analysis and entity + * recognition. * * @constructor * @alias module:language * - * @resource [Cloud Natural Language API Documentation]{@link https://cloud.google.com/natural-language/docs} - * - * @param {object} options - [Configuration object](#/docs). - * @param {string} options.apiVersion - Either `v1` or `v1beta2`. `v1beta2` is a - * *newer* release than `v1`, and still in beta. By choosing it, you are - * opting into new, back-end behavior which is not officially supported by - * the design of this API. (Default: `v1`) + * @param {object=} options - [Configuration object](#/docs). + * @param {number=} options.port - The port on which to connect to + * the remote host. + * @param {string=} options.servicePath - The domain name of the + * API remote host. */ -function Language(options) { - if (!(this instanceof Language)) { - options = common.util.normalizeArguments(this, options); - return new Language(options); - } - +function languageV1(options) { + // Define the header options. options = extend({}, options, { libName: 'gccl', - libVersion: require('../package.json').version + libVersion: VERSION }); - var gapic = GAPIC_APIS[options.apiVersion || 'v1']; - - if (!gapic) { - throw new Error('Invalid `apiVersion` specified. Use "v1" or "v1beta2".'); - } - - delete options.apiVersion; - - this.api = { - Language: gapic(options).languageServiceClient(options) - }; + // Create the client with the provided options. + var client = gapic.v1(options).languageServiceClient(options); + return client; } /** - * Run an annotation of a block of text. - * - * NOTE: This is a convenience method which doesn't require creating a - * {module:language/document} object. If you are only running a single - * detection, this may be more convenient. However, if you plan to run multiple - * detections, it's easier to create a {module:language/document} object. - * - * @resource [documents.annotate API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText} - * - * @param {string|module:storage/file} content - Inline content or a Storage - * File object. - * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/annotateText#request-body). - * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also - * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: - * 'UTF8' if a Buffer, otherwise 'UTF16'. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {string} options.language - The language of the text. - * @param {string} options.type - The type of document, either `html` or `text`. - * @param {function} callback - See {module:language/document#annotate}. - * - * @example - * //- - * // See {module:language/document#annotate} for a detailed breakdown of - * // the arguments your callback will be executed with. - * //- - * function callback(err, entities, apiResponse) {} - * - * language.annotate('Hello!', callback); - * - * //- - * // Or, provide a reference to a file hosted on Cloud Storage. - * //- - * var gcs = require('@google-cloud/storage')({ - * projectId: 'grape-spaceship-123' - * }); - * var bucket = gcs.bucket('my-bucket'); - * var file = bucket.file('my-file'); + * Create a V1beta2 languageServiceClient with additional helpers for common + * tasks. * - * language.annotate(file, callback); + * Provides text analysis operations such as sentiment analysis and entity + * recognition. * - * //- - * // Specify HTML content. - * //- - * var options = { - * type: 'html' - * }; - * - * language.annotate('Hello!', options, callback); - * - * //- - * // Specify the language the text is written in. - * //- - * var options = { - * language: 'es', - * entities: true - * }; - * - * language.annotate('¿Dónde está la sede de Google?', options, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * language.annotate('Hello!').then(function(data) { - * var entities = data[0]; - * var apiResponse = data[1]; - * }); + * @param {object=} options - [Configuration object](#/docs). + * @param {number=} options.port - The port on which to connect to + * the remote host. + * @param {string=} options.servicePath - The domain name of the + * API remote host. */ -Language.prototype.annotate = function(content, options, callback) { - if (is.fn(options)) { - callback = options; - options = {}; - } - +function languageV1beta2(options) { + // Define the header options. options = extend({}, options, { - content: content - }); - - var document = this.document(options); - document.annotate(options, callback); -}; - -/** - * Detect the entities from a block of text. - * - * NOTE: This is a convenience method which doesn't require creating a - * {module:language/document} object. If you are only running a single - * detection, this may be more convenient. However, if you plan to run multiple - * detections, it's easier to create a {module:language/document} object. - * - * @resource [documents.analyzeEntities API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities} - * - * @param {string|module:storage/file} content - Inline content or a Storage - * File object. - * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeEntities#request-body). - * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also - * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: - * 'UTF8' if a Buffer, otherwise 'UTF16'. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {string} options.language - The language of the text. - * @param {string} options.type - The type of document, either `html` or `text`. - * @param {function} callback - See {module:language/document#detectEntities}. - * - * @example - * //- - * // See {module:language/document#detectEntities} for a detailed breakdown of - * // the arguments your callback will be executed with. - * //- - * function callback(err, entities, apiResponse) {} - * - * language.detectEntities('Axel Foley is from Detroit', callback); - * - * //- - * // Or, provide a reference to a file hosted on Cloud Storage. - * //- - * var gcs = require('@google-cloud/storage')({ - * projectId: 'grape-spaceship-123' - * }); - * var bucket = gcs.bucket('my-bucket'); - * var file = bucket.file('my-file'); - * - * language.detectEntities(file, callback); - * - * //- - * // Specify HTML content. - * //- - * var options = { - * type: 'html' - * }; - * - * language.detectEntities('Axel Foley is from Detroit', options, callback); - * - * //- - * // Specify the language the text is written in. - * //- - * var options = { - * language: 'es' - * }; - * - * language.detectEntities('Axel Foley es de Detroit', options, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * language.detectEntities('Axel Foley is from Detroit').then(function(data) { - * var entities = data[0]; - * var apiResponse = data[1]; - * }); - */ -Language.prototype.detectEntities = function(content, options, callback) { - if (is.fn(options)) { - callback = options; - options = {}; - } - - options = extend({}, options, { - content: content - }); - - var document = this.document(options); - document.detectEntities(options, callback); -}; - -/** - * Detect the sentiment of a block of text. - * - * NOTE: This is a convenience method which doesn't require creating a - * {module:language/document} object. If you are only running a single - * detection, this may be more convenient. However, if you plan to run multiple - * detections, it's easier to create a {module:language/document} object. - * - * @resource [documents.analyzeSentiment API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment} - * - * @param {string|module:storage/file} content - Inline content or a Storage - * File object. - * @param {object=} options - Configuration object. See - * [documents.annotateText](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSentiment#request-body). - * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also - * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: - * 'UTF8' if a Buffer, otherwise 'UTF16'. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {string} options.language - The language of the text. - * @param {string} options.type - The type of document, either `html` or `text`. - * @param {function} callback - See {module:language/document#detectSentiment}. - * - * @example - * //- - * // See {module:language/document#detectSentiment} for a detailed breakdown of - * // the arguments your callback will be executed with. - * //- - * function callback(err, sentiment, apiResponse) {} - * - * language.detectSentiment('Hello!', callback); - * - * //- - * // Or, provide a reference to a file hosted on Cloud Storage. - * //- - * var gcs = require('@google-cloud/storage')({ - * projectId: 'grape-spaceship-123' - * }); - * var bucket = gcs.bucket('my-bucket'); - * var file = bucket.file('my-file'); - * - * language.detectSentiment(file, callback); - * - * //- - * // Specify HTML content. - * //- - * var options = { - * type: 'html' - * }; - * - * language.detectSentiment('<h1>Document Title</h1>', options, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * language.detectSentiment('Hello!').then(function(data) { - * var sentiment = data[0]; - * var apiResponse = data[1]; - * }); - */ -Language.prototype.detectSentiment = function(content, options, callback) { - if (is.fn(options)) { - callback = options; - options = {}; - } - - options = extend({}, options, { - content: content - }); - - var document = this.document(options); - document.detectSentiment(options, callback); -}; - -/** - * Detect the syntax of a block of text. - * - * NOTE: This is a convenience method which doesn't require creating a - * {module:language/document} object. If you are only running a single - * detection, this may be more convenient. However, if you plan to run multiple - * detections, it's easier to create a {module:language/document} object. - * - * @resource [documents.analyzeSyntax API Documentation]{@link https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax} - * - * @param {string|module:storage/file} content - Inline content or a Storage - * File object. - * @param {object=} options - Configuration object. See - * [documents.analyzeSyntax](https://cloud.google.com/natural-language/reference/rest/v1/documents/analyzeSyntax#request-body). - * @param {string} options.encoding - `UTF8` (also, `buffer`), `UTF16` (also - * `string`), or `UTF32`. (Alias for `options.encodingType`). Default: - * 'UTF8' if a Buffer, otherwise 'UTF16'. See - * [`EncodingType`](https://cloud.google.com/natural-language/reference/rest/v1/EncodingType) - * @param {string} options.language - The language of the text. - * @param {string} options.type - The type of document, either `html` or `text`. - * @param {function} callback - See {module:language/document#detectSyntax}. - * - * @example - * //- - * // See {module:language/document#detectSyntax} for a detailed breakdown of - * // the arguments your callback will be executed with. - * //- - * function callback(err, syntax, apiResponse) {} - * - * language.detectSyntax('Axel Foley is from Detroit', callback); - * - * //- - * // Or, provide a reference to a file hosted on Cloud Storage. - * //- - * var gcs = require('@google-cloud/storage')({ - * projectId: 'grape-spaceship-123' - * }); - * var bucket = gcs.bucket('my-bucket'); - * var file = bucket.file('my-file'); - * - * language.detectSyntax(file, callback); - * - * //- - * // Specify HTML content. - * //- - * var options = { - * type: 'html' - * }; - * - * language.detectSyntax('Axel Foley is from Detroit', options, callback); - * - * //- - * // Specify the language the text is written in. - * //- - * var options = { - * language: 'es' - * }; - * - * language.detectSyntax('Axel Foley es de Detroit', options, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * language.detectSyntax('Axel Foley is from Detroit').then(function(data) { - * var syntax = data[0]; - * var apiResponse = data[1]; - * }); - */ -Language.prototype.detectSyntax = function(content, options, callback) { - if (is.fn(options)) { - callback = options; - options = {}; - } - - options = extend({}, options, { - content: content + libName: 'gccl', + libVersion: VERSION }); - var document = this.document(options); - document.detectSyntax(options, callback); -}; - -/** - * Create a Document object for an unknown type. If you know the type, use the - * appropriate method below: - * - * - {module:language#html} - For HTML documents. - * - {module:language#text} - For text documents. - * - * @param {object|string|module:storage/file} config - Configuration object, the - * inline content of the document, or a Storage File object. - * @param {string|module:storage/file} options.content - If using `config` as an - * object to specify the encoding and/or language of the document, use this - * property to pass the inline content of the document or a Storage File - * object. - * @param {string} options.language - The language of the text. - * @return {module:language/document} - * - * @example - * var document = language.document('Inline content of an unknown type.'); - * - * //- - * // Or, provide a reference to a file hosted on Cloud Storage. - * //- - * var gcs = require('@google-cloud/storage')({ - * projectId: 'grape-spaceship-123' - * }); - * var bucket = gcs.bucket('my-bucket'); - * var file = bucket.file('my-file'); - * - * var document = language.document(file); - * - * //- - * // Create a Document object with pre-defined configuration, such as its - * // language. - * //- - * var document = language.document('¿Dónde está la sede de Google?', { - * language: 'es' - * }); - * - * //- - * // You can now run detections on the document. - * // - * // See {module:language/document} for a complete list of methods available. - * //- - * document.detectEntities(function(err, entities) {}); - */ -Language.prototype.document = function(config) { - return new Document(this, config); -}; - -/** - * Create a Document object from an HTML document. You may provide either inline - * HTML content or a Storage File object (see {module:storage/file}). - * - * @param {string|module:storage/file} content - Inline HTML content or a - * Storage File object. - * @param {object=} options - Configuration object. - * @param {string} options.language - The language of the text. - * @return {module:language/document} - * - * @example - * var document = language.html('<h1>Document Title</h1>'); - * - * //- - * // Or, provide a reference to a file hosted on Cloud Storage. - * //- - * var gcs = require('@google-cloud/storage')({ - * projectId: 'grape-spaceship-123' - * }); - * var bucket = gcs.bucket('my-bucket'); - * var file = bucket.file('my-file.html'); - * - * var document = language.html(file); - * - * //- - * // Create a Document object with pre-defined configuration, such as its - * // language. - * //- - * var document = language.html('<h1>Titulo del documento</h1>', { - * language: 'es' - * }); - * - * //- - * // You can now run detections on the document. - * // - * // See {module:language/document} for a complete list of methods available. - * //- - * document.detectEntities(function(err, entities) {}); - */ -Language.prototype.html = function(content, options) { - options = extend({}, options, { - type: 'HTML', - content: content - }); + // Create the client with the provided options. + var client = gapic.v1beta2(options).languageServiceClient(options); + return client; +} - return this.document(options); -}; +var v1Protos = {}; -/** - * Create a Document object from a text-based document. You may provide either - * inline text content or a Storage File object (see {module:storage/file}). - * - * @param {string|module:storage/file} content - Inline text content or a - * Storage File object. - * @param {object=} options - Configuration object. - * @param {string} options.language - The language of the text. - * @return {module:language/document} - * - * @example - * var document = language.text('This is using inline text content.'); - * - * //- - * // Or, provide a reference to a file hosted on Cloud Storage. - * //- - * var gcs = require('@google-cloud/storage')({ - * projectId: 'grape-spaceship-123' - * }); - * var bucket = gcs.bucket('my-bucket'); - * var file = bucket.file('my-file.txt'); - * - * var document = language.text(file); - * - * //- - * // Create a Document object with pre-defined configuration, such as its - * // language. - * //- - * var document = language.text('¿Dónde está la sede de Google?', { - * language: 'es' - * }); - * - * //- - * // You can now run detections on the document. - * // - * // See {module:language/document} for a complete list of methods available. - * //- - * document.detectEntities(function(err, entities) {}); - */ -Language.prototype.text = function(content, options) { - options = extend({}, options, { - type: 'PLAIN_TEXT', - content: content - }); +extend(v1Protos, gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/cloud/language/v1/language_service.proto' +}]).google.cloud.language.v1); - return this.document(options); -}; +var v1beta2Protos = {}; -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -common.util.promisifyAll(Language, { - exclude: ['document', 'html', 'text'] -}); +extend(v1beta2Protos, gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/cloud/language/v1beta2/language_service.proto' +}]).google.cloud.language.v1beta2); -module.exports = Language; -module.exports.v1 = v1; -module.exports.v1beta2 = v1beta2; +module.exports = languageV1; +module.exports.types = v1Protos; +module.exports.v1 = languageV1; +module.exports.v1.types = v1Protos; +module.exports.v1beta2 = languageV1beta2; +module.exports.v1beta2.types = v1beta2Protos; diff --git a/packages/google-cloud-language/src/v1/doc/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/doc_language_service.js new file mode 100644 index 00000000000..afc86db9e26 --- /dev/null +++ b/packages/google-cloud-language/src/v1/doc/doc_language_service.js @@ -0,0 +1,1557 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * ################################################################ # + * + * Represents the input to API methods. + * + * @property {number} type + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * + * The number should be among the values of [Type]{@link Type} + * + * @property {string} content + * The content of the input in string format. + * + * @property {string} gcsContentUri + * The Google Cloud Storage URI where the file content is located. + * This URI must be of the form: gs://bucket_name/object_name. For more + * details, see https://cloud.google.com/storage/docs/reference-uris. + * NOTE: Cloud Storage object versioning is not supported. + * + * @property {string} language + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language Support](https://cloud.google.com/natural-language/docs/languages) + * lists currently supported languages for each API method. + * If the language (either specified by the caller or automatically detected) + * is not supported by the called API method, an `INVALID_ARGUMENT` error + * is returned. + * + * @class + * @see [google.cloud.language.v1.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var Document = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The document types enum. + * + * @enum {number} + */ + Type: { + + /** + * The content type is not specified. + */ + TYPE_UNSPECIFIED: 0, + + /** + * Plain text + */ + PLAIN_TEXT: 1, + + /** + * HTML + */ + HTML: 2 + } +}; + +/** + * Represents a sentence in the input document. + * + * @property {Object} text + * The sentence text. + * + * This object should have the same structure as [TextSpan]{@link TextSpan} + * + * @property {Object} sentiment + * For calls to {@link AnalyzeSentiment} or if + * {@link AnnotateTextRequest.Features.extract_document_sentiment} is set to + * true, this field will contain the sentiment for the sentence. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * + * @class + * @see [google.cloud.language.v1.Sentence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var Sentence = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Represents a phrase in the text that is a known entity, such as + * a person, an organization, or location. The API associates information, such + * as salience and mentions, with entities. + * + * @property {string} name + * The representative name for the entity. + * + * @property {number} type + * The entity type. + * + * The number should be among the values of [Type]{@link Type} + * + * @property {Object.} metadata + * Metadata associated with the entity. + * + * Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if + * available. The associated keys are "wikipedia_url" and "mid", respectively. + * + * @property {number} salience + * The salience score associated with the entity in the [0, 1.0] range. + * + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * @property {Object[]} mentions + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * + * This object should have the same structure as [EntityMention]{@link EntityMention} + * + * @class + * @see [google.cloud.language.v1.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var Entity = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The type of the entity. + * + * @enum {number} + */ + Type: { + + /** + * Unknown + */ + UNKNOWN: 0, + + /** + * Person + */ + PERSON: 1, + + /** + * Location + */ + LOCATION: 2, + + /** + * Organization + */ + ORGANIZATION: 3, + + /** + * Event + */ + EVENT: 4, + + /** + * Work of art + */ + WORK_OF_ART: 5, + + /** + * Consumer goods + */ + CONSUMER_GOOD: 6, + + /** + * Other types + */ + OTHER: 7 + } +}; + +/** + * Represents the smallest syntactic building block of the text. + * + * @property {Object} text + * The token text. + * + * This object should have the same structure as [TextSpan]{@link TextSpan} + * + * @property {Object} partOfSpeech + * Parts of speech tag for this token. + * + * This object should have the same structure as [PartOfSpeech]{@link PartOfSpeech} + * + * @property {Object} dependencyEdge + * Dependency tree parse for this token. + * + * This object should have the same structure as [DependencyEdge]{@link DependencyEdge} + * + * @property {string} lemma + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * + * @class + * @see [google.cloud.language.v1.Token definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var Token = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Represents the feeling associated with the entire text or entities in + * the text. + * + * @property {number} magnitude + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * + * @property {number} score + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * + * @class + * @see [google.cloud.language.v1.Sentiment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var Sentiment = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Represents part of speech information for a token. Parts of speech + * are as defined in + * http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf + * + * @property {number} tag + * The part of speech tag. + * + * The number should be among the values of [Tag]{@link Tag} + * + * @property {number} aspect + * The grammatical aspect. + * + * The number should be among the values of [Aspect]{@link Aspect} + * + * @property {number} case + * The grammatical case. + * + * The number should be among the values of [Case]{@link Case} + * + * @property {number} form + * The grammatical form. + * + * The number should be among the values of [Form]{@link Form} + * + * @property {number} gender + * The grammatical gender. + * + * The number should be among the values of [Gender]{@link Gender} + * + * @property {number} mood + * The grammatical mood. + * + * The number should be among the values of [Mood]{@link Mood} + * + * @property {number} number + * The grammatical number. + * + * The number should be among the values of [Number]{@link Number} + * + * @property {number} person + * The grammatical person. + * + * The number should be among the values of [Person]{@link Person} + * + * @property {number} proper + * The grammatical properness. + * + * The number should be among the values of [Proper]{@link Proper} + * + * @property {number} reciprocity + * The grammatical reciprocity. + * + * The number should be among the values of [Reciprocity]{@link Reciprocity} + * + * @property {number} tense + * The grammatical tense. + * + * The number should be among the values of [Tense]{@link Tense} + * + * @property {number} voice + * The grammatical voice. + * + * The number should be among the values of [Voice]{@link Voice} + * + * @class + * @see [google.cloud.language.v1.PartOfSpeech definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var PartOfSpeech = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The part of speech tags enum. + * + * @enum {number} + */ + Tag: { + + /** + * Unknown + */ + UNKNOWN: 0, + + /** + * Adjective + */ + ADJ: 1, + + /** + * Adposition (preposition and postposition) + */ + ADP: 2, + + /** + * Adverb + */ + ADV: 3, + + /** + * Conjunction + */ + CONJ: 4, + + /** + * Determiner + */ + DET: 5, + + /** + * Noun (common and proper) + */ + NOUN: 6, + + /** + * Cardinal number + */ + NUM: 7, + + /** + * Pronoun + */ + PRON: 8, + + /** + * Particle or other function word + */ + PRT: 9, + + /** + * Punctuation + */ + PUNCT: 10, + + /** + * Verb (all tenses and modes) + */ + VERB: 11, + + /** + * Other: foreign words, typos, abbreviations + */ + X: 12, + + /** + * Affix + */ + AFFIX: 13 + }, + + /** + * The characteristic of a verb that expresses time flow during an event. + * + * @enum {number} + */ + Aspect: { + + /** + * Aspect is not applicable in the analyzed language or is not predicted. + */ + ASPECT_UNKNOWN: 0, + + /** + * Perfective + */ + PERFECTIVE: 1, + + /** + * Imperfective + */ + IMPERFECTIVE: 2, + + /** + * Progressive + */ + PROGRESSIVE: 3 + }, + + /** + * The grammatical function performed by a noun or pronoun in a phrase, + * clause, or sentence. In some languages, other parts of speech, such as + * adjective and determiner, take case inflection in agreement with the noun. + * + * @enum {number} + */ + Case: { + + /** + * Case is not applicable in the analyzed language or is not predicted. + */ + CASE_UNKNOWN: 0, + + /** + * Accusative + */ + ACCUSATIVE: 1, + + /** + * Adverbial + */ + ADVERBIAL: 2, + + /** + * Complementive + */ + COMPLEMENTIVE: 3, + + /** + * Dative + */ + DATIVE: 4, + + /** + * Genitive + */ + GENITIVE: 5, + + /** + * Instrumental + */ + INSTRUMENTAL: 6, + + /** + * Locative + */ + LOCATIVE: 7, + + /** + * Nominative + */ + NOMINATIVE: 8, + + /** + * Oblique + */ + OBLIQUE: 9, + + /** + * Partitive + */ + PARTITIVE: 10, + + /** + * Prepositional + */ + PREPOSITIONAL: 11, + + /** + * Reflexive + */ + REFLEXIVE_CASE: 12, + + /** + * Relative + */ + RELATIVE_CASE: 13, + + /** + * Vocative + */ + VOCATIVE: 14 + }, + + /** + * Depending on the language, Form can be categorizing different forms of + * verbs, adjectives, adverbs, etc. For example, categorizing inflected + * endings of verbs and adjectives or distinguishing between short and long + * forms of adjectives and participles + * + * @enum {number} + */ + Form: { + + /** + * Form is not applicable in the analyzed language or is not predicted. + */ + FORM_UNKNOWN: 0, + + /** + * Adnomial + */ + ADNOMIAL: 1, + + /** + * Auxiliary + */ + AUXILIARY: 2, + + /** + * Complementizer + */ + COMPLEMENTIZER: 3, + + /** + * Final ending + */ + FINAL_ENDING: 4, + + /** + * Gerund + */ + GERUND: 5, + + /** + * Realis + */ + REALIS: 6, + + /** + * Irrealis + */ + IRREALIS: 7, + + /** + * Short form + */ + SHORT: 8, + + /** + * Long form + */ + LONG: 9, + + /** + * Order form + */ + ORDER: 10, + + /** + * Specific form + */ + SPECIFIC: 11 + }, + + /** + * Gender classes of nouns reflected in the behaviour of associated words. + * + * @enum {number} + */ + Gender: { + + /** + * Gender is not applicable in the analyzed language or is not predicted. + */ + GENDER_UNKNOWN: 0, + + /** + * Feminine + */ + FEMININE: 1, + + /** + * Masculine + */ + MASCULINE: 2, + + /** + * Neuter + */ + NEUTER: 3 + }, + + /** + * The grammatical feature of verbs, used for showing modality and attitude. + * + * @enum {number} + */ + Mood: { + + /** + * Mood is not applicable in the analyzed language or is not predicted. + */ + MOOD_UNKNOWN: 0, + + /** + * Conditional + */ + CONDITIONAL_MOOD: 1, + + /** + * Imperative + */ + IMPERATIVE: 2, + + /** + * Indicative + */ + INDICATIVE: 3, + + /** + * Interrogative + */ + INTERROGATIVE: 4, + + /** + * Jussive + */ + JUSSIVE: 5, + + /** + * Subjunctive + */ + SUBJUNCTIVE: 6 + }, + + /** + * Count distinctions. + * + * @enum {number} + */ + Number: { + + /** + * Number is not applicable in the analyzed language or is not predicted. + */ + NUMBER_UNKNOWN: 0, + + /** + * Singular + */ + SINGULAR: 1, + + /** + * Plural + */ + PLURAL: 2, + + /** + * Dual + */ + DUAL: 3 + }, + + /** + * The distinction between the speaker, second person, third person, etc. + * + * @enum {number} + */ + Person: { + + /** + * Person is not applicable in the analyzed language or is not predicted. + */ + PERSON_UNKNOWN: 0, + + /** + * First + */ + FIRST: 1, + + /** + * Second + */ + SECOND: 2, + + /** + * Third + */ + THIRD: 3, + + /** + * Reflexive + */ + REFLEXIVE_PERSON: 4 + }, + + /** + * This category shows if the token is part of a proper name. + * + * @enum {number} + */ + Proper: { + + /** + * Proper is not applicable in the analyzed language or is not predicted. + */ + PROPER_UNKNOWN: 0, + + /** + * Proper + */ + PROPER: 1, + + /** + * Not proper + */ + NOT_PROPER: 2 + }, + + /** + * Reciprocal features of a pronoun. + * + * @enum {number} + */ + Reciprocity: { + + /** + * Reciprocity is not applicable in the analyzed language or is not + * predicted. + */ + RECIPROCITY_UNKNOWN: 0, + + /** + * Reciprocal + */ + RECIPROCAL: 1, + + /** + * Non-reciprocal + */ + NON_RECIPROCAL: 2 + }, + + /** + * Time reference. + * + * @enum {number} + */ + Tense: { + + /** + * Tense is not applicable in the analyzed language or is not predicted. + */ + TENSE_UNKNOWN: 0, + + /** + * Conditional + */ + CONDITIONAL_TENSE: 1, + + /** + * Future + */ + FUTURE: 2, + + /** + * Past + */ + PAST: 3, + + /** + * Present + */ + PRESENT: 4, + + /** + * Imperfect + */ + IMPERFECT: 5, + + /** + * Pluperfect + */ + PLUPERFECT: 6 + }, + + /** + * The relationship between the action that a verb expresses and the + * participants identified by its arguments. + * + * @enum {number} + */ + Voice: { + + /** + * Voice is not applicable in the analyzed language or is not predicted. + */ + VOICE_UNKNOWN: 0, + + /** + * Active + */ + ACTIVE: 1, + + /** + * Causative + */ + CAUSATIVE: 2, + + /** + * Passive + */ + PASSIVE: 3 + } +}; + +/** + * Represents dependency parse tree information for a token. (For more + * information on dependency labels, see + * http://www.aclweb.org/anthology/P13-2017 + * + * @property {number} headTokenIndex + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * + * @property {number} label + * The parse label for the token. + * + * The number should be among the values of [Label]{@link Label} + * + * @class + * @see [google.cloud.language.v1.DependencyEdge definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var DependencyEdge = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The parse label enum for the token. + * + * @enum {number} + */ + Label: { + + /** + * Unknown + */ + UNKNOWN: 0, + + /** + * Abbreviation modifier + */ + ABBREV: 1, + + /** + * Adjectival complement + */ + ACOMP: 2, + + /** + * Adverbial clause modifier + */ + ADVCL: 3, + + /** + * Adverbial modifier + */ + ADVMOD: 4, + + /** + * Adjectival modifier of an NP + */ + AMOD: 5, + + /** + * Appositional modifier of an NP + */ + APPOS: 6, + + /** + * Attribute dependent of a copular verb + */ + ATTR: 7, + + /** + * Auxiliary (non-main) verb + */ + AUX: 8, + + /** + * Passive auxiliary + */ + AUXPASS: 9, + + /** + * Coordinating conjunction + */ + CC: 10, + + /** + * Clausal complement of a verb or adjective + */ + CCOMP: 11, + + /** + * Conjunct + */ + CONJ: 12, + + /** + * Clausal subject + */ + CSUBJ: 13, + + /** + * Clausal passive subject + */ + CSUBJPASS: 14, + + /** + * Dependency (unable to determine) + */ + DEP: 15, + + /** + * Determiner + */ + DET: 16, + + /** + * Discourse + */ + DISCOURSE: 17, + + /** + * Direct object + */ + DOBJ: 18, + + /** + * Expletive + */ + EXPL: 19, + + /** + * Goes with (part of a word in a text not well edited) + */ + GOESWITH: 20, + + /** + * Indirect object + */ + IOBJ: 21, + + /** + * Marker (word introducing a subordinate clause) + */ + MARK: 22, + + /** + * Multi-word expression + */ + MWE: 23, + + /** + * Multi-word verbal expression + */ + MWV: 24, + + /** + * Negation modifier + */ + NEG: 25, + + /** + * Noun compound modifier + */ + NN: 26, + + /** + * Noun phrase used as an adverbial modifier + */ + NPADVMOD: 27, + + /** + * Nominal subject + */ + NSUBJ: 28, + + /** + * Passive nominal subject + */ + NSUBJPASS: 29, + + /** + * Numeric modifier of a noun + */ + NUM: 30, + + /** + * Element of compound number + */ + NUMBER: 31, + + /** + * Punctuation mark + */ + P: 32, + + /** + * Parataxis relation + */ + PARATAXIS: 33, + + /** + * Participial modifier + */ + PARTMOD: 34, + + /** + * The complement of a preposition is a clause + */ + PCOMP: 35, + + /** + * Object of a preposition + */ + POBJ: 36, + + /** + * Possession modifier + */ + POSS: 37, + + /** + * Postverbal negative particle + */ + POSTNEG: 38, + + /** + * Predicate complement + */ + PRECOMP: 39, + + /** + * Preconjunt + */ + PRECONJ: 40, + + /** + * Predeterminer + */ + PREDET: 41, + + /** + * Prefix + */ + PREF: 42, + + /** + * Prepositional modifier + */ + PREP: 43, + + /** + * The relationship between a verb and verbal morpheme + */ + PRONL: 44, + + /** + * Particle + */ + PRT: 45, + + /** + * Associative or possessive marker + */ + PS: 46, + + /** + * Quantifier phrase modifier + */ + QUANTMOD: 47, + + /** + * Relative clause modifier + */ + RCMOD: 48, + + /** + * Complementizer in relative clause + */ + RCMODREL: 49, + + /** + * Ellipsis without a preceding predicate + */ + RDROP: 50, + + /** + * Referent + */ + REF: 51, + + /** + * Remnant + */ + REMNANT: 52, + + /** + * Reparandum + */ + REPARANDUM: 53, + + /** + * Root + */ + ROOT: 54, + + /** + * Suffix specifying a unit of number + */ + SNUM: 55, + + /** + * Suffix + */ + SUFF: 56, + + /** + * Temporal modifier + */ + TMOD: 57, + + /** + * Topic marker + */ + TOPIC: 58, + + /** + * Clause headed by an infinite form of the verb that modifies a noun + */ + VMOD: 59, + + /** + * Vocative + */ + VOCATIVE: 60, + + /** + * Open clausal complement + */ + XCOMP: 61, + + /** + * Name suffix + */ + SUFFIX: 62, + + /** + * Name title + */ + TITLE: 63, + + /** + * Adverbial phrase modifier + */ + ADVPHMOD: 64, + + /** + * Causative auxiliary + */ + AUXCAUS: 65, + + /** + * Helper auxiliary + */ + AUXVV: 66, + + /** + * Rentaishi (Prenominal modifier) + */ + DTMOD: 67, + + /** + * Foreign words + */ + FOREIGN: 68, + + /** + * Keyword + */ + KW: 69, + + /** + * List for chains of comparable items + */ + LIST: 70, + + /** + * Nominalized clause + */ + NOMC: 71, + + /** + * Nominalized clausal subject + */ + NOMCSUBJ: 72, + + /** + * Nominalized clausal passive + */ + NOMCSUBJPASS: 73, + + /** + * Compound of numeric modifier + */ + NUMC: 74, + + /** + * Copula + */ + COP: 75, + + /** + * Dislocated relation (for fronted/topicalized elements) + */ + DISLOCATED: 76 + } +}; + +/** + * Represents a mention for an entity in the text. Currently, proper noun + * mentions are supported. + * + * @property {Object} text + * The mention text. + * + * This object should have the same structure as [TextSpan]{@link TextSpan} + * + * @property {number} type + * The type of the entity mention. + * + * The number should be among the values of [Type]{@link Type} + * + * @class + * @see [google.cloud.language.v1.EntityMention definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var EntityMention = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The supported types of mentions. + * + * @enum {number} + */ + Type: { + + /** + * Unknown + */ + TYPE_UNKNOWN: 0, + + /** + * Proper name + */ + PROPER: 1, + + /** + * Common noun (or noun compound) + */ + COMMON: 2 + } +}; + +/** + * Represents an output piece of text. + * + * @property {string} content + * The content of the output text. + * + * @property {number} beginOffset + * The API calculates the beginning offset of the content in the original + * document according to the {@link EncodingType} specified in the API request. + * + * @class + * @see [google.cloud.language.v1.TextSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var TextSpan = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The sentiment analysis request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {number} encodingType + * The encoding type used by the API to calculate sentence offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1.AnalyzeSentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnalyzeSentimentRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The sentiment analysis response message. + * + * @property {Object} documentSentiment + * The overall sentiment of the input document. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @property {Object[]} sentences + * The sentiment for all the sentences in the document. + * + * This object should have the same structure as [Sentence]{@link Sentence} + * + * @class + * @see [google.cloud.language.v1.AnalyzeSentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnalyzeSentimentResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The entity analysis request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {number} encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1.AnalyzeEntitiesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnalyzeEntitiesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The entity analysis response message. + * + * @property {Object[]} entities + * The recognized entities in the input document. + * + * This object should have the same structure as [Entity]{@link Entity} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @class + * @see [google.cloud.language.v1.AnalyzeEntitiesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnalyzeEntitiesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The syntax analysis request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {number} encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1.AnalyzeSyntaxRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnalyzeSyntaxRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The syntax analysis response message. + * + * @property {Object[]} sentences + * Sentences in the input document. + * + * This object should have the same structure as [Sentence]{@link Sentence} + * + * @property {Object[]} tokens + * Tokens, along with their syntactic information, in the input document. + * + * This object should have the same structure as [Token]{@link Token} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @class + * @see [google.cloud.language.v1.AnalyzeSyntaxResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnalyzeSyntaxResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The request message for the text annotation API, which can perform multiple + * analysis types (sentiment, entities, and syntax) in one call. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {Object} features + * The enabled features. + * + * This object should have the same structure as [Features]{@link Features} + * + * @property {number} encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1.AnnotateTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnnotateTextRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * All available features for sentiment, syntax, and semantic analysis. + * Setting each one to true will enable that specific analysis for the input. + * + * @property {boolean} extractSyntax + * Extract syntax information. + * + * @property {boolean} extractEntities + * Extract entities. + * + * @property {boolean} extractDocumentSentiment + * Extract document-level sentiment. + * + * @class + * @see [google.cloud.language.v1.AnnotateTextRequest.Features definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ + Features: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; + +/** + * The text annotations response message. + * + * @property {Object[]} sentences + * Sentences in the input document. Populated if the user enables + * {@link AnnotateTextRequest.Features.extract_syntax}. + * + * This object should have the same structure as [Sentence]{@link Sentence} + * + * @property {Object[]} tokens + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * {@link AnnotateTextRequest.Features.extract_syntax}. + * + * This object should have the same structure as [Token]{@link Token} + * + * @property {Object[]} entities + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * {@link AnnotateTextRequest.Features.extract_entities}. + * + * This object should have the same structure as [Entity]{@link Entity} + * + * @property {Object} documentSentiment + * The overall sentiment for the document. Populated if the user enables + * {@link AnnotateTextRequest.Features.extract_document_sentiment}. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @class + * @see [google.cloud.language.v1.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnnotateTextResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Represents the text encoding that the caller uses to process the output. + * Providing an `EncodingType` is recommended because the API provides the + * beginning offsets for various outputs, such as tokens and mentions, and + * languages that natively use different text encodings may access offsets + * differently. + * + * @enum {number} + */ +var EncodingType = { + + /** + * If `EncodingType` is not specified, encoding-dependent information (such as + * `begin_offset`) will be set at `-1`. + */ + NONE: 0, + + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-8 encoding of the input. C++ and Go are examples of languages + * that use this encoding natively. + */ + UTF8: 1, + + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-16 encoding of the input. Java and Javascript are examples of + * languages that use this encoding natively. + */ + UTF16: 2, + + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-32 encoding of the input. Python is an example of a language + * that uses this encoding natively. + */ + UTF32: 3 +}; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1/index.js b/packages/google-cloud-language/src/v1/index.js index d6769940525..b4f2c574e4e 100644 --- a/packages/google-cloud-language/src/v1/index.js +++ b/packages/google-cloud-language/src/v1/index.js @@ -1,11 +1,11 @@ /* - * Copyright 2016 Google Inc. All rights reserved. + * Copyright 2017, Google Inc. All rights reserved. * * 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 * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ function v1(options) { return languageServiceClient(gaxGrpc); } +v1.GAPIC_VERSION = '0.7.1'; v1.SERVICE_ADDRESS = languageServiceClient.SERVICE_ADDRESS; v1.ALL_SCOPES = languageServiceClient.ALL_SCOPES; diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 3ff283512f9..faecdc5160f 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -1,11 +1,11 @@ /* - * Copyright 2016 Google Inc. All rights reserved. + * Copyright 2017, Google Inc. All rights reserved. * * 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 * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -35,7 +35,7 @@ var SERVICE_ADDRESS = 'language.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; +var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; /** * The scopes needed to make gRPC calls to all of the methods defined in @@ -49,15 +49,6 @@ var ALL_SCOPES = [ * Provides text analysis operations such as sentiment analysis and entity * recognition. * - * This will be created through a builder function which can be obtained by the module. - * See the following example of how to initialize the module and how to access to the builder. - * @see {@link languageServiceClient} - * - * @example - * var languageV1 = require('@google-cloud/language').v1({ - * // optional auth parameters. - * }); - * var client = languageV1.languageServiceClient(); * * @class */ @@ -111,9 +102,10 @@ function LanguageServiceClient(gaxGrpc, grpcClients, opts) { }); } + /** * Get the project ID used by this class. - * @aram {function(Error, string)} callback - the callback to be called with + * @param {function(Error, string)} callback - the callback to be called with * the current project Id. */ LanguageServiceClient.prototype.getProjectId = function(callback) { @@ -128,8 +120,7 @@ LanguageServiceClient.prototype.getProjectId = function(callback) { * @param {Object} request * The request object that will be sent. * @param {Object} request.document - * Input document. Currently, `analyzeSentiment` only supports English text - * ({@link Document.language}="EN"). + * Input document. * * This object should have the same structure as [Document]{@link Document} * @param {number=} request.encodingType @@ -149,12 +140,18 @@ LanguageServiceClient.prototype.getProjectId = function(callback) { * * @example * - * var client = languageV1.languageServiceClient(); + * var language = require('@google-cloud/language'); + * + * var client = language.v1({ + * // optional auth parameters. + * }); + * * var document = {}; * client.analyzeSentiment({document: document}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -171,8 +168,9 @@ LanguageServiceClient.prototype.analyzeSentiment = function(request, options, ca }; /** - * Finds named entities (currently finds proper names) in the text, - * entity types, salience, mentions for each entity, and other properties. + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. * * @param {Object} request * The request object that will be sent. @@ -197,9 +195,14 @@ LanguageServiceClient.prototype.analyzeSentiment = function(request, options, ca * * @example * - * var client = languageV1.languageServiceClient(); + * var language = require('@google-cloud/language'); + * + * var client = language.v1({ + * // optional auth parameters. + * }); + * * var document = {}; - * var encodingType = languageV1.EncodingType.NONE; + * var encodingType = language.v1.types.EncodingType.NONE; * var request = { * document: document, * encodingType: encodingType @@ -207,7 +210,8 @@ LanguageServiceClient.prototype.analyzeSentiment = function(request, options, ca * client.analyzeEntities(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -251,9 +255,14 @@ LanguageServiceClient.prototype.analyzeEntities = function(request, options, cal * * @example * - * var client = languageV1.languageServiceClient(); + * var language = require('@google-cloud/language'); + * + * var client = language.v1({ + * // optional auth parameters. + * }); + * * var document = {}; - * var encodingType = languageV1.EncodingType.NONE; + * var encodingType = language.v1.types.EncodingType.NONE; * var request = { * document: document, * encodingType: encodingType @@ -261,7 +270,8 @@ LanguageServiceClient.prototype.analyzeEntities = function(request, options, cal * client.analyzeSyntax(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -308,10 +318,15 @@ LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callb * * @example * - * var client = languageV1.languageServiceClient(); + * var language = require('@google-cloud/language'); + * + * var client = language.v1({ + * // optional auth parameters. + * }); + * * var document = {}; * var features = {}; - * var encodingType = languageV1.EncodingType.NONE; + * var encodingType = language.v1.types.EncodingType.NONE; * var request = { * document: document, * features: features, @@ -320,7 +335,8 @@ LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callb * client.annotateText(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -369,4 +385,4 @@ function LanguageServiceClientBuilder(gaxGrpc) { } module.exports = LanguageServiceClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; diff --git a/packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js new file mode 100644 index 00000000000..a340b2d45fd --- /dev/null +++ b/packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js @@ -0,0 +1,1613 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * ################################################################ # + * + * Represents the input to API methods. + * + * @property {number} type + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * + * The number should be among the values of [Type]{@link Type} + * + * @property {string} content + * The content of the input in string format. + * + * @property {string} gcsContentUri + * The Google Cloud Storage URI where the file content is located. + * This URI must be of the form: gs://bucket_name/object_name. For more + * details, see https://cloud.google.com/storage/docs/reference-uris. + * NOTE: Cloud Storage object versioning is not supported. + * + * @property {string} language + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language Support](https://cloud.google.com/natural-language/docs/languages) + * lists currently supported languages for each API method. + * If the language (either specified by the caller or automatically detected) + * is not supported by the called API method, an `INVALID_ARGUMENT` error + * is returned. + * + * @class + * @see [google.cloud.language.v1beta2.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var Document = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The document types enum. + * + * @enum {number} + */ + Type: { + + /** + * The content type is not specified. + */ + TYPE_UNSPECIFIED: 0, + + /** + * Plain text + */ + PLAIN_TEXT: 1, + + /** + * HTML + */ + HTML: 2 + } +}; + +/** + * Represents a sentence in the input document. + * + * @property {Object} text + * The sentence text. + * + * This object should have the same structure as [TextSpan]{@link TextSpan} + * + * @property {Object} sentiment + * For calls to {@link AnalyzeSentiment} or if + * {@link AnnotateTextRequest.Features.extract_document_sentiment} is set to + * true, this field will contain the sentiment for the sentence. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * + * @class + * @see [google.cloud.language.v1beta2.Sentence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var Sentence = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Represents a phrase in the text that is a known entity, such as + * a person, an organization, or location. The API associates information, such + * as salience and mentions, with entities. + * + * @property {string} name + * The representative name for the entity. + * + * @property {number} type + * The entity type. + * + * The number should be among the values of [Type]{@link Type} + * + * @property {Object.} metadata + * Metadata associated with the entity. + * + * Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if + * available. The associated keys are "wikipedia_url" and "mid", respectively. + * + * @property {number} salience + * The salience score associated with the entity in the [0, 1.0] range. + * + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * @property {Object[]} mentions + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * + * This object should have the same structure as [EntityMention]{@link EntityMention} + * + * @property {Object} sentiment + * For calls to {@link AnalyzeEntitySentiment} or if + * {@link AnnotateTextRequest.Features.extract_entity_sentiment} is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * + * @class + * @see [google.cloud.language.v1beta2.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var Entity = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The type of the entity. + * + * @enum {number} + */ + Type: { + + /** + * Unknown + */ + UNKNOWN: 0, + + /** + * Person + */ + PERSON: 1, + + /** + * Location + */ + LOCATION: 2, + + /** + * Organization + */ + ORGANIZATION: 3, + + /** + * Event + */ + EVENT: 4, + + /** + * Work of art + */ + WORK_OF_ART: 5, + + /** + * Consumer goods + */ + CONSUMER_GOOD: 6, + + /** + * Other types + */ + OTHER: 7 + } +}; + +/** + * Represents the smallest syntactic building block of the text. + * + * @property {Object} text + * The token text. + * + * This object should have the same structure as [TextSpan]{@link TextSpan} + * + * @property {Object} partOfSpeech + * Parts of speech tag for this token. + * + * This object should have the same structure as [PartOfSpeech]{@link PartOfSpeech} + * + * @property {Object} dependencyEdge + * Dependency tree parse for this token. + * + * This object should have the same structure as [DependencyEdge]{@link DependencyEdge} + * + * @property {string} lemma + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * + * @class + * @see [google.cloud.language.v1beta2.Token definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var Token = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Represents the feeling associated with the entire text or entities in + * the text. + * + * @property {number} magnitude + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * + * @property {number} score + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * + * @class + * @see [google.cloud.language.v1beta2.Sentiment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var Sentiment = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Represents part of speech information for a token. + * + * @property {number} tag + * The part of speech tag. + * + * The number should be among the values of [Tag]{@link Tag} + * + * @property {number} aspect + * The grammatical aspect. + * + * The number should be among the values of [Aspect]{@link Aspect} + * + * @property {number} case + * The grammatical case. + * + * The number should be among the values of [Case]{@link Case} + * + * @property {number} form + * The grammatical form. + * + * The number should be among the values of [Form]{@link Form} + * + * @property {number} gender + * The grammatical gender. + * + * The number should be among the values of [Gender]{@link Gender} + * + * @property {number} mood + * The grammatical mood. + * + * The number should be among the values of [Mood]{@link Mood} + * + * @property {number} number + * The grammatical number. + * + * The number should be among the values of [Number]{@link Number} + * + * @property {number} person + * The grammatical person. + * + * The number should be among the values of [Person]{@link Person} + * + * @property {number} proper + * The grammatical properness. + * + * The number should be among the values of [Proper]{@link Proper} + * + * @property {number} reciprocity + * The grammatical reciprocity. + * + * The number should be among the values of [Reciprocity]{@link Reciprocity} + * + * @property {number} tense + * The grammatical tense. + * + * The number should be among the values of [Tense]{@link Tense} + * + * @property {number} voice + * The grammatical voice. + * + * The number should be among the values of [Voice]{@link Voice} + * + * @class + * @see [google.cloud.language.v1beta2.PartOfSpeech definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var PartOfSpeech = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The part of speech tags enum. + * + * @enum {number} + */ + Tag: { + + /** + * Unknown + */ + UNKNOWN: 0, + + /** + * Adjective + */ + ADJ: 1, + + /** + * Adposition (preposition and postposition) + */ + ADP: 2, + + /** + * Adverb + */ + ADV: 3, + + /** + * Conjunction + */ + CONJ: 4, + + /** + * Determiner + */ + DET: 5, + + /** + * Noun (common and proper) + */ + NOUN: 6, + + /** + * Cardinal number + */ + NUM: 7, + + /** + * Pronoun + */ + PRON: 8, + + /** + * Particle or other function word + */ + PRT: 9, + + /** + * Punctuation + */ + PUNCT: 10, + + /** + * Verb (all tenses and modes) + */ + VERB: 11, + + /** + * Other: foreign words, typos, abbreviations + */ + X: 12, + + /** + * Affix + */ + AFFIX: 13 + }, + + /** + * The characteristic of a verb that expresses time flow during an event. + * + * @enum {number} + */ + Aspect: { + + /** + * Aspect is not applicable in the analyzed language or is not predicted. + */ + ASPECT_UNKNOWN: 0, + + /** + * Perfective + */ + PERFECTIVE: 1, + + /** + * Imperfective + */ + IMPERFECTIVE: 2, + + /** + * Progressive + */ + PROGRESSIVE: 3 + }, + + /** + * The grammatical function performed by a noun or pronoun in a phrase, + * clause, or sentence. In some languages, other parts of speech, such as + * adjective and determiner, take case inflection in agreement with the noun. + * + * @enum {number} + */ + Case: { + + /** + * Case is not applicable in the analyzed language or is not predicted. + */ + CASE_UNKNOWN: 0, + + /** + * Accusative + */ + ACCUSATIVE: 1, + + /** + * Adverbial + */ + ADVERBIAL: 2, + + /** + * Complementive + */ + COMPLEMENTIVE: 3, + + /** + * Dative + */ + DATIVE: 4, + + /** + * Genitive + */ + GENITIVE: 5, + + /** + * Instrumental + */ + INSTRUMENTAL: 6, + + /** + * Locative + */ + LOCATIVE: 7, + + /** + * Nominative + */ + NOMINATIVE: 8, + + /** + * Oblique + */ + OBLIQUE: 9, + + /** + * Partitive + */ + PARTITIVE: 10, + + /** + * Prepositional + */ + PREPOSITIONAL: 11, + + /** + * Reflexive + */ + REFLEXIVE_CASE: 12, + + /** + * Relative + */ + RELATIVE_CASE: 13, + + /** + * Vocative + */ + VOCATIVE: 14 + }, + + /** + * Depending on the language, Form can be categorizing different forms of + * verbs, adjectives, adverbs, etc. For example, categorizing inflected + * endings of verbs and adjectives or distinguishing between short and long + * forms of adjectives and participles + * + * @enum {number} + */ + Form: { + + /** + * Form is not applicable in the analyzed language or is not predicted. + */ + FORM_UNKNOWN: 0, + + /** + * Adnomial + */ + ADNOMIAL: 1, + + /** + * Auxiliary + */ + AUXILIARY: 2, + + /** + * Complementizer + */ + COMPLEMENTIZER: 3, + + /** + * Final ending + */ + FINAL_ENDING: 4, + + /** + * Gerund + */ + GERUND: 5, + + /** + * Realis + */ + REALIS: 6, + + /** + * Irrealis + */ + IRREALIS: 7, + + /** + * Short form + */ + SHORT: 8, + + /** + * Long form + */ + LONG: 9, + + /** + * Order form + */ + ORDER: 10, + + /** + * Specific form + */ + SPECIFIC: 11 + }, + + /** + * Gender classes of nouns reflected in the behaviour of associated words. + * + * @enum {number} + */ + Gender: { + + /** + * Gender is not applicable in the analyzed language or is not predicted. + */ + GENDER_UNKNOWN: 0, + + /** + * Feminine + */ + FEMININE: 1, + + /** + * Masculine + */ + MASCULINE: 2, + + /** + * Neuter + */ + NEUTER: 3 + }, + + /** + * The grammatical feature of verbs, used for showing modality and attitude. + * + * @enum {number} + */ + Mood: { + + /** + * Mood is not applicable in the analyzed language or is not predicted. + */ + MOOD_UNKNOWN: 0, + + /** + * Conditional + */ + CONDITIONAL_MOOD: 1, + + /** + * Imperative + */ + IMPERATIVE: 2, + + /** + * Indicative + */ + INDICATIVE: 3, + + /** + * Interrogative + */ + INTERROGATIVE: 4, + + /** + * Jussive + */ + JUSSIVE: 5, + + /** + * Subjunctive + */ + SUBJUNCTIVE: 6 + }, + + /** + * Count distinctions. + * + * @enum {number} + */ + Number: { + + /** + * Number is not applicable in the analyzed language or is not predicted. + */ + NUMBER_UNKNOWN: 0, + + /** + * Singular + */ + SINGULAR: 1, + + /** + * Plural + */ + PLURAL: 2, + + /** + * Dual + */ + DUAL: 3 + }, + + /** + * The distinction between the speaker, second person, third person, etc. + * + * @enum {number} + */ + Person: { + + /** + * Person is not applicable in the analyzed language or is not predicted. + */ + PERSON_UNKNOWN: 0, + + /** + * First + */ + FIRST: 1, + + /** + * Second + */ + SECOND: 2, + + /** + * Third + */ + THIRD: 3, + + /** + * Reflexive + */ + REFLEXIVE_PERSON: 4 + }, + + /** + * This category shows if the token is part of a proper name. + * + * @enum {number} + */ + Proper: { + + /** + * Proper is not applicable in the analyzed language or is not predicted. + */ + PROPER_UNKNOWN: 0, + + /** + * Proper + */ + PROPER: 1, + + /** + * Not proper + */ + NOT_PROPER: 2 + }, + + /** + * Reciprocal features of a pronoun. + * + * @enum {number} + */ + Reciprocity: { + + /** + * Reciprocity is not applicable in the analyzed language or is not + * predicted. + */ + RECIPROCITY_UNKNOWN: 0, + + /** + * Reciprocal + */ + RECIPROCAL: 1, + + /** + * Non-reciprocal + */ + NON_RECIPROCAL: 2 + }, + + /** + * Time reference. + * + * @enum {number} + */ + Tense: { + + /** + * Tense is not applicable in the analyzed language or is not predicted. + */ + TENSE_UNKNOWN: 0, + + /** + * Conditional + */ + CONDITIONAL_TENSE: 1, + + /** + * Future + */ + FUTURE: 2, + + /** + * Past + */ + PAST: 3, + + /** + * Present + */ + PRESENT: 4, + + /** + * Imperfect + */ + IMPERFECT: 5, + + /** + * Pluperfect + */ + PLUPERFECT: 6 + }, + + /** + * The relationship between the action that a verb expresses and the + * participants identified by its arguments. + * + * @enum {number} + */ + Voice: { + + /** + * Voice is not applicable in the analyzed language or is not predicted. + */ + VOICE_UNKNOWN: 0, + + /** + * Active + */ + ACTIVE: 1, + + /** + * Causative + */ + CAUSATIVE: 2, + + /** + * Passive + */ + PASSIVE: 3 + } +}; + +/** + * Represents dependency parse tree information for a token. + * + * @property {number} headTokenIndex + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * + * @property {number} label + * The parse label for the token. + * + * The number should be among the values of [Label]{@link Label} + * + * @class + * @see [google.cloud.language.v1beta2.DependencyEdge definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var DependencyEdge = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The parse label enum for the token. + * + * @enum {number} + */ + Label: { + + /** + * Unknown + */ + UNKNOWN: 0, + + /** + * Abbreviation modifier + */ + ABBREV: 1, + + /** + * Adjectival complement + */ + ACOMP: 2, + + /** + * Adverbial clause modifier + */ + ADVCL: 3, + + /** + * Adverbial modifier + */ + ADVMOD: 4, + + /** + * Adjectival modifier of an NP + */ + AMOD: 5, + + /** + * Appositional modifier of an NP + */ + APPOS: 6, + + /** + * Attribute dependent of a copular verb + */ + ATTR: 7, + + /** + * Auxiliary (non-main) verb + */ + AUX: 8, + + /** + * Passive auxiliary + */ + AUXPASS: 9, + + /** + * Coordinating conjunction + */ + CC: 10, + + /** + * Clausal complement of a verb or adjective + */ + CCOMP: 11, + + /** + * Conjunct + */ + CONJ: 12, + + /** + * Clausal subject + */ + CSUBJ: 13, + + /** + * Clausal passive subject + */ + CSUBJPASS: 14, + + /** + * Dependency (unable to determine) + */ + DEP: 15, + + /** + * Determiner + */ + DET: 16, + + /** + * Discourse + */ + DISCOURSE: 17, + + /** + * Direct object + */ + DOBJ: 18, + + /** + * Expletive + */ + EXPL: 19, + + /** + * Goes with (part of a word in a text not well edited) + */ + GOESWITH: 20, + + /** + * Indirect object + */ + IOBJ: 21, + + /** + * Marker (word introducing a subordinate clause) + */ + MARK: 22, + + /** + * Multi-word expression + */ + MWE: 23, + + /** + * Multi-word verbal expression + */ + MWV: 24, + + /** + * Negation modifier + */ + NEG: 25, + + /** + * Noun compound modifier + */ + NN: 26, + + /** + * Noun phrase used as an adverbial modifier + */ + NPADVMOD: 27, + + /** + * Nominal subject + */ + NSUBJ: 28, + + /** + * Passive nominal subject + */ + NSUBJPASS: 29, + + /** + * Numeric modifier of a noun + */ + NUM: 30, + + /** + * Element of compound number + */ + NUMBER: 31, + + /** + * Punctuation mark + */ + P: 32, + + /** + * Parataxis relation + */ + PARATAXIS: 33, + + /** + * Participial modifier + */ + PARTMOD: 34, + + /** + * The complement of a preposition is a clause + */ + PCOMP: 35, + + /** + * Object of a preposition + */ + POBJ: 36, + + /** + * Possession modifier + */ + POSS: 37, + + /** + * Postverbal negative particle + */ + POSTNEG: 38, + + /** + * Predicate complement + */ + PRECOMP: 39, + + /** + * Preconjunt + */ + PRECONJ: 40, + + /** + * Predeterminer + */ + PREDET: 41, + + /** + * Prefix + */ + PREF: 42, + + /** + * Prepositional modifier + */ + PREP: 43, + + /** + * The relationship between a verb and verbal morpheme + */ + PRONL: 44, + + /** + * Particle + */ + PRT: 45, + + /** + * Associative or possessive marker + */ + PS: 46, + + /** + * Quantifier phrase modifier + */ + QUANTMOD: 47, + + /** + * Relative clause modifier + */ + RCMOD: 48, + + /** + * Complementizer in relative clause + */ + RCMODREL: 49, + + /** + * Ellipsis without a preceding predicate + */ + RDROP: 50, + + /** + * Referent + */ + REF: 51, + + /** + * Remnant + */ + REMNANT: 52, + + /** + * Reparandum + */ + REPARANDUM: 53, + + /** + * Root + */ + ROOT: 54, + + /** + * Suffix specifying a unit of number + */ + SNUM: 55, + + /** + * Suffix + */ + SUFF: 56, + + /** + * Temporal modifier + */ + TMOD: 57, + + /** + * Topic marker + */ + TOPIC: 58, + + /** + * Clause headed by an infinite form of the verb that modifies a noun + */ + VMOD: 59, + + /** + * Vocative + */ + VOCATIVE: 60, + + /** + * Open clausal complement + */ + XCOMP: 61, + + /** + * Name suffix + */ + SUFFIX: 62, + + /** + * Name title + */ + TITLE: 63, + + /** + * Adverbial phrase modifier + */ + ADVPHMOD: 64, + + /** + * Causative auxiliary + */ + AUXCAUS: 65, + + /** + * Helper auxiliary + */ + AUXVV: 66, + + /** + * Rentaishi (Prenominal modifier) + */ + DTMOD: 67, + + /** + * Foreign words + */ + FOREIGN: 68, + + /** + * Keyword + */ + KW: 69, + + /** + * List for chains of comparable items + */ + LIST: 70, + + /** + * Nominalized clause + */ + NOMC: 71, + + /** + * Nominalized clausal subject + */ + NOMCSUBJ: 72, + + /** + * Nominalized clausal passive + */ + NOMCSUBJPASS: 73, + + /** + * Compound of numeric modifier + */ + NUMC: 74, + + /** + * Copula + */ + COP: 75, + + /** + * Dislocated relation (for fronted/topicalized elements) + */ + DISLOCATED: 76 + } +}; + +/** + * Represents a mention for an entity in the text. Currently, proper noun + * mentions are supported. + * + * @property {Object} text + * The mention text. + * + * This object should have the same structure as [TextSpan]{@link TextSpan} + * + * @property {number} type + * The type of the entity mention. + * + * The number should be among the values of [Type]{@link Type} + * + * @property {Object} sentiment + * For calls to {@link AnalyzeEntitySentiment} or if + * {@link AnnotateTextRequest.Features.extract_entity_sentiment} is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * + * @class + * @see [google.cloud.language.v1beta2.EntityMention definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var EntityMention = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The supported types of mentions. + * + * @enum {number} + */ + Type: { + + /** + * Unknown + */ + TYPE_UNKNOWN: 0, + + /** + * Proper name + */ + PROPER: 1, + + /** + * Common noun (or noun compound) + */ + COMMON: 2 + } +}; + +/** + * Represents an output piece of text. + * + * @property {string} content + * The content of the output text. + * + * @property {number} beginOffset + * The API calculates the beginning offset of the content in the original + * document according to the {@link EncodingType} specified in the API request. + * + * @class + * @see [google.cloud.language.v1beta2.TextSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var TextSpan = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The sentiment analysis request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {number} encodingType + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1beta2.AnalyzeSentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnalyzeSentimentRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The sentiment analysis response message. + * + * @property {Object} documentSentiment + * The overall sentiment of the input document. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @property {Object[]} sentences + * The sentiment for all the sentences in the document. + * + * This object should have the same structure as [Sentence]{@link Sentence} + * + * @class + * @see [google.cloud.language.v1beta2.AnalyzeSentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnalyzeSentimentResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The entity-level sentiment analysis request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {number} encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnalyzeEntitySentimentRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The entity-level sentiment analysis response message. + * + * @property {Object[]} entities + * The recognized entities in the input document with associated sentiments. + * + * This object should have the same structure as [Entity]{@link Entity} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @class + * @see [google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnalyzeEntitySentimentResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The entity analysis request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {number} encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1beta2.AnalyzeEntitiesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnalyzeEntitiesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The entity analysis response message. + * + * @property {Object[]} entities + * The recognized entities in the input document. + * + * This object should have the same structure as [Entity]{@link Entity} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @class + * @see [google.cloud.language.v1beta2.AnalyzeEntitiesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnalyzeEntitiesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The syntax analysis request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {number} encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1beta2.AnalyzeSyntaxRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnalyzeSyntaxRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The syntax analysis response message. + * + * @property {Object[]} sentences + * Sentences in the input document. + * + * This object should have the same structure as [Sentence]{@link Sentence} + * + * @property {Object[]} tokens + * Tokens, along with their syntactic information, in the input document. + * + * This object should have the same structure as [Token]{@link Token} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @class + * @see [google.cloud.language.v1beta2.AnalyzeSyntaxResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnalyzeSyntaxResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The request message for the text annotation API, which can perform multiple + * analysis types (sentiment, entities, and syntax) in one call. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {Object} features + * The enabled features. + * + * This object should have the same structure as [Features]{@link Features} + * + * @property {number} encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1beta2.AnnotateTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnnotateTextRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * All available features for sentiment, syntax, and semantic analysis. + * Setting each one to true will enable that specific analysis for the input. + * + * @property {boolean} extractSyntax + * Extract syntax information. + * + * @property {boolean} extractEntities + * Extract entities. + * + * @property {boolean} extractDocumentSentiment + * Extract document-level sentiment. + * + * @property {boolean} extractEntitySentiment + * Extract entities and their associated sentiment. + * + * @class + * @see [google.cloud.language.v1beta2.AnnotateTextRequest.Features definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ + Features: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; + +/** + * The text annotations response message. + * + * @property {Object[]} sentences + * Sentences in the input document. Populated if the user enables + * {@link AnnotateTextRequest.Features.extract_syntax}. + * + * This object should have the same structure as [Sentence]{@link Sentence} + * + * @property {Object[]} tokens + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * {@link AnnotateTextRequest.Features.extract_syntax}. + * + * This object should have the same structure as [Token]{@link Token} + * + * @property {Object[]} entities + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * {@link AnnotateTextRequest.Features.extract_entities}. + * + * This object should have the same structure as [Entity]{@link Entity} + * + * @property {Object} documentSentiment + * The overall sentiment for the document. Populated if the user enables + * {@link AnnotateTextRequest.Features.extract_document_sentiment}. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @class + * @see [google.cloud.language.v1beta2.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var AnnotateTextResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Represents the text encoding that the caller uses to process the output. + * Providing an `EncodingType` is recommended because the API provides the + * beginning offsets for various outputs, such as tokens and mentions, and + * languages that natively use different text encodings may access offsets + * differently. + * + * @enum {number} + */ +var EncodingType = { + + /** + * If `EncodingType` is not specified, encoding-dependent information (such as + * `begin_offset`) will be set at `-1`. + */ + NONE: 0, + + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-8 encoding of the input. C++ and Go are examples of languages + * that use this encoding natively. + */ + UTF8: 1, + + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-16 encoding of the input. Java and Javascript are examples of + * languages that use this encoding natively. + */ + UTF16: 2, + + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-32 encoding of the input. Python is an example of a language + * that uses this encoding natively. + */ + UTF32: 3 +}; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1beta2/index.js b/packages/google-cloud-language/src/v1beta2/index.js index 04dc3c3a3f5..f65984ac290 100644 --- a/packages/google-cloud-language/src/v1beta2/index.js +++ b/packages/google-cloud-language/src/v1beta2/index.js @@ -1,11 +1,11 @@ /* - * Copyright 2016 Google Inc. All rights reserved. + * Copyright 2017, Google Inc. All rights reserved. * * 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 * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 9f44f3af95a..985c526f05f 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -49,15 +49,6 @@ var ALL_SCOPES = [ * Provides text analysis operations such as sentiment analysis and entity * recognition. * - * This will be created through a builder function which can be obtained by the module. - * See the following example of how to initialize the module and how to access to the builder. - * @see {@link languageServiceClient} - * - * @example - * var languageV1beta2 = require('@google-cloud/language').v1beta2({ - * // optional auth parameters. - * }); - * var client = languageV1beta2.languageServiceClient(); * * @class */ @@ -130,8 +121,7 @@ LanguageServiceClient.prototype.getProjectId = function(callback) { * @param {Object} request * The request object that will be sent. * @param {Object} request.document - * Input document. Currently, `analyzeSentiment` only supports English text - * ({@link Document.language}="EN"). + * Input document. * * This object should have the same structure as [Document]{@link Document} * @param {number=} request.encodingType @@ -152,12 +142,18 @@ LanguageServiceClient.prototype.getProjectId = function(callback) { * * @example * - * var client = languageV1beta2.languageServiceClient(); + * var language = require('@google-cloud/language'); + * + * var client = language.v1beta2({ + * // optional auth parameters. + * }); + * * var document = {}; * client.analyzeSentiment({document: document}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -201,9 +197,14 @@ LanguageServiceClient.prototype.analyzeSentiment = function(request, options, ca * * @example * - * var client = languageV1beta2.languageServiceClient(); + * var language = require('@google-cloud/language'); + * + * var client = language.v1beta2({ + * // optional auth parameters. + * }); + * * var document = {}; - * var encodingType = languageV1beta2.EncodingType.NONE; + * var encodingType = language.v1beta2.types.EncodingType.NONE; * var request = { * document: document, * encodingType: encodingType @@ -211,7 +212,8 @@ LanguageServiceClient.prototype.analyzeSentiment = function(request, options, ca * client.analyzeEntities(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -254,9 +256,14 @@ LanguageServiceClient.prototype.analyzeEntities = function(request, options, cal * * @example * - * var client = languageV1beta2.languageServiceClient(); + * var language = require('@google-cloud/language'); + * + * var client = language.v1beta2({ + * // optional auth parameters. + * }); + * * var document = {}; - * var encodingType = languageV1beta2.EncodingType.NONE; + * var encodingType = language.v1beta2.types.EncodingType.NONE; * var request = { * document: document, * encodingType: encodingType @@ -264,7 +271,8 @@ LanguageServiceClient.prototype.analyzeEntities = function(request, options, cal * client.analyzeEntitySentiment(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -308,9 +316,14 @@ LanguageServiceClient.prototype.analyzeEntitySentiment = function(request, optio * * @example * - * var client = languageV1beta2.languageServiceClient(); + * var language = require('@google-cloud/language'); + * + * var client = language.v1beta2({ + * // optional auth parameters. + * }); + * * var document = {}; - * var encodingType = languageV1beta2.EncodingType.NONE; + * var encodingType = language.v1beta2.types.EncodingType.NONE; * var request = { * document: document, * encodingType: encodingType @@ -318,7 +331,8 @@ LanguageServiceClient.prototype.analyzeEntitySentiment = function(request, optio * client.analyzeSyntax(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -365,10 +379,15 @@ LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callb * * @example * - * var client = languageV1beta2.languageServiceClient(); + * var language = require('@google-cloud/language'); + * + * var client = language.v1beta2({ + * // optional auth parameters. + * }); + * * var document = {}; * var features = {}; - * var encodingType = languageV1beta2.EncodingType.NONE; + * var encodingType = language.v1beta2.types.EncodingType.NONE; * var request = { * document: document, * features: features, @@ -377,7 +396,8 @@ LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callb * client.annotateText(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -426,4 +446,4 @@ function LanguageServiceClientBuilder(gaxGrpc) { } module.exports = LanguageServiceClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file +module.exports.ALL_SCOPES = ALL_SCOPES; diff --git a/packages/google-cloud-language/system-test/language.js b/packages/google-cloud-language/system-test/language.js deleted file mode 100644 index 27b9362f2ae..00000000000 --- a/packages/google-cloud-language/system-test/language.js +++ /dev/null @@ -1,391 +0,0 @@ -/*! - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -var assert = require('assert'); -var is = require('is'); -var Storage = require('@google-cloud/storage'); -var through = require('through2'); -var uuid = require('uuid'); - -var env = require('../../../system-test/env.js'); -var Language = require('../'); - -describe('Language', function() { - var language; - - var TESTS_PREFIX = 'gcloud-tests-language-'; - - var GCS; - var BUCKET; - - var TEXT_CONTENT_SENTENCES = [ - 'Hello from stephen and david!', - 'If you find yourself in michigan, come say hi!' - ]; - - var HTML_CONTENT = [ - '', - ' ' + TEXT_CONTENT_SENTENCES[0] + '', - ' ' + TEXT_CONTENT_SENTENCES[1] + '', - '' - ].join('\n'); - - var TEXT_CONTENT = TEXT_CONTENT_SENTENCES.join(' '); - - before(function(done) { - language = new Language(env); - GCS = new Storage(env); - BUCKET = GCS.bucket(generateName('bucket')); - - BUCKET.create(done); - }); - - after(function(done) { - GCS.getBucketsStream({ prefix: TESTS_PREFIX }) - .on('error', done) - .pipe(through.obj(function(bucket, _, next) { - bucket.deleteFiles({ force: true }, function(err) { - if (err) { - next(err); - return; - } - - bucket.delete(next); - }); - })) - .on('error', done) - .on('finish', done); - }); - - var DESCRIBES = [ - { - name: 'HTML', - - vars: { - content: HTML_CONTENT, - type: 'html' - }, - - describes: [ - { - name: 'inline', - - getDocument: function(callback) { - callback(null, language.html(this.vars.content)); - } - }, - - { - name: 'GCS file', - - getDocument: function(callback) { - createFile(this.vars.content, function(err, file) { - if (err) { - callback(err); - return; - } - - callback(null, language.html(file)); - }); - } - } - ] - }, - - { - name: 'Text', - - vars: { - content: TEXT_CONTENT, - type: 'text' - }, - - describes: [ - { - name: 'inline', - - getDocument: function(callback) { - callback(null, language.text(this.vars.content)); - } - }, - - { - name: 'GCS file', - - getDocument: function(callback) { - createFile(this.vars.content, function(err, file) { - if (err) { - callback(err); - return; - } - - callback(null, language.text(file)); - }); - } - } - ] - }, - - { - name: 'Unknown', - - vars: { - content: TEXT_CONTENT - }, - - describes: [ - { - name: 'inline', - - getDocument: function(callback) { - callback(null, language.document(this.vars.content)); - } - }, - - { - name: 'GCS file', - - getDocument: function(callback) { - createFile(this.vars.content, function(err, file) { - if (err) { - callback(err); - return; - } - - callback(null, language.document(file)); - }); - } - } - ] - } - ]; - - DESCRIBES.forEach(function(describeObj) { - var CONTENT = describeObj.vars.content; - var CONTENT_TYPE = describeObj.vars.type; - - describe(describeObj.name, function() { - var innerDescribes = describeObj.describes; - - innerDescribes.forEach(function(innerDescribeObj) { - var DOC; - - describe(innerDescribeObj.name, function() { - before(function(done) { - var getDocument = innerDescribeObj.getDocument; - - getDocument.call(describeObj, function(err, doc) { - if (err) { - done(err); - return; - } - - DOC = doc; - done(); - }); - }); - - describe('annotation', function() { - it('should work without creating a document', function(done) { - if (!CONTENT_TYPE) { - language.annotate(CONTENT, validateAnnotation(done)); - return; - } - - language.annotate( - CONTENT, - { type: CONTENT_TYPE }, - validateAnnotation(done) - ); - }); - - it('should return the correct simplified response', function(done) { - DOC.annotate(validateAnnotation(done)); - }); - - it('should return only a single feature', function(done) { - DOC.annotate({ - entities: true - }, validateAnnotationSingleFeature(done)); - }); - }); - - describe('entities', function() { - it('should work without creating a document', function(done) { - if (!CONTENT_TYPE) { - language.detectEntities(CONTENT, validateEntities(done)); - return; - } - - language.detectEntities( - CONTENT, - { type: CONTENT_TYPE }, - validateEntities(done) - ); - }); - - it('should return the correct simplified response', function(done) { - DOC.detectEntities(validateEntities(done)); - }); - }); - - describe('sentiment', function() { - it('should work without creating a document', function(done) { - if (!CONTENT_TYPE) { - language.detectSentiment( - CONTENT, - validateSentiment(done) - ); - return; - } - - language.detectSentiment( - CONTENT, - { type: CONTENT_TYPE }, - validateSentiment(done) - ); - }); - - it('should return the correct simplified response', function(done) { - DOC.detectSentiment(validateSentiment(done)); - }); - }); - - describe('syntax', function() { - it('should work without creating a document', function(done) { - if (!CONTENT_TYPE) { - language.detectSyntax( - CONTENT, - validateSyntax(done) - ); - return; - } - - language.detectSyntax( - CONTENT, - { type: CONTENT_TYPE }, - validateSyntax(done) - ); - }); - - it('should return the correct simplified response', function(done) { - DOC.detectSyntax(validateSyntax(done)); - }); - }); - }); - }); - }); - }); - - function generateName(resourceType) { - var id = uuid.v4().substr(0, 10); - return TESTS_PREFIX + resourceType + '-' + id; - } - - function createFile(content, callback) { - var file = BUCKET.file(generateName('file')); - - file.save(content, function(err) { - if (err) { - callback(err); - return; - } - - callback(null, file); - }); - } - - function validateAnnotation(callback) { - return function(err, annotation, apiResponse) { - try { - assert.ifError(err); - - assert.strictEqual(annotation.language, apiResponse.language); - assert.deepEqual(annotation.sentiment, apiResponse.documentSentiment); - assert.deepEqual(annotation.entities, apiResponse.entities); - assert.deepEqual(annotation.sentences, apiResponse.sentences); - assert.deepEqual(annotation.tokens, apiResponse.tokens); - - callback(); - } catch(e) { - callback(e); - } - }; - } - - function validateAnnotationSingleFeature(callback) { - return function(err, annotation, apiResponse) { - try { - assert.ifError(err); - - assert.strictEqual(annotation.language, apiResponse.language); - assert.deepEqual(annotation.entities, apiResponse.entities); - - assert.strictEqual(annotation.sentences, undefined); - assert.strictEqual(annotation.sentiment, undefined); - assert.strictEqual(annotation.tokens, undefined); - - assert(is.object(apiResponse)); - - callback(); - } catch(e) { - callback(e); - } - }; - } - - function validateEntities(callback) { - return function(err, entities, apiResponse) { - try { - assert.ifError(err); - assert.strictEqual(entities, apiResponse.entities); - - callback(); - } catch(e) { - callback(e); - } - }; - } - - function validateSentiment(callback) { - return function(err, sentiment, apiResponse) { - try { - assert.ifError(err); - assert.strictEqual(sentiment, apiResponse.documentSentiment); - - callback(); - } catch(e) { - callback(e); - } - }; - } - - function validateSyntax(callback) { - return function(err, syntax, apiResponse) { - try { - assert.ifError(err); - assert.strictEqual(syntax, apiResponse.tokens); - - callback(); - } catch (e) { - callback(e); - } - }; - } -}); - diff --git a/packages/google-cloud-language/test/document.js b/packages/google-cloud-language/test/document.js deleted file mode 100644 index ab0a5b55c36..00000000000 --- a/packages/google-cloud-language/test/document.js +++ /dev/null @@ -1,767 +0,0 @@ -/** - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -var assert = require('assert'); -var extend = require('extend'); -var proxyquire = require('proxyquire'); -var util = require('@google-cloud/common').util; - -var isCustomTypeOverride; -var promisified = false; -var fakeUtil = extend(true, {}, util, { - isCustomType: function() { - if (isCustomTypeOverride) { - return isCustomTypeOverride.apply(null, arguments); - } - - return false; - }, - promisifyAll: function(Class) { - if (Class.name === 'Document') { - promisified = true; - } - } -}); - -describe('Document', function() { - var DocumentCache; - var Document; - var document; - - var LANGUAGE = { - api: {} - }; - var CONFIG = 'inline content'; - - before(function() { - Document = proxyquire('../src/document.js', { - '@google-cloud/common': { - util: fakeUtil - } - }); - - DocumentCache = extend(true, {}, Document); - DocumentCache.prototype = extend(true, {}, Document.prototype); - }); - - beforeEach(function() { - isCustomTypeOverride = null; - - extend(Document, DocumentCache); - Document.prototype = extend({}, DocumentCache.prototype); - - document = new Document(LANGUAGE, CONFIG); - }); - - describe('instantiation', function() { - it('should expose the gax API', function() { - assert.strictEqual(document.api, LANGUAGE.api); - }); - - it('should promisify all the things', function() { - assert(promisified); - }); - - it('should set the correct encodingType', function() { - var detectedEncodingType = 'detected-encoding-type'; - var config = { - content: CONFIG - }; - - Document.prototype.detectEncodingType_ = function(options) { - assert.strictEqual(options, config); - return detectedEncodingType; - }; - - var document = new Document(LANGUAGE, config); - - assert.strictEqual(document.encodingType, detectedEncodingType); - }); - - it('should set the correct document for inline content', function() { - assert.deepEqual(document.document, { - content: CONFIG, - type: 'PLAIN_TEXT' - }); - }); - - it('should set the correct document for content with language', function() { - var document = new Document(LANGUAGE, { - content: CONFIG, - language: 'EN' - }); - - assert.strictEqual(document.document.language, 'EN'); - }); - - it('should set the correct document for content with type', function() { - var document = new Document(LANGUAGE, { - content: CONFIG, - type: 'html' - }); - - assert.strictEqual(document.document.type, 'HTML'); - }); - - it('should set the correct document for text', function() { - var document = new Document(LANGUAGE, { - content: CONFIG, - type: 'text' - }); - - assert.deepEqual(document.document, { - content: CONFIG, - type: 'PLAIN_TEXT' - }); - }); - - it('should set the GCS content URI from a File', function() { - var file = { - // Leave spaces in to check that it is URI-encoded: - id: 'file name', - bucket: { - id: 'bucket name' - } - }; - - isCustomTypeOverride = function(content, type) { - assert.strictEqual(content, file); - assert.strictEqual(type, 'storage/file'); - return true; - }; - - var document = new Document(LANGUAGE, { - content: file - }); - - assert.deepEqual(document.document.gcsContentUri, [ - 'gs://', - encodeURIComponent(file.bucket.id), - '/', - encodeURIComponent(file.id), - ].join('')); - }); - - it('should default the encodingType to UTF8 if a Buffer', function() { - var document = new Document(LANGUAGE, { - content: new Buffer([]) - }); - - assert.strictEqual(document.encodingType, 'UTF8'); - }); - }); - - describe('LABEL_DESCRIPTIONS', function() { - var expectedDescriptions = { - UNKNOWN: 'Unknown', - ABBREV: 'Abbreviation modifier', - ACOMP: 'Adjectival complement', - ADVCL: 'Adverbial clause modifier', - ADVMOD: 'Adverbial modifier', - AMOD: 'Adjectival modifier of an NP', - APPOS: 'Appositional modifier of an NP', - ATTR: 'Attribute dependent of a copular verb', - AUX: 'Auxiliary (non-main) verb', - AUXPASS: 'Passive auxiliary', - CC: 'Coordinating conjunction', - CCOMP: 'Clausal complement of a verb or adjective', - CONJ: 'Conjunct', - CSUBJ: 'Clausal subject', - CSUBJPASS: 'Clausal passive subject', - DEP: 'Dependency (unable to determine)', - DET: 'Determiner', - DISCOURSE: 'Discourse', - DOBJ: 'Direct object', - EXPL: 'Expletive', - GOESWITH: ' Goes with (part of a word in a text not well edited)', - IOBJ: 'Indirect object', - MARK: 'Marker (word introducing a subordinate clause)', - MWE: 'Multi-word expression', - MWV: 'Multi-word verbal expression', - NEG: 'Negation modifier', - NN: 'Noun compound modifier', - NPADVMOD: 'Noun phrase used as an adverbial modifier', - NSUBJ: 'Nominal subject', - NSUBJPASS: 'Passive nominal subject', - NUM: 'Numeric modifier of a noun', - NUMBER: 'Element of compound number', - P: 'Punctuation mark', - PARATAXIS: 'Parataxis relation', - PARTMOD: 'Participial modifier', - PCOMP: 'The complement of a preposition is a clause', - POBJ: 'Object of a preposition', - POSS: 'Possession modifier', - POSTNEG: 'Postverbal negative particle', - PRECOMP: 'Predicate complement', - PRECONJ: 'Preconjunt', - PREDET: 'Predeterminer', - PREF: 'Prefix', - PREP: 'Prepositional modifier', - PRONL: 'The relationship between a verb and verbal morpheme', - PRT: 'Particle', - PS: 'Associative or possessive marker', - QUANTMOD: 'Quantifier phrase modifier', - RCMOD: 'Relative clause modifier', - RCMODREL: 'Complementizer in relative clause', - RDROP: 'Ellipsis without a preceding predicate', - REF: 'Referent', - REMNANT: 'Remnant', - REPARANDUM: 'Reparandum', - ROOT: 'Root', - SNUM: 'Suffix specifying a unit of number', - SUFF: 'Suffix', - TMOD: 'Temporal modifier', - TOPIC: 'Topic marker', - VMOD: - 'Clause headed by an infinite form of the verb that modifies a noun', - VOCATIVE: 'Vocative', - XCOMP: 'Open clausal complement', - SUFFIX: 'Name suffix', - TITLE: 'Name title', - ADVPHMOD: 'Adverbial phrase modifier', - AUXCAUS: 'Causative auxiliary', - AUXVV: 'Helper auxiliary', - DTMOD: 'Rentaishi (Prenominal modifier)', - FOREIGN: 'Foreign words', - KW: 'Keyword', - LIST: 'List for chains of comparable items', - NOMC: 'Nominalized clause', - NOMCSUBJ: 'Nominalized clausal subject', - NOMCSUBJPASS: 'Nominalized clausal passive', - NUMC: 'Compound of numeric modifier', - COP: 'Copula', - DISLOCATED: 'Dislocated relation (for fronted/topicalized elements)' - }; - - it('should contain the correct list of label descriptions', function() { - assert.deepEqual(Document.LABEL_DESCRIPTIONS, expectedDescriptions); - }); - }); - - describe('PART_OF_SPEECH', function() { - var expectedPartOfSpeech = { - UNKNOWN: 'Unknown', - ADJ: 'Adjective', - ADP: 'Adposition (preposition and postposition)', - ADV: 'Adverb', - CONJ: 'Conjunction', - DET: 'Determiner', - NOUN: 'Noun (common and proper)', - NUM: 'Cardinal number', - PRON: 'Pronoun', - PRT: 'Particle or other function word', - PUNCT: 'Punctuation', - VERB: 'Verb (all tenses and modes)', - X: 'Other: foreign words, typos, abbreviations', - AFFIX: 'Affix' - }; - - it('should define the correct parts of speech', function() { - assert.deepEqual(Document.PART_OF_SPEECH, expectedPartOfSpeech); - }); - }); - - describe('annotate', function() { - it('should make the correct API request', function(done) { - var detectedEncodingType = 'detected-encoding-type'; - - document.detectEncodingType_ = function(options) { - assert.deepEqual(options, {}); - return detectedEncodingType; - }; - - document.api.Language = { - annotateText: function(reqOpts) { - assert.strictEqual(reqOpts.document, document.document); - - assert.deepEqual(reqOpts.features, { - extractDocumentSentiment: true, - extractEntities: true, - extractSyntax: true - }); - - assert.strictEqual(reqOpts.encodingType, detectedEncodingType); - - done(); - } - }; - - document.annotate(assert.ifError); - }); - - it('should allow specifying individual features', function(done) { - document.api.Language = { - annotateText: function(reqOpts) { - assert.deepEqual(reqOpts.features, { - extractDocumentSentiment: false, - extractEntities: true, - extractSyntax: true - }); - - done(); - } - }; - - document.annotate({ - entities: true, - syntax: true - }, assert.ifError); - }); - - it('should honor raw API terminology', function(done) { - document.api.Language = { - annotateText: function(reqOpts) { - assert.deepEqual(reqOpts.features, { - extractDocumentSentiment: true, - extractEntities: true, - extractSyntax: true - }); - - done(); - } - }; - - document.annotate({ - extractDocumentSentiment: true, - extractEntities: true, - extractSyntax: true - }, assert.ifError); - }); - - describe('error', function() { - var apiResponse = {}; - var error = new Error('Error.'); - - beforeEach(function() { - document.api.Language = { - annotateText: function(options, callback) { - callback(error, apiResponse); - } - }; - }); - - it('should exec callback with error and API response', function(done) { - document.annotate(function(err, annotation, apiResponse_) { - assert.strictEqual(err, error); - assert.strictEqual(annotation, null); - assert.strictEqual(apiResponse_, apiResponse); - done(); - }); - }); - }); - - describe('success', function() { - var apiResponses = { - default: { - language: 'EN', - sentences: [], - tokens: [] - }, - - withSentiment: { - documentSentiment: {} - }, - - withEntities: { - entities: [] - }, - - withSyntax: { - sentences: {}, - tokens: {} - } - }; - - apiResponses.withAll = extend( - {}, - apiResponses.default, - apiResponses.withSentiment, - apiResponses.withEntities, - apiResponses.withSyntax - ); - - function createAnnotateTextWithResponse(apiResponse) { - return function(reqOpts, callback) { - callback(null, apiResponse); - }; - } - - it('should always return the language', function(done) { - var apiResponse = apiResponses.default; - - document.api.Language = { - annotateText: createAnnotateTextWithResponse(apiResponse) - }; - - document.annotate(function(err, annotation, apiResponse_) { - assert.ifError(err); - assert.strictEqual(annotation.language, apiResponse.language); - assert.deepEqual(apiResponse_, apiResponse); - done(); - }); - }); - - it('should return syntax when no features are requested', function(done) { - var apiResponse = apiResponses.default; - - document.api.Language = { - annotateText: createAnnotateTextWithResponse(apiResponse) - }; - - document.annotate(function(err, annotation, apiResponse_) { - assert.ifError(err); - assert.strictEqual(annotation.sentences, apiResponse.sentences); - assert.strictEqual(annotation.tokens, apiResponse.tokens); - assert.deepEqual(apiResponse_, apiResponse); - done(); - }); - }); - - it('should return the sentiment if available', function(done) { - var apiResponse = apiResponses.withSentiment; - - document.api.Language = { - annotateText: createAnnotateTextWithResponse(apiResponse) - }; - - document.annotate(function(err, annotation, apiResponse_) { - assert.ifError(err); - - assert.strictEqual(annotation.language, apiResponse.language); - assert - .strictEqual(annotation.sentiment, apiResponse.documentSentiment); - - assert.deepEqual(apiResponse_, apiResponse); - - done(); - }); - }); - - it('should return the entities if available', function(done) { - var apiResponse = apiResponses.withEntities; - - document.api.Language = { - annotateText: createAnnotateTextWithResponse(apiResponse) - }; - - document.annotate(function(err, annotation, apiResponse_) { - assert.ifError(err); - - assert.strictEqual(annotation.language, apiResponse.language); - assert.strictEqual(annotation.entities, apiResponse.entities); - - assert.deepEqual(apiResponse_, apiResponse); - - done(); - }); - }); - - it('should not return syntax analyses when not wanted', function(done) { - var apiResponse = apiResponses.default; - - document.api.Language = { - annotateText: createAnnotateTextWithResponse(apiResponse) - }; - - document.annotate({ - entities: true, - sentiment: true - }, function(err, annotation) { - assert.ifError(err); - - assert.strictEqual(annotation.sentences, undefined); - assert.strictEqual(annotation.tokens, undefined); - - done(); - }); - }); - }); - }); - - describe('detectEntities', function() { - it('should make the correct API request', function(done) { - var detectedEncodingType = 'detected-encoding-type'; - - document.detectEncodingType_ = function(options) { - assert.deepEqual(options, {}); - return detectedEncodingType; - }; - - document.api.Language = { - analyzeEntities: function(reqOpts) { - assert.strictEqual(reqOpts.document, document.document); - assert.strictEqual(reqOpts.encodingType, detectedEncodingType); - done(); - } - }; - - document.detectEntities(assert.ifError); - }); - - describe('error', function() { - var apiResponse = {}; - var error = new Error('Error.'); - - beforeEach(function() { - document.api.Language = { - analyzeEntities: function(reqOpts, callback) { - callback(error, apiResponse); - } - }; - }); - - it('should exec callback with error and API response', function(done) { - document.detectEntities(function(err, entities, apiResponse_) { - assert.strictEqual(err, error); - assert.strictEqual(entities, null); - assert.strictEqual(apiResponse_, apiResponse); - done(); - }); - }); - }); - - describe('success', function() { - var apiResponse = { - entities: [] - }; - - beforeEach(function() { - document.api.Language = { - analyzeEntities: function(reqOpts, callback) { - callback(null, apiResponse); - } - }; - }); - - it('should return the entities', function(done) { - document.detectEntities(function(err, entities, apiResponse_) { - assert.ifError(err); - - assert.strictEqual(entities, apiResponse.entities); - assert.strictEqual(apiResponse_, apiResponse); - done(); - }); - }); - }); - }); - - describe('detectSentiment', function() { - it('should make the correct API request', function(done) { - var detectedEncodingType = 'detected-encoding-type'; - - document.detectEncodingType_ = function(options) { - assert.deepEqual(options, {}); - return detectedEncodingType; - }; - - document.api.Language = { - analyzeSentiment: function(reqOpts) { - assert.strictEqual(reqOpts.document, document.document); - assert.strictEqual(reqOpts.encodingType, detectedEncodingType); - done(); - } - }; - - document.encodingType = 'encoding-type'; - document.detectSentiment(assert.ifError); - }); - - describe('error', function() { - var apiResponse = {}; - var error = new Error('Error.'); - - beforeEach(function() { - document.api.Language = { - analyzeSentiment: function(reqOpts, callback) { - callback(error, apiResponse); - } - }; - }); - - it('should exec callback with error and API response', function(done) { - document.detectSentiment(function(err, sentiment, apiResponse_) { - assert.strictEqual(err, error); - assert.strictEqual(sentiment, null); - assert.strictEqual(apiResponse_, apiResponse); - done(); - }); - }); - }); - - describe('success', function() { - var apiResponse = { - documentSentiment: {}, - sentences: [], - language: 'en' - }; - - beforeEach(function() { - document.api.Language = { - analyzeSentiment: function(reqOpts, callback) { - callback(null, apiResponse); - } - }; - }); - - it('should return the sentiment object', function(done) { - document.detectSentiment(function(err, sentiment, apiResponse_) { - assert.ifError(err); - - assert.strictEqual(sentiment, apiResponse.documentSentiment); - assert.strictEqual(apiResponse_, apiResponse); - done(); - }); - }); - }); - }); - - describe('detectSyntax', function() { - it('should make the correct API request', function(done) { - var detectedEncodingType = 'detected-encoding-type'; - - document.detectEncodingType_ = function(options) { - assert.deepEqual(options, {}); - return detectedEncodingType; - }; - - document.api.Language = { - analyzeSyntax: function(reqOpts) { - assert.strictEqual(reqOpts.document, document.document); - assert.strictEqual(reqOpts.encodingType, detectedEncodingType); - done(); - } - }; - - document.encodingType = 'encoding-type'; - document.detectSyntax(assert.ifError); - }); - - describe('error', function() { - var apiResponse = {}; - var error = new Error('Error.'); - - beforeEach(function() { - document.api.Language = { - analyzeSyntax: function(reqOpts, callback) { - callback(error, apiResponse); - } - }; - }); - - it('should exec callback with error and API response', function(done) { - document.detectSyntax(function(err, syntax, apiResponse_) { - assert.strictEqual(err, error); - assert.strictEqual(syntax, null); - assert.strictEqual(apiResponse_, apiResponse); - done(); - }); - }); - }); - - describe('success', function() { - var apiResponse = { - sentences: [{}], - tokens: [{}], - language: 'en' - }; - - beforeEach(function() { - document.api.Language = { - analyzeSyntax: function(reqOpts, callback) { - callback(null, apiResponse); - } - }; - }); - - it('should return the token list', function(done) { - document.detectSyntax(function(err, syntax, apiResponse_) { - assert.ifError(err); - - assert.strictEqual(syntax, apiResponse.tokens); - assert.strictEqual(apiResponse_, apiResponse); - done(); - }); - }); - }); - }); - - describe('detectEncodingType_', function() { - it('should return if no encoding type is set', function() { - assert.strictEqual(document.detectEncodingType_({ - encoding: '' - }), undefined); - - assert.strictEqual(document.detectEncodingType_({ - encodingType: '' - }), undefined); - - document.encodingType = ''; - assert.strictEqual(document.detectEncodingType_({}), undefined); - }); - - it('should return UTF8 for BUFFER input', function() { - assert.strictEqual(document.detectEncodingType_({ - encodingType: 'buffer' - }), 'UTF8'); - }); - - it('should return UTF16 for STRING input', function() { - assert.strictEqual(document.detectEncodingType_({ - encodingType: 'string' - }), 'UTF16'); - }); - - it('should return original value', function() { - assert.strictEqual(document.detectEncodingType_({ - encodingType: 'UTF32' - }), 'UTF32'); - }); - - it('should capitilize and remove whitespace and hyphens', function() { - assert.strictEqual(document.detectEncodingType_({ - encodingType: 'utf32' - }), 'UTF32'); - - assert.strictEqual(document.detectEncodingType_({ - encodingType: 'UTF 32' - }), 'UTF32'); - - assert.strictEqual(document.detectEncodingType_({ - encodingType: 'UTF-32' - }), 'UTF32'); - }); - - it('should accept options.encoding', function() { - assert.strictEqual(document.detectEncodingType_({ - encoding: 'UTF32' - }), 'UTF32'); - }); - - it('should accept options.encodingType', function() { - assert.strictEqual(document.detectEncodingType_({ - encodingType: 'UTF32' - }), 'UTF32'); - }); - - it('should default to encodingType instance property', function() { - document.encodingType = 'utf-32'; - - assert.strictEqual(document.detectEncodingType_({}), 'UTF32'); - }); - }); -}); diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js new file mode 100644 index 00000000000..dd541d37017 --- /dev/null +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -0,0 +1,231 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; + +var assert = require('assert'); +var languageV1 = require('../src/v1')(); + +var FAKE_STATUS_CODE = 1; +var error = new Error(); +error.code = FAKE_STATUS_CODE; + +describe('LanguageServiceClient', function() { + describe('analyzeSentiment', function() { + it('invokes analyzeSentiment without error', function(done) { + var client = languageV1.languageServiceClient(); + // Mock request + var document = {}; + var request = { + document : document + }; + + // Mock response + var language = 'language-1613589672'; + var expectedResponse = { + language : language + }; + + // Mock Grpc layer + client._analyzeSentiment = mockSimpleGrpcMethod(request, expectedResponse); + + client.analyzeSentiment(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes analyzeSentiment with error', function(done) { + var client = languageV1.languageServiceClient(); + // Mock request + var document = {}; + var request = { + document : document + }; + + // Mock Grpc layer + client._analyzeSentiment = mockSimpleGrpcMethod(request, null, error); + + client.analyzeSentiment(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('analyzeEntities', function() { + it('invokes analyzeEntities without error', function(done) { + var client = languageV1.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock response + var language = 'language-1613589672'; + var expectedResponse = { + language : language + }; + + // Mock Grpc layer + client._analyzeEntities = mockSimpleGrpcMethod(request, expectedResponse); + + client.analyzeEntities(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes analyzeEntities with error', function(done) { + var client = languageV1.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock Grpc layer + client._analyzeEntities = mockSimpleGrpcMethod(request, null, error); + + client.analyzeEntities(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('analyzeSyntax', function() { + it('invokes analyzeSyntax without error', function(done) { + var client = languageV1.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock response + var language = 'language-1613589672'; + var expectedResponse = { + language : language + }; + + // Mock Grpc layer + client._analyzeSyntax = mockSimpleGrpcMethod(request, expectedResponse); + + client.analyzeSyntax(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes analyzeSyntax with error', function(done) { + var client = languageV1.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock Grpc layer + client._analyzeSyntax = mockSimpleGrpcMethod(request, null, error); + + client.analyzeSyntax(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('annotateText', function() { + it('invokes annotateText without error', function(done) { + var client = languageV1.languageServiceClient(); + // Mock request + var document = {}; + var features = {}; + var encodingType = languageV1.EncodingType.NONE; + var request = { + document : document, + features : features, + encodingType : encodingType + }; + + // Mock response + var language = 'language-1613589672'; + var expectedResponse = { + language : language + }; + + // Mock Grpc layer + client._annotateText = mockSimpleGrpcMethod(request, expectedResponse); + + client.annotateText(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes annotateText with error', function(done) { + var client = languageV1.languageServiceClient(); + // Mock request + var document = {}; + var features = {}; + var encodingType = languageV1.EncodingType.NONE; + var request = { + document : document, + features : features, + encodingType : encodingType + }; + + // Mock Grpc layer + client._annotateText = mockSimpleGrpcMethod(request, null, error); + + client.annotateText(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + +}); + +function mockSimpleGrpcMethod(expectedRequest, response, error) { + return function(actualRequest, options, callback) { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-v1beta2.js new file mode 100644 index 00000000000..8c2c944563f --- /dev/null +++ b/packages/google-cloud-language/test/gapic-v1beta2.js @@ -0,0 +1,279 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; + +var assert = require('assert'); +var languageV1beta2 = require('../src/v1beta2')(); + +var FAKE_STATUS_CODE = 1; +var error = new Error(); +error.code = FAKE_STATUS_CODE; + +describe('LanguageServiceClient', function() { + describe('analyzeSentiment', function() { + it('invokes analyzeSentiment without error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var request = { + document : document + }; + + // Mock response + var language = 'language-1613589672'; + var expectedResponse = { + language : language + }; + + // Mock Grpc layer + client._analyzeSentiment = mockSimpleGrpcMethod(request, expectedResponse); + + client.analyzeSentiment(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes analyzeSentiment with error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var request = { + document : document + }; + + // Mock Grpc layer + client._analyzeSentiment = mockSimpleGrpcMethod(request, null, error); + + client.analyzeSentiment(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('analyzeEntities', function() { + it('invokes analyzeEntities without error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1beta2.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock response + var language = 'language-1613589672'; + var expectedResponse = { + language : language + }; + + // Mock Grpc layer + client._analyzeEntities = mockSimpleGrpcMethod(request, expectedResponse); + + client.analyzeEntities(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes analyzeEntities with error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1beta2.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock Grpc layer + client._analyzeEntities = mockSimpleGrpcMethod(request, null, error); + + client.analyzeEntities(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('analyzeEntitySentiment', function() { + it('invokes analyzeEntitySentiment without error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1beta2.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock response + var language = 'language-1613589672'; + var expectedResponse = { + language : language + }; + + // Mock Grpc layer + client._analyzeEntitySentiment = mockSimpleGrpcMethod(request, expectedResponse); + + client.analyzeEntitySentiment(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes analyzeEntitySentiment with error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1beta2.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock Grpc layer + client._analyzeEntitySentiment = mockSimpleGrpcMethod(request, null, error); + + client.analyzeEntitySentiment(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('analyzeSyntax', function() { + it('invokes analyzeSyntax without error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1beta2.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock response + var language = 'language-1613589672'; + var expectedResponse = { + language : language + }; + + // Mock Grpc layer + client._analyzeSyntax = mockSimpleGrpcMethod(request, expectedResponse); + + client.analyzeSyntax(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes analyzeSyntax with error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var encodingType = languageV1beta2.EncodingType.NONE; + var request = { + document : document, + encodingType : encodingType + }; + + // Mock Grpc layer + client._analyzeSyntax = mockSimpleGrpcMethod(request, null, error); + + client.analyzeSyntax(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('annotateText', function() { + it('invokes annotateText without error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var features = {}; + var encodingType = languageV1beta2.EncodingType.NONE; + var request = { + document : document, + features : features, + encodingType : encodingType + }; + + // Mock response + var language = 'language-1613589672'; + var expectedResponse = { + language : language + }; + + // Mock Grpc layer + client._annotateText = mockSimpleGrpcMethod(request, expectedResponse); + + client.annotateText(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes annotateText with error', function(done) { + var client = languageV1beta2.languageServiceClient(); + // Mock request + var document = {}; + var features = {}; + var encodingType = languageV1beta2.EncodingType.NONE; + var request = { + document : document, + features : features, + encodingType : encodingType + }; + + // Mock Grpc layer + client._annotateText = mockSimpleGrpcMethod(request, null, error); + + client.annotateText(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + +}); + +function mockSimpleGrpcMethod(expectedRequest, response, error) { + return function(actualRequest, options, callback) { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} diff --git a/packages/google-cloud-language/test/index.js b/packages/google-cloud-language/test/index.js deleted file mode 100644 index 45237e97caa..00000000000 --- a/packages/google-cloud-language/test/index.js +++ /dev/null @@ -1,425 +0,0 @@ -/** - * Copyright 2016 Google Inc. All Rights Reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -var assert = require('assert'); -var extend = require('extend'); -var proxyquire = require('proxyquire'); -var util = require('@google-cloud/common').util; - -var promisified = false; -var fakeUtil = extend({}, util, { - promisifyAll: function(Class, options) { - if (Class.name !== 'Language') { - return; - } - - promisified = true; - assert.deepEqual(options.exclude, ['document', 'html', 'text']); - } -}); - -function FakeDocument() { - this.calledWith_ = arguments; -} - -var fakeV1Override; -function fakeV1() { - if (fakeV1Override) { - return fakeV1Override.apply(null, arguments); - } - - return { - languageServiceClient: util.noop - }; -} - -var fakeV1Beta2Override; -function fakeV1Beta2() { - if (fakeV1Beta2Override) { - return fakeV1Beta2Override.apply(null, arguments); - } - - return { - languageServiceClient: util.noop - }; -} - -describe('Language', function() { - var Language; - var language; - - var OPTIONS = {}; - - before(function() { - Language = proxyquire('../src/index.js', { - '@google-cloud/common': { - util: fakeUtil - }, - './document.js': FakeDocument, - './v1': fakeV1, - './v1beta2': fakeV1Beta2 - }); - }); - - beforeEach(function() { - fakeV1Override = null; - fakeV1Beta2Override = null; - language = new Language(OPTIONS); - }); - - describe('instantiation', function() { - it('should promisify all the things', function() { - assert(promisified); - }); - - it('should normalize the arguments', function() { - var options = { - projectId: 'project-id', - credentials: 'credentials', - email: 'email', - keyFilename: 'keyFile' - }; - - var normalizeArguments = fakeUtil.normalizeArguments; - var normalizeArgumentsCalled = false; - var fakeContext = {}; - - fakeUtil.normalizeArguments = function(context, options_) { - normalizeArgumentsCalled = true; - assert.strictEqual(context, fakeContext); - assert.strictEqual(options, options_); - return options_; - }; - - Language.call(fakeContext, options); - assert(normalizeArgumentsCalled); - - fakeUtil.normalizeArguments = normalizeArguments; - }); - - it('should create a gax api client', function() { - var expectedLanguageService = {}; - - fakeV1Override = function(options) { - var expected = { - libName: 'gccl', - libVersion: require('../package.json').version - }; - assert.deepStrictEqual(options, expected); - - return { - languageServiceClient: function(options) { - assert.deepStrictEqual(options, expected); - return expectedLanguageService; - } - }; - }; - - var language = new Language(OPTIONS); - - assert.deepEqual(language.api, { - Language: expectedLanguageService - }); - }); - - it('should create a gax api client for v1beta2', function() { - var expectedLanguageService = {}; - - fakeV1Override = function() { - throw new Error('v1 should not be initialized.'); - }; - - fakeV1Beta2Override = function(options) { - var expected = { - libName: 'gccl', - libVersion: require('../package.json').version - }; - assert.deepStrictEqual(options, expected); - - return { - languageServiceClient: function(options) { - assert.deepStrictEqual(options, expected); - return expectedLanguageService; - } - }; - }; - - var language = new Language({ - apiVersion: 'v1beta2' - }); - - assert.deepEqual(language.api, { - Language: expectedLanguageService - }); - }); - - it('should not accept an unrecognized version', function() { - assert.throws(function() { - new Language({ - apiVersion: 'v1beta42' - }); - }, new RegExp('Invalid `apiVersion` specified. Use "v1" or "v1beta2".')); - }); - }); - - describe('annotate', function() { - var CONTENT = '...'; - var OPTIONS = { - property: 'value' - }; - - var EXPECTED_OPTIONS = { - withCustomOptions: extend({}, OPTIONS, { - content: CONTENT - }), - - withoutCustomOptions: extend({}, { - content: CONTENT - }) - }; - - it('should call annotate on a Document', function(done) { - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); - - return { - annotate: function(options, callback) { - assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); - callback(); // done() - } - }; - }; - - language.annotate(CONTENT, OPTIONS, done); - }); - - it('should not require options', function(done) { - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); - - return { - annotate: function(options, callback) { - assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); - callback(); // done() - } - }; - }; - - language.annotate(CONTENT, done); - }); - }); - - describe('detectEntities', function() { - var CONTENT = '...'; - var OPTIONS = { - property: 'value' - }; - - var EXPECTED_OPTIONS = { - withCustomOptions: extend({}, OPTIONS, { - content: CONTENT - }), - - withoutCustomOptions: extend({}, { - content: CONTENT - }) - }; - - it('should call detectEntities on a Document', function(done) { - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); - - return { - detectEntities: function(options, callback) { - assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); - callback(); // done() - } - }; - }; - - language.detectEntities(CONTENT, OPTIONS, done); - }); - - it('should not require options', function(done) { - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); - - return { - detectEntities: function(options, callback) { - assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); - callback(); // done() - } - }; - }; - - language.detectEntities(CONTENT, done); - }); - }); - - describe('detectSentiment', function() { - var CONTENT = '...'; - var OPTIONS = { - property: 'value' - }; - - var EXPECTED_OPTIONS = { - withCustomOptions: extend({}, OPTIONS, { - content: CONTENT - }), - - withoutCustomOptions: extend({}, { - content: CONTENT - }) - }; - - it('should call detectSentiment on a Document', function(done) { - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); - - return { - detectSentiment: function(options, callback) { - assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); - callback(); // done() - } - }; - }; - - language.detectSentiment(CONTENT, OPTIONS, done); - }); - - it('should not require options', function(done) { - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); - - return { - detectSentiment: function(options, callback) { - assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); - callback(); // done() - } - }; - }; - - language.detectSentiment(CONTENT, done); - }); - }); - - describe('detectSyntax', function() { - var CONTENT = '...'; - var OPTIONS = { - property: 'value' - }; - - var EXPECTED_OPTIONS = { - withCustomOptions: extend({}, OPTIONS, { - content: CONTENT - }), - - withoutCustomOptions: extend({}, { - content: CONTENT - }) - }; - - it('should call detectSyntax on a Document', function(done) { - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); - - return { - detectSyntax: function(options, callback) { - assert.deepEqual(options, EXPECTED_OPTIONS.withCustomOptions); - callback(); // done() - } - }; - }; - - language.detectSyntax(CONTENT, OPTIONS, done); - }); - - it('should not require options', function(done) { - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); - - return { - detectSyntax: function(options, callback) { - assert.deepEqual(options, EXPECTED_OPTIONS.withoutCustomOptions); - callback(); // done() - } - }; - }; - - language.detectSyntax(CONTENT, done); - }); - }); - - - describe('document', function() { - var CONFIG = {}; - - it('should create a Document', function() { - var document = language.document(CONFIG); - - assert.strictEqual(document.calledWith_[0], language); - assert.strictEqual(document.calledWith_[1], CONFIG); - }); - }); - - describe('html', function() { - var CONTENT = '...'; - var OPTIONS = { - property: 'value' - }; - - var EXPECTED_OPTIONS = extend({}, OPTIONS, { - type: 'HTML', - content: CONTENT - }); - - it('should create a Document', function() { - var document = {}; - - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS); - return document; - }; - - assert.strictEqual(language.html(CONTENT, OPTIONS), document); - }); - }); - - describe('text', function() { - var CONTENT = '...'; - var OPTIONS = { - property: 'value' - }; - - var EXPECTED_OPTIONS = extend({}, OPTIONS, { - type: 'PLAIN_TEXT', - content: CONTENT - }); - - it('should create a Document', function() { - var document = {}; - - language.document = function(options) { - assert.deepEqual(options, EXPECTED_OPTIONS); - return document; - }; - - assert.strictEqual(language.text(CONTENT, OPTIONS), document); - }); - }); -}); From 07eef659dbff1aa3f55a783645e09a3b3f326d7e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 26 Jul 2017 17:26:48 -0400 Subject: [PATCH 093/488] language @ 0.11.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 5ae5dd36525..3cc4aafd448 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "repository": "GoogleCloudPlatform/google-cloud-node", "name": "@google-cloud/language", - "version": "0.10.6", + "version": "0.11.0", "author": "Google Inc", "description": "Google Cloud Natural Language API client for Node.js", "contributors": [ From 2c92f3b486982ed7bcad4e45179ed6aee4fe900c Mon Sep 17 00:00:00 2001 From: Gus Class Date: Fri, 28 Jul 2017 15:34:50 -0700 Subject: [PATCH 094/488] Upgrades language samples to semi-gapic client (#435) * Upgrades language samples to semi-gapic client * Adds package lock, may fix flaky test. * Address comments * Fix lint --- .../google-cloud-language/samples/package.json | 2 +- .../google-cloud-language/samples/quickstart.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index c1a59c26e80..e8b7e28fd4d 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -23,7 +23,7 @@ "test": "npm run system-test" }, "dependencies": { - "@google-cloud/language": "0.10.5", + "@google-cloud/language": "0.11.0", "@google-cloud/storage": "1.1.1", "yargs": "8.0.2" }, diff --git a/packages/google-cloud-language/samples/quickstart.js b/packages/google-cloud-language/samples/quickstart.js index cadb7c4d3db..afc74fe253b 100644 --- a/packages/google-cloud-language/samples/quickstart.js +++ b/packages/google-cloud-language/samples/quickstart.js @@ -19,21 +19,21 @@ // Imports the Google Cloud client library const Language = require('@google-cloud/language'); -// Your Google Cloud Platform project ID -const projectId = 'YOUR_PROJECT_ID'; - // Instantiates a client -const language = Language({ - projectId: projectId -}); +const language = Language(); // The text to analyze const text = 'Hello, world!'; +const document = { + 'content': text, + type: 'PLAIN_TEXT' +}; + // Detects the sentiment of the text -language.detectSentiment(text) +language.analyzeSentiment({'document': document}) .then((results) => { - const sentiment = results[0]; + const sentiment = results[0].documentSentiment; console.log(`Text: ${text}`); console.log(`Sentiment score: ${sentiment.score}`); From f0da7de5354eb985e563b89a755102de41edf52d Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Fri, 4 Aug 2017 17:29:41 -0700 Subject: [PATCH 095/488] Update dependencies + fix a few tests (#448) * Add semistandard as a devDependency * Fix storage tests * Fix language tests * Update (some) dependencies * Fix language slackbot tests --- packages/google-cloud-language/samples/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index e8b7e28fd4d..7ef0641aa58 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -24,14 +24,14 @@ }, "dependencies": { "@google-cloud/language": "0.11.0", - "@google-cloud/storage": "1.1.1", + "@google-cloud/storage": "1.2.1", "yargs": "8.0.2" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.15", - "ava": "0.19.1", + "@google-cloud/nodejs-repo-tools": "1.4.16", + "ava": "0.21.0", "proxyquire": "1.8.0", - "sinon": "2.3.4" + "sinon": "3.0.0" }, "cloud-repo-tools": { "requiresKeyFile": true, From af59e0140804855eb79dc9aa22ea4c2aa92f96b2 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 23 Aug 2017 14:19:35 -0700 Subject: [PATCH 096/488] Build updates. (#462) --- packages/google-cloud-language/samples/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 7ef0641aa58..f74fc45302d 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -19,8 +19,7 @@ "scripts": { "lint": "samples lint", "pretest": "npm run lint", - "system-test": "ava -T 20s --verbose system-test/*.test.js", - "test": "npm run system-test" + "test": "samples test run --cmd ava -- -T 20s --verbose system-test/*.test.js" }, "dependencies": { "@google-cloud/language": "0.11.0", From 3c203acd63c835bd4680fa80e236ad8422f88edb Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Thu, 31 Aug 2017 15:21:55 -0700 Subject: [PATCH 097/488] Update dependencies (#468) * Fix docs-samples tests, round 1 * Fix circle.yml * Add RUN_ALL_BUILDS flag * More container builder bugfixes * Tweak env vars + remove manual proxy install * Env vars in bashrc don't evaluate dynamically, so avoid them * Add semicolons for command ordering * Add appengine/static-files test to circle.yaml * Fix failing container builder tests * Address comments --- packages/google-cloud-language/samples/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index f74fc45302d..f2a7e2061c8 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -27,10 +27,10 @@ "yargs": "8.0.2" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.16", + "@google-cloud/nodejs-repo-tools": "1.4.17", "ava": "0.21.0", "proxyquire": "1.8.0", - "sinon": "3.0.0" + "sinon": "3.2.0" }, "cloud-repo-tools": { "requiresKeyFile": true, From 4e50da975c80ad80bb044179c4790000c9ac7556 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Sep 2017 16:53:41 -0700 Subject: [PATCH 098/488] Rename COPYING to LICENSE. (#2605) * Rename COPYING to LICENSE. The open source team is asking that we use LICENSE for the license filename consistently across our repos. * Fix references of COPYING to LICENSE. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 3cc4aafd448..1914e3fa009 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -34,7 +34,7 @@ "files": [ "src", "AUTHORS", - "COPYING" + "LICENSE" ], "keywords": [ "google apis client", From 04e65b2e762e6a10290063fba9432590e9c616d6 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Mon, 18 Sep 2017 15:19:30 -0700 Subject: [PATCH 099/488] Update Natural Language (#2612) --- packages/google-cloud-language/package.json | 5 +- .../cloud/language/v1/language_service.proto | 1007 ++++++++++++++++ .../language/v1beta2/language_service.proto | 1040 +++++++++++++++++ packages/google-cloud-language/src/index.js | 77 +- .../src/v1/doc/doc_language_service.js | 91 +- .../google-cloud-language/src/v1/index.js | 4 +- .../src/v1/language_service_client.js | 99 +- .../v1/language_service_client_config.json | 5 + .../src/v1beta2/doc/doc_language_service.js | 87 +- .../src/v1beta2/index.js | 4 +- .../src/v1beta2/language_service_client.js | 107 +- .../language_service_client_config.json | 5 + .../google-cloud-language/test/gapic-v1.js | 112 +- .../test/gapic-v1beta2.js | 127 +- 14 files changed, 2594 insertions(+), 176 deletions(-) create mode 100644 packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto create mode 100644 packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1914e3fa009..9225cbcb951 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -50,9 +50,8 @@ "Google Cloud Natural Language API" ], "dependencies": { - "google-proto-files": "^0.12.0", - "google-gax": "^0.13.2", - "extend": "^3.0.0" + "extend": "^3.0", + "google-gax": "^0.13.5" }, "devDependencies": { "mocha": "^3.2.0" diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto new file mode 100644 index 00000000000..6620c2c632f --- /dev/null +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -0,0 +1,1007 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.language.v1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1;language"; +option java_multiple_files = true; +option java_outer_classname = "LanguageServiceProto"; +option java_package = "com.google.cloud.language.v1"; + + +// Provides text analysis operations such as sentiment analysis and entity +// recognition. +service LanguageService { + // Analyzes the sentiment of the provided text. + rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { + option (google.api.http) = { post: "/v1/documents:analyzeSentiment" body: "*" }; + } + + // Finds named entities (currently proper names and common nouns) in the text + // along with entity types, salience, mentions for each entity, and + // other properties. + rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { + option (google.api.http) = { post: "/v1/documents:analyzeEntities" body: "*" }; + } + + // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes + // sentiment associated with each entity and its mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { + option (google.api.http) = { post: "/v1/documents:analyzeEntitySentiment" body: "*" }; + } + + // Analyzes the syntax of the text and provides sentence boundaries and + // tokenization along with part of speech tags, dependency trees, and other + // properties. + rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) { + option (google.api.http) = { post: "/v1/documents:analyzeSyntax" body: "*" }; + } + + // A convenience method that provides all the features that analyzeSentiment, + // analyzeEntities, and analyzeSyntax provide in one call. + rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) { + option (google.api.http) = { post: "/v1/documents:annotateText" body: "*" }; + } +} + +// ################################################################ # +// +// Represents the input to API methods. +message Document { + // The document types enum. + enum Type { + // The content type is not specified. + TYPE_UNSPECIFIED = 0; + + // Plain text + PLAIN_TEXT = 1; + + // HTML + HTML = 2; + } + + // Required. If the type is not set or is `TYPE_UNSPECIFIED`, + // returns an `INVALID_ARGUMENT` error. + Type type = 1; + + // The source of the document: a string containing the content or a + // Google Cloud Storage URI. + oneof source { + // The content of the input in string format. + string content = 2; + + // The Google Cloud Storage URI where the file content is located. + // This URI must be of the form: gs://bucket_name/object_name. For more + // details, see https://cloud.google.com/storage/docs/reference-uris. + // NOTE: Cloud Storage object versioning is not supported. + string gcs_content_uri = 3; + } + + // The language of the document (if not specified, the language is + // automatically detected). Both ISO and BCP-47 language codes are + // accepted.
+ // [Language Support](/natural-language/docs/languages) + // lists currently supported languages for each API method. + // If the language (either specified by the caller or automatically detected) + // is not supported by the called API method, an `INVALID_ARGUMENT` error + // is returned. + string language = 4; +} + +// Represents a sentence in the input document. +message Sentence { + // The sentence text. + TextSpan text = 1; + + // For calls to [AnalyzeSentiment][] or if + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to + // true, this field will contain the sentiment for the sentence. + Sentiment sentiment = 2; +} + +// Represents a phrase in the text that is a known entity, such as +// a person, an organization, or location. The API associates information, such +// as salience and mentions, with entities. +message Entity { + // The type of the entity. + enum Type { + // Unknown + UNKNOWN = 0; + + // Person + PERSON = 1; + + // Location + LOCATION = 2; + + // Organization + ORGANIZATION = 3; + + // Event + EVENT = 4; + + // Work of art + WORK_OF_ART = 5; + + // Consumer goods + CONSUMER_GOOD = 6; + + // Other types + OTHER = 7; + } + + // The representative name for the entity. + string name = 1; + + // The entity type. + Type type = 2; + + // Metadata associated with the entity. + // + // Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if + // available. The associated keys are "wikipedia_url" and "mid", respectively. + map metadata = 3; + + // The salience score associated with the entity in the [0, 1.0] range. + // + // The salience score for an entity provides information about the + // importance or centrality of that entity to the entire document text. + // Scores closer to 0 are less salient, while scores closer to 1.0 are highly + // salient. + float salience = 4; + + // The mentions of this entity in the input document. The API currently + // supports proper noun mentions. + repeated EntityMention mentions = 5; + + // For calls to [AnalyzeEntitySentiment][] or if + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the aggregate sentiment expressed for this + // entity in the provided document. + Sentiment sentiment = 6; +} + +// Represents the smallest syntactic building block of the text. +message Token { + // The token text. + TextSpan text = 1; + + // Parts of speech tag for this token. + PartOfSpeech part_of_speech = 2; + + // Dependency tree parse for this token. + DependencyEdge dependency_edge = 3; + + // [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + string lemma = 4; +} + +// Represents the feeling associated with the entire text or entities in +// the text. +message Sentiment { + // A non-negative number in the [0, +inf) range, which represents + // the absolute magnitude of sentiment regardless of score (positive or + // negative). + float magnitude = 2; + + // Sentiment score between -1.0 (negative sentiment) and 1.0 + // (positive sentiment). + float score = 3; +} + +// Represents part of speech information for a token. Parts of speech +// are as defined in +// http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf +message PartOfSpeech { + // The part of speech tags enum. + enum Tag { + // Unknown + UNKNOWN = 0; + + // Adjective + ADJ = 1; + + // Adposition (preposition and postposition) + ADP = 2; + + // Adverb + ADV = 3; + + // Conjunction + CONJ = 4; + + // Determiner + DET = 5; + + // Noun (common and proper) + NOUN = 6; + + // Cardinal number + NUM = 7; + + // Pronoun + PRON = 8; + + // Particle or other function word + PRT = 9; + + // Punctuation + PUNCT = 10; + + // Verb (all tenses and modes) + VERB = 11; + + // Other: foreign words, typos, abbreviations + X = 12; + + // Affix + AFFIX = 13; + } + + // The characteristic of a verb that expresses time flow during an event. + enum Aspect { + // Aspect is not applicable in the analyzed language or is not predicted. + ASPECT_UNKNOWN = 0; + + // Perfective + PERFECTIVE = 1; + + // Imperfective + IMPERFECTIVE = 2; + + // Progressive + PROGRESSIVE = 3; + } + + // The grammatical function performed by a noun or pronoun in a phrase, + // clause, or sentence. In some languages, other parts of speech, such as + // adjective and determiner, take case inflection in agreement with the noun. + enum Case { + // Case is not applicable in the analyzed language or is not predicted. + CASE_UNKNOWN = 0; + + // Accusative + ACCUSATIVE = 1; + + // Adverbial + ADVERBIAL = 2; + + // Complementive + COMPLEMENTIVE = 3; + + // Dative + DATIVE = 4; + + // Genitive + GENITIVE = 5; + + // Instrumental + INSTRUMENTAL = 6; + + // Locative + LOCATIVE = 7; + + // Nominative + NOMINATIVE = 8; + + // Oblique + OBLIQUE = 9; + + // Partitive + PARTITIVE = 10; + + // Prepositional + PREPOSITIONAL = 11; + + // Reflexive + REFLEXIVE_CASE = 12; + + // Relative + RELATIVE_CASE = 13; + + // Vocative + VOCATIVE = 14; + } + + // Depending on the language, Form can be categorizing different forms of + // verbs, adjectives, adverbs, etc. For example, categorizing inflected + // endings of verbs and adjectives or distinguishing between short and long + // forms of adjectives and participles + enum Form { + // Form is not applicable in the analyzed language or is not predicted. + FORM_UNKNOWN = 0; + + // Adnomial + ADNOMIAL = 1; + + // Auxiliary + AUXILIARY = 2; + + // Complementizer + COMPLEMENTIZER = 3; + + // Final ending + FINAL_ENDING = 4; + + // Gerund + GERUND = 5; + + // Realis + REALIS = 6; + + // Irrealis + IRREALIS = 7; + + // Short form + SHORT = 8; + + // Long form + LONG = 9; + + // Order form + ORDER = 10; + + // Specific form + SPECIFIC = 11; + } + + // Gender classes of nouns reflected in the behaviour of associated words. + enum Gender { + // Gender is not applicable in the analyzed language or is not predicted. + GENDER_UNKNOWN = 0; + + // Feminine + FEMININE = 1; + + // Masculine + MASCULINE = 2; + + // Neuter + NEUTER = 3; + } + + // The grammatical feature of verbs, used for showing modality and attitude. + enum Mood { + // Mood is not applicable in the analyzed language or is not predicted. + MOOD_UNKNOWN = 0; + + // Conditional + CONDITIONAL_MOOD = 1; + + // Imperative + IMPERATIVE = 2; + + // Indicative + INDICATIVE = 3; + + // Interrogative + INTERROGATIVE = 4; + + // Jussive + JUSSIVE = 5; + + // Subjunctive + SUBJUNCTIVE = 6; + } + + // Count distinctions. + enum Number { + // Number is not applicable in the analyzed language or is not predicted. + NUMBER_UNKNOWN = 0; + + // Singular + SINGULAR = 1; + + // Plural + PLURAL = 2; + + // Dual + DUAL = 3; + } + + // The distinction between the speaker, second person, third person, etc. + enum Person { + // Person is not applicable in the analyzed language or is not predicted. + PERSON_UNKNOWN = 0; + + // First + FIRST = 1; + + // Second + SECOND = 2; + + // Third + THIRD = 3; + + // Reflexive + REFLEXIVE_PERSON = 4; + } + + // This category shows if the token is part of a proper name. + enum Proper { + // Proper is not applicable in the analyzed language or is not predicted. + PROPER_UNKNOWN = 0; + + // Proper + PROPER = 1; + + // Not proper + NOT_PROPER = 2; + } + + // Reciprocal features of a pronoun. + enum Reciprocity { + // Reciprocity is not applicable in the analyzed language or is not + // predicted. + RECIPROCITY_UNKNOWN = 0; + + // Reciprocal + RECIPROCAL = 1; + + // Non-reciprocal + NON_RECIPROCAL = 2; + } + + // Time reference. + enum Tense { + // Tense is not applicable in the analyzed language or is not predicted. + TENSE_UNKNOWN = 0; + + // Conditional + CONDITIONAL_TENSE = 1; + + // Future + FUTURE = 2; + + // Past + PAST = 3; + + // Present + PRESENT = 4; + + // Imperfect + IMPERFECT = 5; + + // Pluperfect + PLUPERFECT = 6; + } + + // The relationship between the action that a verb expresses and the + // participants identified by its arguments. + enum Voice { + // Voice is not applicable in the analyzed language or is not predicted. + VOICE_UNKNOWN = 0; + + // Active + ACTIVE = 1; + + // Causative + CAUSATIVE = 2; + + // Passive + PASSIVE = 3; + } + + // The part of speech tag. + Tag tag = 1; + + // The grammatical aspect. + Aspect aspect = 2; + + // The grammatical case. + Case case = 3; + + // The grammatical form. + Form form = 4; + + // The grammatical gender. + Gender gender = 5; + + // The grammatical mood. + Mood mood = 6; + + // The grammatical number. + Number number = 7; + + // The grammatical person. + Person person = 8; + + // The grammatical properness. + Proper proper = 9; + + // The grammatical reciprocity. + Reciprocity reciprocity = 10; + + // The grammatical tense. + Tense tense = 11; + + // The grammatical voice. + Voice voice = 12; +} + +// Represents dependency parse tree information for a token. (For more +// information on dependency labels, see +// http://www.aclweb.org/anthology/P13-2017 +message DependencyEdge { + // The parse label enum for the token. + enum Label { + // Unknown + UNKNOWN = 0; + + // Abbreviation modifier + ABBREV = 1; + + // Adjectival complement + ACOMP = 2; + + // Adverbial clause modifier + ADVCL = 3; + + // Adverbial modifier + ADVMOD = 4; + + // Adjectival modifier of an NP + AMOD = 5; + + // Appositional modifier of an NP + APPOS = 6; + + // Attribute dependent of a copular verb + ATTR = 7; + + // Auxiliary (non-main) verb + AUX = 8; + + // Passive auxiliary + AUXPASS = 9; + + // Coordinating conjunction + CC = 10; + + // Clausal complement of a verb or adjective + CCOMP = 11; + + // Conjunct + CONJ = 12; + + // Clausal subject + CSUBJ = 13; + + // Clausal passive subject + CSUBJPASS = 14; + + // Dependency (unable to determine) + DEP = 15; + + // Determiner + DET = 16; + + // Discourse + DISCOURSE = 17; + + // Direct object + DOBJ = 18; + + // Expletive + EXPL = 19; + + // Goes with (part of a word in a text not well edited) + GOESWITH = 20; + + // Indirect object + IOBJ = 21; + + // Marker (word introducing a subordinate clause) + MARK = 22; + + // Multi-word expression + MWE = 23; + + // Multi-word verbal expression + MWV = 24; + + // Negation modifier + NEG = 25; + + // Noun compound modifier + NN = 26; + + // Noun phrase used as an adverbial modifier + NPADVMOD = 27; + + // Nominal subject + NSUBJ = 28; + + // Passive nominal subject + NSUBJPASS = 29; + + // Numeric modifier of a noun + NUM = 30; + + // Element of compound number + NUMBER = 31; + + // Punctuation mark + P = 32; + + // Parataxis relation + PARATAXIS = 33; + + // Participial modifier + PARTMOD = 34; + + // The complement of a preposition is a clause + PCOMP = 35; + + // Object of a preposition + POBJ = 36; + + // Possession modifier + POSS = 37; + + // Postverbal negative particle + POSTNEG = 38; + + // Predicate complement + PRECOMP = 39; + + // Preconjunt + PRECONJ = 40; + + // Predeterminer + PREDET = 41; + + // Prefix + PREF = 42; + + // Prepositional modifier + PREP = 43; + + // The relationship between a verb and verbal morpheme + PRONL = 44; + + // Particle + PRT = 45; + + // Associative or possessive marker + PS = 46; + + // Quantifier phrase modifier + QUANTMOD = 47; + + // Relative clause modifier + RCMOD = 48; + + // Complementizer in relative clause + RCMODREL = 49; + + // Ellipsis without a preceding predicate + RDROP = 50; + + // Referent + REF = 51; + + // Remnant + REMNANT = 52; + + // Reparandum + REPARANDUM = 53; + + // Root + ROOT = 54; + + // Suffix specifying a unit of number + SNUM = 55; + + // Suffix + SUFF = 56; + + // Temporal modifier + TMOD = 57; + + // Topic marker + TOPIC = 58; + + // Clause headed by an infinite form of the verb that modifies a noun + VMOD = 59; + + // Vocative + VOCATIVE = 60; + + // Open clausal complement + XCOMP = 61; + + // Name suffix + SUFFIX = 62; + + // Name title + TITLE = 63; + + // Adverbial phrase modifier + ADVPHMOD = 64; + + // Causative auxiliary + AUXCAUS = 65; + + // Helper auxiliary + AUXVV = 66; + + // Rentaishi (Prenominal modifier) + DTMOD = 67; + + // Foreign words + FOREIGN = 68; + + // Keyword + KW = 69; + + // List for chains of comparable items + LIST = 70; + + // Nominalized clause + NOMC = 71; + + // Nominalized clausal subject + NOMCSUBJ = 72; + + // Nominalized clausal passive + NOMCSUBJPASS = 73; + + // Compound of numeric modifier + NUMC = 74; + + // Copula + COP = 75; + + // Dislocated relation (for fronted/topicalized elements) + DISLOCATED = 76; + + // Aspect marker + ASP = 77; + + // Genitive modifier + GMOD = 78; + + // Genitive object + GOBJ = 79; + + // Infinitival modifier + INFMOD = 80; + + // Measure + MES = 81; + + // Nominal complement of a noun + NCOMP = 82; + } + + // Represents the head of this token in the dependency tree. + // This is the index of the token which has an arc going to this token. + // The index is the position of the token in the array of tokens returned + // by the API method. If this token is a root token, then the + // `head_token_index` is its own index. + int32 head_token_index = 1; + + // The parse label for the token. + Label label = 2; +} + +// Represents a mention for an entity in the text. Currently, proper noun +// mentions are supported. +message EntityMention { + // The supported types of mentions. + enum Type { + // Unknown + TYPE_UNKNOWN = 0; + + // Proper name + PROPER = 1; + + // Common noun (or noun compound) + COMMON = 2; + } + + // The mention text. + TextSpan text = 1; + + // The type of the entity mention. + Type type = 2; + + // For calls to [AnalyzeEntitySentiment][] or if + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the sentiment expressed for this mention of + // the entity in the provided document. + Sentiment sentiment = 3; +} + +// Represents an output piece of text. +message TextSpan { + // The content of the output text. + string content = 1; + + // The API calculates the beginning offset of the content in the original + // document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. + int32 begin_offset = 2; +} + +// The sentiment analysis request message. +message AnalyzeSentimentRequest { + // Input document. + Document document = 1; + + // The encoding type used by the API to calculate sentence offsets. + EncodingType encoding_type = 2; +} + +// The sentiment analysis response message. +message AnalyzeSentimentResponse { + // The overall sentiment of the input document. + Sentiment document_sentiment = 1; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + string language = 2; + + // The sentiment for all the sentences in the document. + repeated Sentence sentences = 3; +} + +// The entity-level sentiment analysis request message. +message AnalyzeEntitySentimentRequest { + // Input document. + Document document = 1; + + // The encoding type used by the API to calculate offsets. + EncodingType encoding_type = 2; +} + +// The entity-level sentiment analysis response message. +message AnalyzeEntitySentimentResponse { + // The recognized entities in the input document with associated sentiments. + repeated Entity entities = 1; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + string language = 2; +} + +// The entity analysis request message. +message AnalyzeEntitiesRequest { + // Input document. + Document document = 1; + + // The encoding type used by the API to calculate offsets. + EncodingType encoding_type = 2; +} + +// The entity analysis response message. +message AnalyzeEntitiesResponse { + // The recognized entities in the input document. + repeated Entity entities = 1; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + string language = 2; +} + +// The syntax analysis request message. +message AnalyzeSyntaxRequest { + // Input document. + Document document = 1; + + // The encoding type used by the API to calculate offsets. + EncodingType encoding_type = 2; +} + +// The syntax analysis response message. +message AnalyzeSyntaxResponse { + // Sentences in the input document. + repeated Sentence sentences = 1; + + // Tokens, along with their syntactic information, in the input document. + repeated Token tokens = 2; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + string language = 3; +} + +// The request message for the text annotation API, which can perform multiple +// analysis types (sentiment, entities, and syntax) in one call. +message AnnotateTextRequest { + // All available features for sentiment, syntax, and semantic analysis. + // Setting each one to true will enable that specific analysis for the input. + message Features { + // Extract syntax information. + bool extract_syntax = 1; + + // Extract entities. + bool extract_entities = 2; + + // Extract document-level sentiment. + bool extract_document_sentiment = 3; + + // Extract entities and their associated sentiment. + bool extract_entity_sentiment = 4; + } + + // Input document. + Document document = 1; + + // The enabled features. + Features features = 2; + + // The encoding type used by the API to calculate offsets. + EncodingType encoding_type = 3; +} + +// The text annotations response message. +message AnnotateTextResponse { + // Sentences in the input document. Populated if the user enables + // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + repeated Sentence sentences = 1; + + // Tokens, along with their syntactic information, in the input document. + // Populated if the user enables + // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + repeated Token tokens = 2; + + // Entities, along with their semantic information, in the input document. + // Populated if the user enables + // [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. + repeated Entity entities = 3; + + // The overall sentiment for the document. Populated if the user enables + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. + Sentiment document_sentiment = 4; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + string language = 5; +} + +// Represents the text encoding that the caller uses to process the output. +// Providing an `EncodingType` is recommended because the API provides the +// beginning offsets for various outputs, such as tokens and mentions, and +// languages that natively use different text encodings may access offsets +// differently. +enum EncodingType { + // If `EncodingType` is not specified, encoding-dependent information (such as + // `begin_offset`) will be set at `-1`. + NONE = 0; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-8 encoding of the input. C++ and Go are examples of languages + // that use this encoding natively. + UTF8 = 1; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-16 encoding of the input. Java and Javascript are examples of + // languages that use this encoding natively. + UTF16 = 2; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-32 encoding of the input. Python is an example of a language + // that uses this encoding natively. + UTF32 = 3; +} diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto new file mode 100644 index 00000000000..54c6638cd88 --- /dev/null +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -0,0 +1,1040 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.language.v1beta2; + +import "google/api/annotations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1beta2;language"; +option java_multiple_files = true; +option java_outer_classname = "LanguageServiceProto"; +option java_package = "com.google.cloud.language.v1beta2"; + + +// Provides text analysis operations such as sentiment analysis and entity +// recognition. +service LanguageService { + // Analyzes the sentiment of the provided text. + rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { + option (google.api.http) = { post: "/v1beta2/documents:analyzeSentiment" body: "*" }; + } + + // Finds named entities (currently proper names and common nouns) in the text + // along with entity types, salience, mentions for each entity, and + // other properties. + rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { + option (google.api.http) = { post: "/v1beta2/documents:analyzeEntities" body: "*" }; + } + + // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes + // sentiment associated with each entity and its mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { + option (google.api.http) = { post: "/v1beta2/documents:analyzeEntitySentiment" body: "*" }; + } + + // Analyzes the syntax of the text and provides sentence boundaries and + // tokenization along with part of speech tags, dependency trees, and other + // properties. + rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) { + option (google.api.http) = { post: "/v1beta2/documents:analyzeSyntax" body: "*" }; + } + + // Classifies a document into categories. + rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) { + option (google.api.http) = { post: "/v1beta2/documents:classifyText" body: "*" }; + } + + // A convenience method that provides all syntax, sentiment, entity, and + // classification features in one call. + rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) { + option (google.api.http) = { post: "/v1beta2/documents:annotateText" body: "*" }; + } +} + +// ################################################################ # +// +// Represents the input to API methods. +message Document { + // The document types enum. + enum Type { + // The content type is not specified. + TYPE_UNSPECIFIED = 0; + + // Plain text + PLAIN_TEXT = 1; + + // HTML + HTML = 2; + } + + // Required. If the type is not set or is `TYPE_UNSPECIFIED`, + // returns an `INVALID_ARGUMENT` error. + Type type = 1; + + // The source of the document: a string containing the content or a + // Google Cloud Storage URI. + oneof source { + // The content of the input in string format. + string content = 2; + + // The Google Cloud Storage URI where the file content is located. + // This URI must be of the form: gs://bucket_name/object_name. For more + // details, see https://cloud.google.com/storage/docs/reference-uris. + // NOTE: Cloud Storage object versioning is not supported. + string gcs_content_uri = 3; + } + + // The language of the document (if not specified, the language is + // automatically detected). Both ISO and BCP-47 language codes are + // accepted.
+ // [Language Support](/natural-language/docs/languages) + // lists currently supported languages for each API method. + // If the language (either specified by the caller or automatically detected) + // is not supported by the called API method, an `INVALID_ARGUMENT` error + // is returned. + string language = 4; +} + +// Represents a sentence in the input document. +message Sentence { + // The sentence text. + TextSpan text = 1; + + // For calls to [AnalyzeSentiment][] or if + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to + // true, this field will contain the sentiment for the sentence. + Sentiment sentiment = 2; +} + +// Represents a phrase in the text that is a known entity, such as +// a person, an organization, or location. The API associates information, such +// as salience and mentions, with entities. +message Entity { + // The type of the entity. + enum Type { + // Unknown + UNKNOWN = 0; + + // Person + PERSON = 1; + + // Location + LOCATION = 2; + + // Organization + ORGANIZATION = 3; + + // Event + EVENT = 4; + + // Work of art + WORK_OF_ART = 5; + + // Consumer goods + CONSUMER_GOOD = 6; + + // Other types + OTHER = 7; + } + + // The representative name for the entity. + string name = 1; + + // The entity type. + Type type = 2; + + // Metadata associated with the entity. + // + // Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if + // available. The associated keys are "wikipedia_url" and "mid", respectively. + map metadata = 3; + + // The salience score associated with the entity in the [0, 1.0] range. + // + // The salience score for an entity provides information about the + // importance or centrality of that entity to the entire document text. + // Scores closer to 0 are less salient, while scores closer to 1.0 are highly + // salient. + float salience = 4; + + // The mentions of this entity in the input document. The API currently + // supports proper noun mentions. + repeated EntityMention mentions = 5; + + // For calls to [AnalyzeEntitySentiment][] or if + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the aggregate sentiment expressed for this + // entity in the provided document. + Sentiment sentiment = 6; +} + +// Represents the smallest syntactic building block of the text. +message Token { + // The token text. + TextSpan text = 1; + + // Parts of speech tag for this token. + PartOfSpeech part_of_speech = 2; + + // Dependency tree parse for this token. + DependencyEdge dependency_edge = 3; + + // [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + string lemma = 4; +} + +// Represents the feeling associated with the entire text or entities in +// the text. +message Sentiment { + // A non-negative number in the [0, +inf) range, which represents + // the absolute magnitude of sentiment regardless of score (positive or + // negative). + float magnitude = 2; + + // Sentiment score between -1.0 (negative sentiment) and 1.0 + // (positive sentiment). + float score = 3; +} + +// Represents part of speech information for a token. +message PartOfSpeech { + // The part of speech tags enum. + enum Tag { + // Unknown + UNKNOWN = 0; + + // Adjective + ADJ = 1; + + // Adposition (preposition and postposition) + ADP = 2; + + // Adverb + ADV = 3; + + // Conjunction + CONJ = 4; + + // Determiner + DET = 5; + + // Noun (common and proper) + NOUN = 6; + + // Cardinal number + NUM = 7; + + // Pronoun + PRON = 8; + + // Particle or other function word + PRT = 9; + + // Punctuation + PUNCT = 10; + + // Verb (all tenses and modes) + VERB = 11; + + // Other: foreign words, typos, abbreviations + X = 12; + + // Affix + AFFIX = 13; + } + + // The characteristic of a verb that expresses time flow during an event. + enum Aspect { + // Aspect is not applicable in the analyzed language or is not predicted. + ASPECT_UNKNOWN = 0; + + // Perfective + PERFECTIVE = 1; + + // Imperfective + IMPERFECTIVE = 2; + + // Progressive + PROGRESSIVE = 3; + } + + // The grammatical function performed by a noun or pronoun in a phrase, + // clause, or sentence. In some languages, other parts of speech, such as + // adjective and determiner, take case inflection in agreement with the noun. + enum Case { + // Case is not applicable in the analyzed language or is not predicted. + CASE_UNKNOWN = 0; + + // Accusative + ACCUSATIVE = 1; + + // Adverbial + ADVERBIAL = 2; + + // Complementive + COMPLEMENTIVE = 3; + + // Dative + DATIVE = 4; + + // Genitive + GENITIVE = 5; + + // Instrumental + INSTRUMENTAL = 6; + + // Locative + LOCATIVE = 7; + + // Nominative + NOMINATIVE = 8; + + // Oblique + OBLIQUE = 9; + + // Partitive + PARTITIVE = 10; + + // Prepositional + PREPOSITIONAL = 11; + + // Reflexive + REFLEXIVE_CASE = 12; + + // Relative + RELATIVE_CASE = 13; + + // Vocative + VOCATIVE = 14; + } + + // Depending on the language, Form can be categorizing different forms of + // verbs, adjectives, adverbs, etc. For example, categorizing inflected + // endings of verbs and adjectives or distinguishing between short and long + // forms of adjectives and participles + enum Form { + // Form is not applicable in the analyzed language or is not predicted. + FORM_UNKNOWN = 0; + + // Adnomial + ADNOMIAL = 1; + + // Auxiliary + AUXILIARY = 2; + + // Complementizer + COMPLEMENTIZER = 3; + + // Final ending + FINAL_ENDING = 4; + + // Gerund + GERUND = 5; + + // Realis + REALIS = 6; + + // Irrealis + IRREALIS = 7; + + // Short form + SHORT = 8; + + // Long form + LONG = 9; + + // Order form + ORDER = 10; + + // Specific form + SPECIFIC = 11; + } + + // Gender classes of nouns reflected in the behaviour of associated words. + enum Gender { + // Gender is not applicable in the analyzed language or is not predicted. + GENDER_UNKNOWN = 0; + + // Feminine + FEMININE = 1; + + // Masculine + MASCULINE = 2; + + // Neuter + NEUTER = 3; + } + + // The grammatical feature of verbs, used for showing modality and attitude. + enum Mood { + // Mood is not applicable in the analyzed language or is not predicted. + MOOD_UNKNOWN = 0; + + // Conditional + CONDITIONAL_MOOD = 1; + + // Imperative + IMPERATIVE = 2; + + // Indicative + INDICATIVE = 3; + + // Interrogative + INTERROGATIVE = 4; + + // Jussive + JUSSIVE = 5; + + // Subjunctive + SUBJUNCTIVE = 6; + } + + // Count distinctions. + enum Number { + // Number is not applicable in the analyzed language or is not predicted. + NUMBER_UNKNOWN = 0; + + // Singular + SINGULAR = 1; + + // Plural + PLURAL = 2; + + // Dual + DUAL = 3; + } + + // The distinction between the speaker, second person, third person, etc. + enum Person { + // Person is not applicable in the analyzed language or is not predicted. + PERSON_UNKNOWN = 0; + + // First + FIRST = 1; + + // Second + SECOND = 2; + + // Third + THIRD = 3; + + // Reflexive + REFLEXIVE_PERSON = 4; + } + + // This category shows if the token is part of a proper name. + enum Proper { + // Proper is not applicable in the analyzed language or is not predicted. + PROPER_UNKNOWN = 0; + + // Proper + PROPER = 1; + + // Not proper + NOT_PROPER = 2; + } + + // Reciprocal features of a pronoun. + enum Reciprocity { + // Reciprocity is not applicable in the analyzed language or is not + // predicted. + RECIPROCITY_UNKNOWN = 0; + + // Reciprocal + RECIPROCAL = 1; + + // Non-reciprocal + NON_RECIPROCAL = 2; + } + + // Time reference. + enum Tense { + // Tense is not applicable in the analyzed language or is not predicted. + TENSE_UNKNOWN = 0; + + // Conditional + CONDITIONAL_TENSE = 1; + + // Future + FUTURE = 2; + + // Past + PAST = 3; + + // Present + PRESENT = 4; + + // Imperfect + IMPERFECT = 5; + + // Pluperfect + PLUPERFECT = 6; + } + + // The relationship between the action that a verb expresses and the + // participants identified by its arguments. + enum Voice { + // Voice is not applicable in the analyzed language or is not predicted. + VOICE_UNKNOWN = 0; + + // Active + ACTIVE = 1; + + // Causative + CAUSATIVE = 2; + + // Passive + PASSIVE = 3; + } + + // The part of speech tag. + Tag tag = 1; + + // The grammatical aspect. + Aspect aspect = 2; + + // The grammatical case. + Case case = 3; + + // The grammatical form. + Form form = 4; + + // The grammatical gender. + Gender gender = 5; + + // The grammatical mood. + Mood mood = 6; + + // The grammatical number. + Number number = 7; + + // The grammatical person. + Person person = 8; + + // The grammatical properness. + Proper proper = 9; + + // The grammatical reciprocity. + Reciprocity reciprocity = 10; + + // The grammatical tense. + Tense tense = 11; + + // The grammatical voice. + Voice voice = 12; +} + +// Represents dependency parse tree information for a token. +message DependencyEdge { + // The parse label enum for the token. + enum Label { + // Unknown + UNKNOWN = 0; + + // Abbreviation modifier + ABBREV = 1; + + // Adjectival complement + ACOMP = 2; + + // Adverbial clause modifier + ADVCL = 3; + + // Adverbial modifier + ADVMOD = 4; + + // Adjectival modifier of an NP + AMOD = 5; + + // Appositional modifier of an NP + APPOS = 6; + + // Attribute dependent of a copular verb + ATTR = 7; + + // Auxiliary (non-main) verb + AUX = 8; + + // Passive auxiliary + AUXPASS = 9; + + // Coordinating conjunction + CC = 10; + + // Clausal complement of a verb or adjective + CCOMP = 11; + + // Conjunct + CONJ = 12; + + // Clausal subject + CSUBJ = 13; + + // Clausal passive subject + CSUBJPASS = 14; + + // Dependency (unable to determine) + DEP = 15; + + // Determiner + DET = 16; + + // Discourse + DISCOURSE = 17; + + // Direct object + DOBJ = 18; + + // Expletive + EXPL = 19; + + // Goes with (part of a word in a text not well edited) + GOESWITH = 20; + + // Indirect object + IOBJ = 21; + + // Marker (word introducing a subordinate clause) + MARK = 22; + + // Multi-word expression + MWE = 23; + + // Multi-word verbal expression + MWV = 24; + + // Negation modifier + NEG = 25; + + // Noun compound modifier + NN = 26; + + // Noun phrase used as an adverbial modifier + NPADVMOD = 27; + + // Nominal subject + NSUBJ = 28; + + // Passive nominal subject + NSUBJPASS = 29; + + // Numeric modifier of a noun + NUM = 30; + + // Element of compound number + NUMBER = 31; + + // Punctuation mark + P = 32; + + // Parataxis relation + PARATAXIS = 33; + + // Participial modifier + PARTMOD = 34; + + // The complement of a preposition is a clause + PCOMP = 35; + + // Object of a preposition + POBJ = 36; + + // Possession modifier + POSS = 37; + + // Postverbal negative particle + POSTNEG = 38; + + // Predicate complement + PRECOMP = 39; + + // Preconjunt + PRECONJ = 40; + + // Predeterminer + PREDET = 41; + + // Prefix + PREF = 42; + + // Prepositional modifier + PREP = 43; + + // The relationship between a verb and verbal morpheme + PRONL = 44; + + // Particle + PRT = 45; + + // Associative or possessive marker + PS = 46; + + // Quantifier phrase modifier + QUANTMOD = 47; + + // Relative clause modifier + RCMOD = 48; + + // Complementizer in relative clause + RCMODREL = 49; + + // Ellipsis without a preceding predicate + RDROP = 50; + + // Referent + REF = 51; + + // Remnant + REMNANT = 52; + + // Reparandum + REPARANDUM = 53; + + // Root + ROOT = 54; + + // Suffix specifying a unit of number + SNUM = 55; + + // Suffix + SUFF = 56; + + // Temporal modifier + TMOD = 57; + + // Topic marker + TOPIC = 58; + + // Clause headed by an infinite form of the verb that modifies a noun + VMOD = 59; + + // Vocative + VOCATIVE = 60; + + // Open clausal complement + XCOMP = 61; + + // Name suffix + SUFFIX = 62; + + // Name title + TITLE = 63; + + // Adverbial phrase modifier + ADVPHMOD = 64; + + // Causative auxiliary + AUXCAUS = 65; + + // Helper auxiliary + AUXVV = 66; + + // Rentaishi (Prenominal modifier) + DTMOD = 67; + + // Foreign words + FOREIGN = 68; + + // Keyword + KW = 69; + + // List for chains of comparable items + LIST = 70; + + // Nominalized clause + NOMC = 71; + + // Nominalized clausal subject + NOMCSUBJ = 72; + + // Nominalized clausal passive + NOMCSUBJPASS = 73; + + // Compound of numeric modifier + NUMC = 74; + + // Copula + COP = 75; + + // Dislocated relation (for fronted/topicalized elements) + DISLOCATED = 76; + + // Aspect marker + ASP = 77; + + // Genitive modifier + GMOD = 78; + + // Genitive object + GOBJ = 79; + + // Infinitival modifier + INFMOD = 80; + + // Measure + MES = 81; + + // Nominal complement of a noun + NCOMP = 82; + } + + // Represents the head of this token in the dependency tree. + // This is the index of the token which has an arc going to this token. + // The index is the position of the token in the array of tokens returned + // by the API method. If this token is a root token, then the + // `head_token_index` is its own index. + int32 head_token_index = 1; + + // The parse label for the token. + Label label = 2; +} + +// Represents a mention for an entity in the text. Currently, proper noun +// mentions are supported. +message EntityMention { + // The supported types of mentions. + enum Type { + // Unknown + TYPE_UNKNOWN = 0; + + // Proper name + PROPER = 1; + + // Common noun (or noun compound) + COMMON = 2; + } + + // The mention text. + TextSpan text = 1; + + // The type of the entity mention. + Type type = 2; + + // For calls to [AnalyzeEntitySentiment][] or if + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the sentiment expressed for this mention of + // the entity in the provided document. + Sentiment sentiment = 3; +} + +// Represents an output piece of text. +message TextSpan { + // The content of the output text. + string content = 1; + + // The API calculates the beginning offset of the content in the original + // document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. + int32 begin_offset = 2; +} + +// Represents a category returned from the text classifier. +message ClassificationCategory { + // The name of the category representing the document. + string name = 1; + + // The classifier's confidence of the category. Number represents how certain + // the classifier is that this category represents the given text. + float confidence = 2; +} + +// The sentiment analysis request message. +message AnalyzeSentimentRequest { + // Input document. + Document document = 1; + + // The encoding type used by the API to calculate sentence offsets for the + // sentence sentiment. + EncodingType encoding_type = 2; +} + +// The sentiment analysis response message. +message AnalyzeSentimentResponse { + // The overall sentiment of the input document. + Sentiment document_sentiment = 1; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + string language = 2; + + // The sentiment for all the sentences in the document. + repeated Sentence sentences = 3; +} + +// The entity-level sentiment analysis request message. +message AnalyzeEntitySentimentRequest { + // Input document. + Document document = 1; + + // The encoding type used by the API to calculate offsets. + EncodingType encoding_type = 2; +} + +// The entity-level sentiment analysis response message. +message AnalyzeEntitySentimentResponse { + // The recognized entities in the input document with associated sentiments. + repeated Entity entities = 1; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + string language = 2; +} + +// The entity analysis request message. +message AnalyzeEntitiesRequest { + // Input document. + Document document = 1; + + // The encoding type used by the API to calculate offsets. + EncodingType encoding_type = 2; +} + +// The entity analysis response message. +message AnalyzeEntitiesResponse { + // The recognized entities in the input document. + repeated Entity entities = 1; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + string language = 2; +} + +// The syntax analysis request message. +message AnalyzeSyntaxRequest { + // Input document. + Document document = 1; + + // The encoding type used by the API to calculate offsets. + EncodingType encoding_type = 2; +} + +// The syntax analysis response message. +message AnalyzeSyntaxResponse { + // Sentences in the input document. + repeated Sentence sentences = 1; + + // Tokens, along with their syntactic information, in the input document. + repeated Token tokens = 2; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + string language = 3; +} + +// The document classification request message. +message ClassifyTextRequest { + // Input document. + Document document = 1; +} + +// The document classification response message. +message ClassifyTextResponse { + // Categories representing the input document. + repeated ClassificationCategory categories = 1; +} + +// The request message for the text annotation API, which can perform multiple +// analysis types (sentiment, entities, and syntax) in one call. +message AnnotateTextRequest { + // All available features for sentiment, syntax, and semantic analysis. + // Setting each one to true will enable that specific analysis for the input. + message Features { + // Extract syntax information. + bool extract_syntax = 1; + + // Extract entities. + bool extract_entities = 2; + + // Extract document-level sentiment. + bool extract_document_sentiment = 3; + + // Extract entities and their associated sentiment. + bool extract_entity_sentiment = 4; + + // Classify the full document into categories. + bool classify_text = 6; + } + + // Input document. + Document document = 1; + + // The enabled features. + Features features = 2; + + // The encoding type used by the API to calculate offsets. + EncodingType encoding_type = 3; +} + +// The text annotations response message. +message AnnotateTextResponse { + // Sentences in the input document. Populated if the user enables + // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + repeated Sentence sentences = 1; + + // Tokens, along with their syntactic information, in the input document. + // Populated if the user enables + // [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + repeated Token tokens = 2; + + // Entities, along with their semantic information, in the input document. + // Populated if the user enables + // [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. + repeated Entity entities = 3; + + // The overall sentiment for the document. Populated if the user enables + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. + Sentiment document_sentiment = 4; + + // The language of the text, which will be the same as the language specified + // in the request or, if not specified, the automatically-detected language. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + string language = 5; + + // Categories identified in the input document. + repeated ClassificationCategory categories = 6; +} + +// Represents the text encoding that the caller uses to process the output. +// Providing an `EncodingType` is recommended because the API provides the +// beginning offsets for various outputs, such as tokens and mentions, and +// languages that natively use different text encodings may access offsets +// differently. +enum EncodingType { + // If `EncodingType` is not specified, encoding-dependent information (such as + // `begin_offset`) will be set at `-1`. + NONE = 0; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-8 encoding of the input. C++ and Go are examples of languages + // that use this encoding natively. + UTF8 = 1; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-16 encoding of the input. Java and Javascript are examples of + // languages that use this encoding natively. + UTF16 = 2; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-32 encoding of the input. Python is an example of a language + // that uses this encoding natively. + UTF32 = 3; +} diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 7919b904585..299b668726b 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -14,35 +14,49 @@ * limitations under the License. */ -/*! - * @module language - * @name Language - */ - + /*! + * @module language + * @name Language + */ 'use strict'; var extend = require('extend'); var gapic = { v1: require('./v1'), - v1beta2: require('./v1beta2') + v1beta2: require('./v1beta2'), }; var gaxGrpc = require('google-gax').grpc(); +var path = require('path'); const VERSION = require('../package.json').version; /** - * Create a V1 languageServiceClient with additional helpers for common + * Create an languageServiceClient with additional helpers for common * tasks. * * Provides text analysis operations such as sentiment analysis and entity * recognition. * - * @constructor - * @alias module:language - * * @param {object=} options - [Configuration object](#/docs). + * @param {object=} options.credentials - Credentials object. + * @param {string=} options.credentials.client_email + * @param {string=} options.credentials.private_key + * @param {string=} options.email - Account email address. Required when using a + * .pem or .p12 keyFilename. + * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option above is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number=} options.port - The port on which to connect to * the remote host. + * @param {string=} options.projectId - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function=} options.promise - Custom promise module to use instead + * of native Promises. * @param {string=} options.servicePath - The domain name of the * API remote host. */ @@ -58,16 +72,41 @@ function languageV1(options) { return client; } +var v1Protos = {}; + +extend(v1Protos, gaxGrpc.loadProto( + path.join(__dirname, '..', 'protos', + 'google/cloud/language/v1/language_service.proto') +).google.cloud.language.v1); + + /** - * Create a V1beta2 languageServiceClient with additional helpers for common + * Create an languageServiceClient with additional helpers for common * tasks. * * Provides text analysis operations such as sentiment analysis and entity * recognition. * * @param {object=} options - [Configuration object](#/docs). + * @param {object=} options.credentials - Credentials object. + * @param {string=} options.credentials.client_email + * @param {string=} options.credentials.private_key + * @param {string=} options.email - Account email address. Required when using a + * .pem or .p12 keyFilename. + * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option above is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number=} options.port - The port on which to connect to * the remote host. + * @param {string=} options.projectId - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function=} options.promise - Custom promise module to use instead + * of native Promises. * @param {string=} options.servicePath - The domain name of the * API remote host. */ @@ -83,19 +122,13 @@ function languageV1beta2(options) { return client; } -var v1Protos = {}; - -extend(v1Protos, gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/cloud/language/v1/language_service.proto' -}]).google.cloud.language.v1); - var v1beta2Protos = {}; -extend(v1beta2Protos, gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/cloud/language/v1beta2/language_service.proto' -}]).google.cloud.language.v1beta2); +extend(v1beta2Protos, gaxGrpc.loadProto( + path.join(__dirname, '..', 'protos', + 'google/cloud/language/v1beta2/language_service.proto') +).google.cloud.language.v1beta2); + module.exports = languageV1; module.exports.types = v1Protos; diff --git a/packages/google-cloud-language/src/v1/doc/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/doc_language_service.js index afc86db9e26..9982df7a0e1 100644 --- a/packages/google-cloud-language/src/v1/doc/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/doc_language_service.js @@ -134,6 +134,14 @@ var Sentence = { * * This object should have the same structure as [EntityMention]{@link EntityMention} * + * @property {Object} sentiment + * For calls to {@link AnalyzeEntitySentiment} or if + * {@link AnnotateTextRequest.Features.extract_entity_sentiment} is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * * @class * @see [google.cloud.language.v1.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ @@ -1235,7 +1243,37 @@ var DependencyEdge = { /** * Dislocated relation (for fronted/topicalized elements) */ - DISLOCATED: 76 + DISLOCATED: 76, + + /** + * Aspect marker + */ + ASP: 77, + + /** + * Genitive modifier + */ + GMOD: 78, + + /** + * Genitive object + */ + GOBJ: 79, + + /** + * Infinitival modifier + */ + INFMOD: 80, + + /** + * Measure + */ + MES: 81, + + /** + * Nominal complement of a noun + */ + NCOMP: 82 } }; @@ -1253,6 +1291,14 @@ var DependencyEdge = { * * The number should be among the values of [Type]{@link Type} * + * @property {Object} sentiment + * For calls to {@link AnalyzeEntitySentiment} or if + * {@link AnnotateTextRequest.Features.extract_entity_sentiment} is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * + * This object should have the same structure as [Sentiment]{@link Sentiment} + * * @class * @see [google.cloud.language.v1.EntityMention definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ @@ -1345,6 +1391,46 @@ var AnalyzeSentimentResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * The entity-level sentiment analysis request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @property {number} encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * + * @class + * @see [google.cloud.language.v1.AnalyzeEntitySentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnalyzeEntitySentimentRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The entity-level sentiment analysis response message. + * + * @property {Object[]} entities + * The recognized entities in the input document with associated sentiments. + * + * This object should have the same structure as [Entity]{@link Entity} + * + * @property {string} language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See {@link Document.language} field for more details. + * + * @class + * @see [google.cloud.language.v1.AnalyzeEntitySentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var AnalyzeEntitySentimentResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * The entity analysis request message. * @@ -1468,6 +1554,9 @@ var AnnotateTextRequest = { * @property {boolean} extractDocumentSentiment * Extract document-level sentiment. * + * @property {boolean} extractEntitySentiment + * Extract entities and their associated sentiment. + * * @class * @see [google.cloud.language.v1.AnnotateTextRequest.Features definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ diff --git a/packages/google-cloud-language/src/v1/index.js b/packages/google-cloud-language/src/v1/index.js index b4f2c574e4e..c7808106836 100644 --- a/packages/google-cloud-language/src/v1/index.js +++ b/packages/google-cloud-language/src/v1/index.js @@ -27,8 +27,8 @@ function v1(options) { return languageServiceClient(gaxGrpc); } -v1.GAPIC_VERSION = '0.7.1'; +v1.GAPIC_VERSION = '0.0.5'; v1.SERVICE_ADDRESS = languageServiceClient.SERVICE_ADDRESS; v1.ALL_SCOPES = languageServiceClient.ALL_SCOPES; -module.exports = v1; +module.exports = v1; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index faecdc5160f..4e59b4a86e2 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -30,12 +30,14 @@ var configData = require('./language_service_client_config'); var extend = require('extend'); var gax = require('google-gax'); +var googleProtoFiles = require('google-proto-files'); +var path = require('path'); var SERVICE_ADDRESS = 'language.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; +var CODE_GEN_NAME_VERSION = 'gapic/0.0.5'; /** * The scopes needed to make gRPC calls to all of the methods defined in @@ -52,7 +54,7 @@ var ALL_SCOPES = [ * * @class */ -function LanguageServiceClient(gaxGrpc, grpcClients, opts) { +function LanguageServiceClient(gaxGrpc, loadedProtos, opts) { opts = extend({ servicePath: SERVICE_ADDRESS, port: DEFAULT_SERVICE_PORT, @@ -81,11 +83,12 @@ function LanguageServiceClient(gaxGrpc, grpcClients, opts) { this.auth = gaxGrpc.auth; var languageServiceStub = gaxGrpc.createStub( - grpcClients.google.cloud.language.v1.LanguageService, + loadedProtos.google.cloud.language.v1.LanguageService, opts); var languageServiceStubMethods = [ 'analyzeSentiment', 'analyzeEntities', + 'analyzeEntitySentiment', 'analyzeSyntax', 'annotateText' ]; @@ -178,7 +181,7 @@ LanguageServiceClient.prototype.analyzeSentiment = function(request, options, ca * Input document. * * This object should have the same structure as [Document]{@link Document} - * @param {number} request.encodingType + * @param {number=} request.encodingType * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link EncodingType} @@ -202,12 +205,7 @@ LanguageServiceClient.prototype.analyzeSentiment = function(request, options, ca * }); * * var document = {}; - * var encodingType = language.v1.types.EncodingType.NONE; - * var request = { - * document: document, - * encodingType: encodingType - * }; - * client.analyzeEntities(request).then(function(responses) { + * client.analyzeEntities({document: document}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) * }) @@ -227,6 +225,60 @@ LanguageServiceClient.prototype.analyzeEntities = function(request, options, cal return this._analyzeEntities(request, options, callback); }; +/** + * Finds entities, similar to {@link AnalyzeEntities} in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link AnalyzeEntitySentimentResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * var language = require('@google-cloud/language'); + * + * var client = language.v1({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.analyzeEntitySentiment({document: document}).then(function(responses) { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(function(err) { + * console.error(err); + * }); + */ +LanguageServiceClient.prototype.analyzeEntitySentiment = function(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + + return this._analyzeEntitySentiment(request, options, callback); +}; + /** * Analyzes the syntax of the text and provides sentence boundaries and * tokenization along with part of speech tags, dependency trees, and other @@ -238,7 +290,7 @@ LanguageServiceClient.prototype.analyzeEntities = function(request, options, cal * Input document. * * This object should have the same structure as [Document]{@link Document} - * @param {number} request.encodingType + * @param {number=} request.encodingType * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link EncodingType} @@ -262,12 +314,7 @@ LanguageServiceClient.prototype.analyzeEntities = function(request, options, cal * }); * * var document = {}; - * var encodingType = language.v1.types.EncodingType.NONE; - * var request = { - * document: document, - * encodingType: encodingType - * }; - * client.analyzeSyntax(request).then(function(responses) { + * client.analyzeSyntax({document: document}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) * }) @@ -301,7 +348,7 @@ LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callb * The enabled features. * * This object should have the same structure as [Features]{@link Features} - * @param {number} request.encodingType + * @param {number=} request.encodingType * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link EncodingType} @@ -326,11 +373,9 @@ LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callb * * var document = {}; * var features = {}; - * var encodingType = language.v1.types.EncodingType.NONE; * var request = { * document: document, - * features: features, - * encodingType: encodingType + * features: features * }; * client.annotateText(request).then(function(responses) { * var response = responses[0]; @@ -357,11 +402,9 @@ function LanguageServiceClientBuilder(gaxGrpc) { return new LanguageServiceClientBuilder(gaxGrpc); } - var languageServiceClient = gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/cloud/language/v1/language_service.proto' - }]); - extend(this, languageServiceClient.google.cloud.language.v1); + var languageServiceStubProtos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos', 'google/cloud/language/v1/language_service.proto')); + extend(this, languageServiceStubProtos.google.cloud.language.v1); /** @@ -379,10 +422,10 @@ function LanguageServiceClientBuilder(gaxGrpc) { * {@link gax.constructSettings} for the format. */ this.languageServiceClient = function(opts) { - return new LanguageServiceClient(gaxGrpc, languageServiceClient, opts); + return new LanguageServiceClient(gaxGrpc, languageServiceStubProtos, opts); }; extend(this.languageServiceClient, LanguageServiceClient); } module.exports = LanguageServiceClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1/language_service_client_config.json b/packages/google-cloud-language/src/v1/language_service_client_config.json index 202d5b0d427..7c00b67d111 100644 --- a/packages/google-cloud-language/src/v1/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1/language_service_client_config.json @@ -30,6 +30,11 @@ "retry_codes_name": "idempotent", "retry_params_name": "default" }, + "AnalyzeEntitySentiment": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, "AnalyzeSyntax": { "timeout_millis": 30000, "retry_codes_name": "idempotent", diff --git a/packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js index a340b2d45fd..472e10e8be7 100644 --- a/packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js +++ b/packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js @@ -1239,7 +1239,37 @@ var DependencyEdge = { /** * Dislocated relation (for fronted/topicalized elements) */ - DISLOCATED: 76 + DISLOCATED: 76, + + /** + * Aspect marker + */ + ASP: 77, + + /** + * Genitive modifier + */ + GMOD: 78, + + /** + * Genitive object + */ + GOBJ: 79, + + /** + * Infinitival modifier + */ + INFMOD: 80, + + /** + * Measure + */ + MES: 81, + + /** + * Nominal complement of a noun + */ + NCOMP: 82 } }; @@ -1312,6 +1342,23 @@ var TextSpan = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * Represents a category returned from the text classifier. + * + * @property {string} name + * The name of the category representing the document. + * + * @property {number} confidence + * The classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * + * @class + * @see [google.cloud.language.v1beta2.ClassificationCategory definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var ClassificationCategory = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * The sentiment analysis request message. * @@ -1483,6 +1530,36 @@ var AnalyzeSyntaxResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * The document classification request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * + * @class + * @see [google.cloud.language.v1beta2.ClassifyTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var ClassifyTextRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The document classification response message. + * + * @property {Object[]} categories + * Categories representing the input document. + * + * This object should have the same structure as [ClassificationCategory]{@link ClassificationCategory} + * + * @class + * @see [google.cloud.language.v1beta2.ClassifyTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} + */ +var ClassifyTextResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * The request message for the text annotation API, which can perform multiple * analysis types (sentiment, entities, and syntax) in one call. @@ -1524,6 +1601,9 @@ var AnnotateTextRequest = { * @property {boolean} extractEntitySentiment * Extract entities and their associated sentiment. * + * @property {boolean} classifyText + * Classify the full document into categories. + * * @class * @see [google.cloud.language.v1beta2.AnnotateTextRequest.Features definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ @@ -1566,6 +1646,11 @@ var AnnotateTextRequest = { * in the request or, if not specified, the automatically-detected language. * See {@link Document.language} field for more details. * + * @property {Object[]} categories + * Categories identified in the input document. + * + * This object should have the same structure as [ClassificationCategory]{@link ClassificationCategory} + * * @class * @see [google.cloud.language.v1beta2.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ diff --git a/packages/google-cloud-language/src/v1beta2/index.js b/packages/google-cloud-language/src/v1beta2/index.js index f65984ac290..eabebb8f311 100644 --- a/packages/google-cloud-language/src/v1beta2/index.js +++ b/packages/google-cloud-language/src/v1beta2/index.js @@ -27,8 +27,8 @@ function v1beta2(options) { return languageServiceClient(gaxGrpc); } -v1beta2.GAPIC_VERSION = '0.7.1'; +v1beta2.GAPIC_VERSION = '0.0.5'; v1beta2.SERVICE_ADDRESS = languageServiceClient.SERVICE_ADDRESS; v1beta2.ALL_SCOPES = languageServiceClient.ALL_SCOPES; -module.exports = v1beta2; +module.exports = v1beta2; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 985c526f05f..6c9e1d52537 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -30,12 +30,14 @@ var configData = require('./language_service_client_config'); var extend = require('extend'); var gax = require('google-gax'); +var googleProtoFiles = require('google-proto-files'); +var path = require('path'); var SERVICE_ADDRESS = 'language.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; +var CODE_GEN_NAME_VERSION = 'gapic/0.0.5'; /** * The scopes needed to make gRPC calls to all of the methods defined in @@ -52,7 +54,7 @@ var ALL_SCOPES = [ * * @class */ -function LanguageServiceClient(gaxGrpc, grpcClients, opts) { +function LanguageServiceClient(gaxGrpc, loadedProtos, opts) { opts = extend({ servicePath: SERVICE_ADDRESS, port: DEFAULT_SERVICE_PORT, @@ -81,13 +83,14 @@ function LanguageServiceClient(gaxGrpc, grpcClients, opts) { this.auth = gaxGrpc.auth; var languageServiceStub = gaxGrpc.createStub( - grpcClients.google.cloud.language.v1beta2.LanguageService, + loadedProtos.google.cloud.language.v1beta2.LanguageService, opts); var languageServiceStubMethods = [ 'analyzeSentiment', 'analyzeEntities', 'analyzeEntitySentiment', 'analyzeSyntax', + 'classifyText', 'annotateText' ]; languageServiceStubMethods.forEach(function(methodName) { @@ -180,7 +183,7 @@ LanguageServiceClient.prototype.analyzeSentiment = function(request, options, ca * Input document. * * This object should have the same structure as [Document]{@link Document} - * @param {number} request.encodingType + * @param {number=} request.encodingType * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link EncodingType} @@ -204,12 +207,7 @@ LanguageServiceClient.prototype.analyzeSentiment = function(request, options, ca * }); * * var document = {}; - * var encodingType = language.v1beta2.types.EncodingType.NONE; - * var request = { - * document: document, - * encodingType: encodingType - * }; - * client.analyzeEntities(request).then(function(responses) { + * client.analyzeEntities({document: document}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) * }) @@ -239,7 +237,7 @@ LanguageServiceClient.prototype.analyzeEntities = function(request, options, cal * Input document. * * This object should have the same structure as [Document]{@link Document} - * @param {number} request.encodingType + * @param {number=} request.encodingType * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link EncodingType} @@ -263,12 +261,7 @@ LanguageServiceClient.prototype.analyzeEntities = function(request, options, cal * }); * * var document = {}; - * var encodingType = language.v1beta2.types.EncodingType.NONE; - * var request = { - * document: document, - * encodingType: encodingType - * }; - * client.analyzeEntitySentiment(request).then(function(responses) { + * client.analyzeEntitySentiment({document: document}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) * }) @@ -299,7 +292,7 @@ LanguageServiceClient.prototype.analyzeEntitySentiment = function(request, optio * Input document. * * This object should have the same structure as [Document]{@link Document} - * @param {number} request.encodingType + * @param {number=} request.encodingType * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link EncodingType} @@ -323,12 +316,7 @@ LanguageServiceClient.prototype.analyzeEntitySentiment = function(request, optio * }); * * var document = {}; - * var encodingType = language.v1beta2.types.EncodingType.NONE; - * var request = { - * document: document, - * encodingType: encodingType - * }; - * client.analyzeSyntax(request).then(function(responses) { + * client.analyzeSyntax({document: document}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) * }) @@ -349,8 +337,57 @@ LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callb }; /** - * A convenience method that provides all syntax, sentiment, and entity - * features in one call. + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link Document} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [ClassifyTextResponse]{@link ClassifyTextResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link ClassifyTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * var language = require('@google-cloud/language'); + * + * var client = language.v1beta2({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.classifyText({document: document}).then(function(responses) { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(function(err) { + * console.error(err); + * }); + */ +LanguageServiceClient.prototype.classifyText = function(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + + return this._classifyText(request, options, callback); +}; + +/** + * A convenience method that provides all syntax, sentiment, entity, and + * classification features in one call. * * @param {Object} request * The request object that will be sent. @@ -362,7 +399,7 @@ LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callb * The enabled features. * * This object should have the same structure as [Features]{@link Features} - * @param {number} request.encodingType + * @param {number=} request.encodingType * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link EncodingType} @@ -387,11 +424,9 @@ LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callb * * var document = {}; * var features = {}; - * var encodingType = language.v1beta2.types.EncodingType.NONE; * var request = { * document: document, - * features: features, - * encodingType: encodingType + * features: features * }; * client.annotateText(request).then(function(responses) { * var response = responses[0]; @@ -418,11 +453,9 @@ function LanguageServiceClientBuilder(gaxGrpc) { return new LanguageServiceClientBuilder(gaxGrpc); } - var languageServiceClient = gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/cloud/language/v1beta2/language_service.proto' - }]); - extend(this, languageServiceClient.google.cloud.language.v1beta2); + var languageServiceStubProtos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos', 'google/cloud/language/v1beta2/language_service.proto')); + extend(this, languageServiceStubProtos.google.cloud.language.v1beta2); /** @@ -440,10 +473,10 @@ function LanguageServiceClientBuilder(gaxGrpc) { * {@link gax.constructSettings} for the format. */ this.languageServiceClient = function(opts) { - return new LanguageServiceClient(gaxGrpc, languageServiceClient, opts); + return new LanguageServiceClient(gaxGrpc, languageServiceStubProtos, opts); }; extend(this.languageServiceClient, LanguageServiceClient); } module.exports = LanguageServiceClientBuilder; module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json index 8018f8a7bbf..100eba5ffde 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json @@ -40,6 +40,11 @@ "retry_codes_name": "idempotent", "retry_params_name": "default" }, + "ClassifyText": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, "AnnotateText": { "timeout_millis": 30000, "retry_codes_name": "idempotent", diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js index dd541d37017..268e21d2fd5 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -16,7 +16,7 @@ 'use strict'; var assert = require('assert'); -var languageV1 = require('../src/v1')(); +var language = require('../src'); var FAKE_STATUS_CODE = 1; var error = new Error(); @@ -25,7 +25,8 @@ error.code = FAKE_STATUS_CODE; describe('LanguageServiceClient', function() { describe('analyzeSentiment', function() { it('invokes analyzeSentiment without error', function(done) { - var client = languageV1.languageServiceClient(); + var client = language.v1(); + // Mock request var document = {}; var request = { @@ -33,9 +34,9 @@ describe('LanguageServiceClient', function() { }; // Mock response - var language = 'language-1613589672'; + var language_ = 'language-1613589672'; var expectedResponse = { - language : language + language : language_ }; // Mock Grpc layer @@ -49,7 +50,8 @@ describe('LanguageServiceClient', function() { }); it('invokes analyzeSentiment with error', function(done) { - var client = languageV1.languageServiceClient(); + var client = language.v1(); + // Mock request var document = {}; var request = { @@ -69,19 +71,18 @@ describe('LanguageServiceClient', function() { describe('analyzeEntities', function() { it('invokes analyzeEntities without error', function(done) { - var client = languageV1.languageServiceClient(); + var client = language.v1(); + // Mock request var document = {}; - var encodingType = languageV1.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock response - var language = 'language-1613589672'; + var language_ = 'language-1613589672'; var expectedResponse = { - language : language + language : language_ }; // Mock Grpc layer @@ -95,13 +96,12 @@ describe('LanguageServiceClient', function() { }); it('invokes analyzeEntities with error', function(done) { - var client = languageV1.languageServiceClient(); + var client = language.v1(); + // Mock request var document = {}; - var encodingType = languageV1.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock Grpc layer @@ -115,21 +115,66 @@ describe('LanguageServiceClient', function() { }); }); + describe('analyzeEntitySentiment', function() { + it('invokes analyzeEntitySentiment without error', function(done) { + var client = language.v1(); + + // Mock request + var document = {}; + var request = { + document : document + }; + + // Mock response + var language_ = 'language-1613589672'; + var expectedResponse = { + language : language_ + }; + + // Mock Grpc layer + client._analyzeEntitySentiment = mockSimpleGrpcMethod(request, expectedResponse); + + client.analyzeEntitySentiment(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes analyzeEntitySentiment with error', function(done) { + var client = language.v1(); + + // Mock request + var document = {}; + var request = { + document : document + }; + + // Mock Grpc layer + client._analyzeEntitySentiment = mockSimpleGrpcMethod(request, null, error); + + client.analyzeEntitySentiment(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('analyzeSyntax', function() { it('invokes analyzeSyntax without error', function(done) { - var client = languageV1.languageServiceClient(); + var client = language.v1(); + // Mock request var document = {}; - var encodingType = languageV1.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock response - var language = 'language-1613589672'; + var language_ = 'language-1613589672'; var expectedResponse = { - language : language + language : language_ }; // Mock Grpc layer @@ -143,13 +188,12 @@ describe('LanguageServiceClient', function() { }); it('invokes analyzeSyntax with error', function(done) { - var client = languageV1.languageServiceClient(); + var client = language.v1(); + // Mock request var document = {}; - var encodingType = languageV1.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock Grpc layer @@ -165,21 +209,20 @@ describe('LanguageServiceClient', function() { describe('annotateText', function() { it('invokes annotateText without error', function(done) { - var client = languageV1.languageServiceClient(); + var client = language.v1(); + // Mock request var document = {}; var features = {}; - var encodingType = languageV1.EncodingType.NONE; var request = { document : document, - features : features, - encodingType : encodingType + features : features }; // Mock response - var language = 'language-1613589672'; + var language_ = 'language-1613589672'; var expectedResponse = { - language : language + language : language_ }; // Mock Grpc layer @@ -193,15 +236,14 @@ describe('LanguageServiceClient', function() { }); it('invokes annotateText with error', function(done) { - var client = languageV1.languageServiceClient(); + var client = language.v1(); + // Mock request var document = {}; var features = {}; - var encodingType = languageV1.EncodingType.NONE; var request = { document : document, - features : features, - encodingType : encodingType + features : features }; // Mock Grpc layer diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-v1beta2.js index 8c2c944563f..6614ae65865 100644 --- a/packages/google-cloud-language/test/gapic-v1beta2.js +++ b/packages/google-cloud-language/test/gapic-v1beta2.js @@ -16,7 +16,7 @@ 'use strict'; var assert = require('assert'); -var languageV1beta2 = require('../src/v1beta2')(); +var language = require('../src'); var FAKE_STATUS_CODE = 1; var error = new Error(); @@ -25,7 +25,8 @@ error.code = FAKE_STATUS_CODE; describe('LanguageServiceClient', function() { describe('analyzeSentiment', function() { it('invokes analyzeSentiment without error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; var request = { @@ -33,9 +34,9 @@ describe('LanguageServiceClient', function() { }; // Mock response - var language = 'language-1613589672'; + var language_ = 'language-1613589672'; var expectedResponse = { - language : language + language : language_ }; // Mock Grpc layer @@ -49,7 +50,8 @@ describe('LanguageServiceClient', function() { }); it('invokes analyzeSentiment with error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; var request = { @@ -69,19 +71,18 @@ describe('LanguageServiceClient', function() { describe('analyzeEntities', function() { it('invokes analyzeEntities without error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; - var encodingType = languageV1beta2.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock response - var language = 'language-1613589672'; + var language_ = 'language-1613589672'; var expectedResponse = { - language : language + language : language_ }; // Mock Grpc layer @@ -95,13 +96,12 @@ describe('LanguageServiceClient', function() { }); it('invokes analyzeEntities with error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; - var encodingType = languageV1beta2.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock Grpc layer @@ -117,19 +117,18 @@ describe('LanguageServiceClient', function() { describe('analyzeEntitySentiment', function() { it('invokes analyzeEntitySentiment without error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; - var encodingType = languageV1beta2.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock response - var language = 'language-1613589672'; + var language_ = 'language-1613589672'; var expectedResponse = { - language : language + language : language_ }; // Mock Grpc layer @@ -143,13 +142,12 @@ describe('LanguageServiceClient', function() { }); it('invokes analyzeEntitySentiment with error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; - var encodingType = languageV1beta2.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock Grpc layer @@ -165,19 +163,18 @@ describe('LanguageServiceClient', function() { describe('analyzeSyntax', function() { it('invokes analyzeSyntax without error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; - var encodingType = languageV1beta2.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock response - var language = 'language-1613589672'; + var language_ = 'language-1613589672'; var expectedResponse = { - language : language + language : language_ }; // Mock Grpc layer @@ -191,13 +188,12 @@ describe('LanguageServiceClient', function() { }); it('invokes analyzeSyntax with error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; - var encodingType = languageV1beta2.EncodingType.NONE; var request = { - document : document, - encodingType : encodingType + document : document }; // Mock Grpc layer @@ -211,23 +207,65 @@ describe('LanguageServiceClient', function() { }); }); + describe('classifyText', function() { + it('invokes classifyText without error', function(done) { + var client = language.v1beta2(); + + // Mock request + var document = {}; + var request = { + document : document + }; + + // Mock response + var expectedResponse = {}; + + // Mock Grpc layer + client._classifyText = mockSimpleGrpcMethod(request, expectedResponse); + + client.classifyText(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes classifyText with error', function(done) { + var client = language.v1beta2(); + + // Mock request + var document = {}; + var request = { + document : document + }; + + // Mock Grpc layer + client._classifyText = mockSimpleGrpcMethod(request, null, error); + + client.classifyText(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('annotateText', function() { it('invokes annotateText without error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; var features = {}; - var encodingType = languageV1beta2.EncodingType.NONE; var request = { document : document, - features : features, - encodingType : encodingType + features : features }; // Mock response - var language = 'language-1613589672'; + var language_ = 'language-1613589672'; var expectedResponse = { - language : language + language : language_ }; // Mock Grpc layer @@ -241,15 +279,14 @@ describe('LanguageServiceClient', function() { }); it('invokes annotateText with error', function(done) { - var client = languageV1beta2.languageServiceClient(); + var client = language.v1beta2(); + // Mock request var document = {}; var features = {}; - var encodingType = languageV1beta2.EncodingType.NONE; var request = { document : document, - features : features, - encodingType : encodingType + features : features }; // Mock Grpc layer From a0dd1b51085fe442ffb18c204ba743d4304eeb12 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 18 Sep 2017 18:22:31 -0400 Subject: [PATCH 100/488] language @ 0.12.0 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 9225cbcb951..dcea920cbd7 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "repository": "GoogleCloudPlatform/google-cloud-node", "name": "@google-cloud/language", - "version": "0.11.0", + "version": "0.12.0", "author": "Google Inc", "description": "Google Cloud Natural Language API client for Node.js", "contributors": [ From 9c7a14914ee056872504d3076e0bea58e6880aa3 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 18 Sep 2017 21:16:29 -0400 Subject: [PATCH 101/488] language|video-intelligence: add protos to package.json --- packages/google-cloud-language/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index dcea920cbd7..ef17218aaee 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -32,6 +32,7 @@ ], "main": "src/index.js", "files": [ + "protos", "src", "AUTHORS", "LICENSE" From 046c2d0cc8396b940a3f862798562ec936f0cb82 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 18 Sep 2017 21:16:52 -0400 Subject: [PATCH 102/488] language @ 0.12.1 tagged. --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index ef17218aaee..5734a92bec7 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "repository": "GoogleCloudPlatform/google-cloud-node", "name": "@google-cloud/language", - "version": "0.12.0", + "version": "0.12.1", "author": "Google Inc", "description": "Google Cloud Natural Language API client for Node.js", "contributors": [ From 701bf60c23f583502b1b62619613dcb45217e99f Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Tue, 19 Sep 2017 08:54:42 -0700 Subject: [PATCH 103/488] [NL] v1 and v1beta2 updates (#470) * Move entity-level sentiment samples to v1. * Add text classification. * Adds longer text to README. --- .../google-cloud-language/samples/README.md | 39 +++++++++++-------- .../samples/package.json | 2 +- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index f944f0cae28..f2d5d8db302 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -41,12 +41,14 @@ __Usage:__ `node analyze.v1.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. + entity-sentiment-text Detects sentiment of the entities in a string. + entity-sentiment-file Detects sentiment of the entities in a file in Google Cloud Storage. Options: --help Show help [boolean] @@ -58,6 +60,8 @@ Examples: node analyze.v1.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt node analyze.v1.js syntax-text "President Obama is speaking at the White House." node analyze.v1.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt + node analyze.v1.js entity-sentiment-text "President Obama is speaking at the White House." + node analyze.v1.js entity-sentiment-file my-bucket file.txt Detects sentiment of entities in gs://my-bucket/file.txt For more information, see https://cloud.google.com/natural-language/docs ``` @@ -73,14 +77,14 @@ __Usage:__ `node analyze.v1beta2.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. - entity-sentiment-text Detects sentiment of the entities in a string. - entity-sentiment-file Detects sentiment of the entities 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. + classify-text Classifies text of a string. + classify-file Classifies text in a file in Google Cloud Storage. Options: --help Show help [boolean] @@ -92,9 +96,10 @@ Examples: node analyze.v1beta2.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt node analyze.v1beta2.js syntax-text "President Obama is speaking at the White House." node analyze.v1beta2.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt - node analyze.v1beta2.js entity-sentiment-text "President Obama is speaking at the White House." - node analyze.v1beta2.js entity-sentiment-file my-bucket Detects sentiment of entities in gs://my-bucket/file.txt - file.txt + node analyze.v1beta2.js classify-text "Currently the API requires 20 tokens in order \ + to return non-empty results. Let's use a longer piece of text for the sample in order to win." + node analyze.v1beta2.js classify-file my-bucket Detects syntax in gs://my-bucket/android_text.txt + android_text.txt For more information, see https://cloud.google.com/natural-language/docs ``` diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index f2a7e2061c8..87c1ac179fe 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -22,7 +22,7 @@ "test": "samples test run --cmd ava -- -T 20s --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/language": "0.11.0", + "@google-cloud/language": "0.12.1", "@google-cloud/storage": "1.2.1", "yargs": "8.0.2" }, From 5af4c4c10e49cc0f70aec46674efdb32b9747813 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Fri, 13 Oct 2017 09:32:24 -0700 Subject: [PATCH 104/488] Migrate to the nodejs-language repo. (#7) --- packages/google-cloud-language/.appveyor.yml | 23 + .../.circleci/config.yml | 221 +++++ .../.circleci/key.json.enc | Bin 0 -> 2368 bytes .../.cloud-repo-tools.json | 23 + packages/google-cloud-language/.eslintignore | 3 + packages/google-cloud-language/.eslintrc.yml | 13 + packages/google-cloud-language/.gitignore | 10 + packages/google-cloud-language/.jsdoc.js | 45 + packages/google-cloud-language/.mailmap | 4 + packages/google-cloud-language/.nycrc | 26 + .../google-cloud-language/.prettierignore | 3 + packages/google-cloud-language/.prettierrc | 8 + .../google-cloud-language/CODE_OF_CONDUCT.md | 43 + packages/google-cloud-language/CONTRIBUTORS | 20 + packages/google-cloud-language/LICENSE | 202 ++++ packages/google-cloud-language/README.md | 163 +++- packages/google-cloud-language/package.json | 92 +- .../samples/.eslintrc.yml | 3 + .../google-cloud-language/samples/README.md | 60 +- .../samples/package.json | 50 +- .../samples/quickstart.js | 15 +- .../smoke-test/language_service_smoke_test.js | 40 - packages/google-cloud-language/src/index.js | 206 ++-- .../language/v1}/doc_language_service.js | 237 +++-- .../google-cloud-language/src/v1/index.js | 47 +- .../src/v1/language_service_client.js | 810 ++++++++-------- .../language/v1beta2}/doc_language_service.js | 252 ++--- .../src/v1beta2/index.js | 47 +- .../src/v1beta2/language_service_client.js | 905 +++++++++--------- .../system-test/.eslintrc.yml | 6 + .../language_service_smoke_test.js | 40 + .../google-cloud-language/test/.eslintrc.yml | 5 + .../google-cloud-language/test/gapic-v1.js | 211 ++-- .../test/gapic-v1beta2.js | 241 +++-- 34 files changed, 2455 insertions(+), 1619 deletions(-) create mode 100644 packages/google-cloud-language/.appveyor.yml create mode 100644 packages/google-cloud-language/.circleci/config.yml create mode 100644 packages/google-cloud-language/.circleci/key.json.enc create mode 100644 packages/google-cloud-language/.cloud-repo-tools.json create mode 100644 packages/google-cloud-language/.eslintignore create mode 100644 packages/google-cloud-language/.eslintrc.yml create mode 100644 packages/google-cloud-language/.gitignore create mode 100644 packages/google-cloud-language/.jsdoc.js create mode 100644 packages/google-cloud-language/.mailmap create mode 100644 packages/google-cloud-language/.nycrc create mode 100644 packages/google-cloud-language/.prettierignore create mode 100644 packages/google-cloud-language/.prettierrc create mode 100644 packages/google-cloud-language/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-language/CONTRIBUTORS create mode 100644 packages/google-cloud-language/LICENSE create mode 100644 packages/google-cloud-language/samples/.eslintrc.yml delete mode 100644 packages/google-cloud-language/smoke-test/language_service_smoke_test.js rename packages/google-cloud-language/src/v1/doc/{ => google/cloud/language/v1}/doc_language_service.js (83%) rename packages/google-cloud-language/src/v1beta2/doc/{ => google/cloud/language/v1beta2}/doc_language_service.js (82%) create mode 100644 packages/google-cloud-language/system-test/.eslintrc.yml create mode 100644 packages/google-cloud-language/system-test/language_service_smoke_test.js create mode 100644 packages/google-cloud-language/test/.eslintrc.yml diff --git a/packages/google-cloud-language/.appveyor.yml b/packages/google-cloud-language/.appveyor.yml new file mode 100644 index 00000000000..babe1d587f4 --- /dev/null +++ b/packages/google-cloud-language/.appveyor.yml @@ -0,0 +1,23 @@ +environment: + matrix: + - nodejs_version: 4 + - nodejs_version: 6 + - nodejs_version: 7 + - nodejs_version: 8 + +install: + - ps: Install-Product node $env:nodejs_version + - npm install -g npm # Force using the latest npm to get dedupe during install + - set PATH=%APPDATA%\npm;%PATH% + - npm install --force --ignore-scripts + +test_script: + - node --version + - npm --version + - npm rebuild + - npm test + +build: off + +matrix: + fast_finish: true diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml new file mode 100644 index 00000000000..286149e73b1 --- /dev/null +++ b/packages/google-cloud-language/.circleci/config.yml @@ -0,0 +1,221 @@ +--- +# "Include" for unit tests definition. +unit_tests: &unit_tests + steps: + - checkout + - run: + name: Install modules and dependencies. + command: npm install + - run: + name: Run unit tests. + command: npm test + - run: + name: Submit coverage data to codecov. + command: node_modules/.bin/codecov + when: always + +version: 2.0 +workflows: + version: 2 + tests: + jobs: + - node4: + filters: + tags: + only: /.*/ + - node6: + filters: + tags: + only: /.*/ + - node7: + filters: + tags: + only: /.*/ + - node8: + filters: + tags: + only: /.*/ + - lint: + requires: + - node4 + - node6 + - node7 + - node8 + filters: + tags: + only: /.*/ + - docs: + requires: + - node4 + - node6 + - node7 + - node8 + filters: + tags: + only: /.*/ + - system_tests: + requires: + - lint + - docs + filters: + branches: + only: master + tags: + only: /^v[\d.]+$/ + - sample_tests: + requires: + - lint + - docs + filters: + branches: + only: master + tags: + only: /^v[\d.]+$/ + - publish_npm: + requires: + - system_tests + - sample_tests + filters: + branches: + ignore: /.*/ + tags: + only: /^v[\d.]+$/ + +jobs: + node4: + docker: + - image: node:4 + steps: + - checkout + - run: + name: Install modules and dependencies. + command: npm install --unsafe-perm + - run: + name: Run unit tests. + command: npm test + - run: + name: Submit coverage data to codecov. + command: node_modules/.bin/codecov + when: always + node6: + docker: + - image: node:6 + <<: *unit_tests + node7: + docker: + - image: node:7 + <<: *unit_tests + node8: + docker: + - image: node:8 + <<: *unit_tests + + lint: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Install modules and dependencies. + command: npm install + - run: + name: Link the module being tested to the samples. + command: | + cd samples/ + npm install + npm link @google-cloud/language + cd .. + - run: + name: Run linting. + command: npm run lint + + docs: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Install modules and dependencies. + command: npm install + - run: + name: Build documentation. + command: npm run docs + + sample_tests: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Decrypt credentials. + command: | + openssl aes-256-cbc -d -in .circleci/key.json.enc \ + -out .circleci/key.json \ + -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + - run: + name: Install and link the module. + command: | + npm install + npm link + - run: + name: Link the module being tested to the samples. + command: | + cd samples/ + npm install + npm link @google-cloud/language + cd .. + - run: + name: Run sample tests. + command: npm run samples-test + environment: + GCLOUD_PROJECT: long-door-651 + GOOGLE_APPLICATION_CREDENTIALS: /var/language/.circleci/key.json + - run: + name: Remove unencrypted key. + command: rm .circleci/key.json + when: always + working_directory: /var/language/ + + system_tests: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Decrypt credentials. + command: | + openssl aes-256-cbc -d -in .circleci/key.json.enc \ + -out .circleci/key.json \ + -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + - run: + name: Decrypt second account credentials (storage-specific). + command: | + openssl aes-256-cbc -d -in .circleci/no-whitelist-key.json.enc \ + -out .circleci/no-whitelist-key.json \ + -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + - run: + name: Install modules and dependencies. + command: npm install + - run: + name: Run system tests. + command: npm run system-test + environment: + GCN_STORAGE_2ND_PROJECT_ID: gcloud-node-whitelist-ci-tests + GCN_STORAGE_2ND_PROJECT_KEY: .circleci/no-whitelist-key.json + GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json + - run: + name: Remove unencrypted key. + command: rm .circleci/key.json + when: always + + publish_npm: + docker: + - image: node:8 + steps: + - checkout + - run: + name: Set NPM authentication. + command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + - run: + name: Publish the module to npm. + command: npm publish diff --git a/packages/google-cloud-language/.circleci/key.json.enc b/packages/google-cloud-language/.circleci/key.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..730ae94518c0c15819c83e8cf0f547eee2451167 GIT binary patch literal 2368 zcmV-G3BUGJVQh3|WM5y*ae(1-oWWBzr7s19Bs|M(Vg%#u^lkBw^mXu^+r(eIC;i6n zO0__xp@~tl4%V$>yQY-eL9Bx*`62ixv!C;2c*Etlm$iw}3@}3ff1pUXO#$yUKUg`o znxQGa9JBy*rUI>mxF&~^yNQ_*ngxVlBwb2L^{RKHCvdj;d#fLtQgIsVal-o-U%6=>vnP^=I7rE%Ar$syvYm z*>$uaCCx==J-FXupMa>7pIoG({bsCxyOXEm8jg8$m*}Zo*;26ppQiGbP4g=$1PJpG30}r#iGmq`$LEuZ2(+^=9t>e;_dyt2_zv}V# z!AKW*!nnbWq3bprLT_521zBlC3-))L{+Qh>Wfj=n*g{0SW4$K)n59;9c_UyW`|+Mn z2S}S0@&+WA8>EQl3+B;`e9ZPz!sGN)bYa_nkj2rfwZG(Ig9 z?uU--aeCH=@XGD4--!PU;=z;-RtrGO&qWIWEEkr|a3b}I4C%hGD|c^>^Tji4)RFi6 zhP9Rv*}0o46@Ry>NTs6tRMzRw|Jb&?8l)u#7F$F;St5*d3vNW;+DoIvxP-^kqkOp| z6n_MU5f&Zaya@IcXc*vckB#&u9JoD~b0YKfWz9h-r`HxcGAr`o5bC-t z16C7Si*(&ZqOh&FRw+jWM8$yMS%9R7pt}>yr{ooM(j{(Gq)T=IYrKb1iHwzYG0l2w zqrJ%eOY_N_Soo@$fb(J4iBcwBI$AJ-MXfWfxPm%$Eh|Fk7RE_f8><^E81h)B_Bl># zF)s}rS2}8^Z1|f+{t&>`ff}n9UT}r%Uc21;x?-1@zAf-nFXmEMgRaTx$U#_ke?2Qi zFsa5$$CjzYwpjU`g??F1qxWqAD>WL}B93TB_k%|?2;5Lvyky|Gxnrkc!#6%61?b>X zn5@OYbqsDm_>5%+-Xmsw0p*igHlzZtIff1OzX9n82uJqZ8-<@s`Xtmgi)bPj>5@%` zh&}#wUyx{-(p0t(m;f6W9j)Hm=#->CcOt7zYimbclULUbowDL=5W_!?pXg|6NND{) zM!+zAFN=-H)75Ci6F3wxcy z#A|;vgxZ|}PxLdW`B8RMo+>^i&p1s&2ac{d(V+ar<0_t9vV4fvo=~GqB@HmkXqlox zOG!OZVC`bW^-wVxPqqk2e)8KG=cGBh=B479)WW3FhU-~kg|j8v?}+M~4i7N>r+giQ z-~*|iH+7vCx4=Qk9bXBe@)V$H9rrRAg@@mxMcR0HPWifj4s1O5T7^;Vpcz~S&y@m< zOlL)Nw_lPA=gjiO|IEp%xaN9`JluhDOpwvo-%PC-{v9C+W#drk;|vunDsAd2P#Iv{ zl6LkGGc=XOGnB}X6kBt=OLdXUu}Y4Ao~c{x$BbEU8nX&lQ2k%3Y->O;91MJw@w!B% zWHTlH!r~7?OU3wgLp}q5fXtL7Or={Jy=z*iQA{;*=B(9Q9f=^|GDtP}Zm5HY)vea( z?ne%sQW4d~N$M7VHzV=g#1O&=!3r)urm5N{Fq`*!*Fi)Z9=U>bi8t{MxCi7J~A=qaW6smR4@(jlx(BhbBj3q42m&eZXZ=cf7HeuI6 zE}UR`336r{&0*2*Lm5xSh@hQ0rS9iemT0=E=51QoA*GXBHeda-Lp`Vn-1wPamIcY? z@N7i}wSv&3ZU}+Febl@~b$Ori%i;EFR;0J*q}!o}BiswB42o>yo!Jc;;rzQ-N-u-I zjSB^ac!@Ow+djzjdxLc>`b1Hk`Ehya#Z~zFhFeIT@riq-FQ-9k>Ydys3$o>_r4=?) z$GP_qL_pa5bmeL1zm*F~Lcm_MPhGW$EWJ4e4Q>Pk;+&O@&pY{xYPJ?{a{*| zhS`vAWNu0H!UhFMWlG7qB%V82_-(DbQ_v0r|L{DKjDA5Q>PG;4q<8O-SG%=$v^zUY zet+tUANOJMN(5RYVWDkelJ0yT$wT>#uakO74@x7zPFsZ zp>cpOUUaWP9s5UdjQTG$OPvX@+8B%MCI06ks#8cgIENS~PoTcGX$m_XR$$RmPZnU? z>KF)ahdnV6Grke(-dSY9=%->MBSVS*v9G8Y*-bz&ro^YfXZ%4>dx-hfvtK*n!M{D~UMOco*mS2jbqiLj1y9WdBSEDU;Ym2V=`9INe@g_*0axvgxb1FHzsU zS)9wKmCztFTF+-20aeGjX|fMlZlI|~u;=Ixm6Rec=((i%txB@U3sohhjD)i62gvVU m@8YEp(2E Jason Dobry +Luke Sneeringer Luke Sneeringer +Stephen Sawchuk Stephen Sawchuk +Stephen Sawchuk Stephen Sawchuk \ No newline at end of file diff --git a/packages/google-cloud-language/.nycrc b/packages/google-cloud-language/.nycrc new file mode 100644 index 00000000000..a1a8e6920ce --- /dev/null +++ b/packages/google-cloud-language/.nycrc @@ -0,0 +1,26 @@ +{ + "report-dir": "./.coverage", + "exclude": [ + "src/*{/*,/**/*}.js", + "src/*/v*/*.js", + "test/**/*.js" + ], + "watermarks": { + "branches": [ + 95, + 100 + ], + "functions": [ + 95, + 100 + ], + "lines": [ + 95, + 100 + ], + "statements": [ + 95, + 100 + ] + } +} diff --git a/packages/google-cloud-language/.prettierignore b/packages/google-cloud-language/.prettierignore new file mode 100644 index 00000000000..f6fac98b0a8 --- /dev/null +++ b/packages/google-cloud-language/.prettierignore @@ -0,0 +1,3 @@ +node_modules/* +samples/node_modules/* +src/**/doc/* diff --git a/packages/google-cloud-language/.prettierrc b/packages/google-cloud-language/.prettierrc new file mode 100644 index 00000000000..df6eac07446 --- /dev/null +++ b/packages/google-cloud-language/.prettierrc @@ -0,0 +1,8 @@ +--- +bracketSpacing: false +printWidth: 80 +semi: true +singleQuote: true +tabWidth: 2 +trailingComma: es5 +useTabs: false diff --git a/packages/google-cloud-language/CODE_OF_CONDUCT.md b/packages/google-cloud-language/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..46b2a08ea6d --- /dev/null +++ b/packages/google-cloud-language/CODE_OF_CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/packages/google-cloud-language/CONTRIBUTORS b/packages/google-cloud-language/CONTRIBUTORS new file mode 100644 index 00000000000..a3d8ca46557 --- /dev/null +++ b/packages/google-cloud-language/CONTRIBUTORS @@ -0,0 +1,20 @@ +# The names of individuals who have contributed to this project. +# +# Names are formatted as: +# name +# +Ace Nassri +Amy +Dave Gramlich +Eric Uldall +Ernest Landrito +Gus Class +Jason Dobry +Jerjou +Jun Mukai +Luke Sneeringer +Ricky Dunlop +Sawyer Hollenshead +Song Wang +Stephen Sawchuk +Tim Swast diff --git a/packages/google-cloud-language/LICENSE b/packages/google-cloud-language/LICENSE new file mode 100644 index 00000000000..7a4a3ea2424 --- /dev/null +++ b/packages/google-cloud-language/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 0a252c3876f..1956bddebc1 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -1,49 +1,130 @@ -# Node.js Client for Google Cloud Natural Language API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-node#versioning)) +Google Cloud Platform logo -[Google Cloud Natural Language API][Product Documentation]: Google Cloud Natural Language API provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, and text annotations. -- [Client Library Documentation][] -- [Product Documentation][] +# Google Cloud Natural Language API: Node.js Client -## Quick Start -In order to use this library, you first need to go through the following steps: +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-language.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-language) +[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-language?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-language) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-language/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-language) -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -2. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/api/language) -3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/master/guides/authentication) +> Node.js idiomatic client for [Natural Language API][product-docs]. -### Installation -``` -$ npm install --save @google-cloud/language -``` +[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. + +* [Natural Language API Node.js Client API Reference][client-docs] +* [Natural Language API Documentation][product-docs] + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. Select or create a Cloud Platform project. + + [Go to the projects page][projects] + +1. Enable billing for your project. + + [Enable billing][billing] + +1. Enable the Google Cloud Natural Language API API. + + [Enable the API][enable_api] + +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=language.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started + +### Installing the client library + + npm install --save @google-cloud/language -### Preview -#### LanguageServiceClient -```js - var language = require('@google-cloud/language'); - - var client = language({ - // optional auth parameters. - }); - - var content = 'Hello, world!'; - var type = language.v1.types.Document.Type.PLAIN_TEXT; - var document = { - content : content, - type : type - }; - client.analyzeSentiment({document: document}).then(function(responses) { - var response = responses[0]; - // doThingsWith(response) - }) - .catch(function(err) { - console.error(err); - }); +### Using the client library + +```javascript +// Imports the Google Cloud client library +const language = require('@google-cloud/language'); + +// Instantiates a client +const client = new language.LanguageServiceClient(); + +// The text to analyze +const text = 'Hello, world!'; + +const document = { + content: text, + type: 'PLAIN_TEXT', +}; + +// Detects the sentiment of the text +client + .analyzeSentiment({document: document}) + .then(results => { + const sentiment = results[0].documentSentiment; + + console.log(`Text: ${text}`); + console.log(`Sentiment score: ${sentiment.score}`); + console.log(`Sentiment magnitude: ${sentiment.magnitude}`); + }) + .catch(err => { + console.error('ERROR:', err); + }); ``` -### Next Steps -- Read the [Client Library Documentation][] for Google Cloud Natural Language API to see other available methods on the client. -- Read the [Google Cloud Natural Language API Product documentation][Product Documentation] to learn more about the product and see How-to Guides. -- View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/README.md) to see the full list of Cloud APIs that we cover. +## Samples + +Samples are in the [`samples/`](https://github.com/blob/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | +| Analyze v1beta2 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js) | + +The [Natural Language API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](.github/CONTRIBUTING.md). + +## License + +Apache Version 2.0 + +See [LICENSE](LICENSE) -[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/language -[Product Documentation]: https://cloud.google.com/language \ No newline at end of file +[client-docs]: https://cloud.google.com/nodejs/docs/reference/natural-language/latest/ +[product-docs]: https://cloud.google.com/natural-language/docs diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 5734a92bec7..fa90b79b970 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,40 +1,19 @@ { - "repository": "GoogleCloudPlatform/google-cloud-node", "name": "@google-cloud/language", + "description": "Google Cloud Natural Language API client for Node.js", "version": "0.12.1", + "license": "Apache-2.0", "author": "Google Inc", - "description": "Google Cloud Natural Language API client for Node.js", - "contributors": [ - { - "name": "Burcu Dogan", - "email": "jbd@google.com" - }, - { - "name": "Johan Euphrosine", - "email": "proppy@google.com" - }, - { - "name": "Patrick Costello", - "email": "pcostell@google.com" - }, - { - "name": "Ryan Seys", - "email": "ryan@ryanseys.com" - }, - { - "name": "Silvano Luciani", - "email": "silvano@google.com" - }, - { - "name": "Stephen Sawchuk", - "email": "sawchuk@gmail.com" - } - ], + "engines": { + "node": ">=4.0.0" + }, + "repository": "googleapis/nodejs-language", "main": "src/index.js", "files": [ "protos", "src", "AUTHORS", + "CONTRIBUTORS", "LICENSE" ], "keywords": [ @@ -50,20 +29,53 @@ "language", "Google Cloud Natural Language API" ], + "contributors": [ + "Ace Nassri ", + "Amy ", + "Dave Gramlich ", + "Eric Uldall ", + "Ernest Landrito ", + "Gus Class ", + "Jason Dobry ", + "Jerjou ", + "Jun Mukai ", + "Luke Sneeringer ", + "Ricky Dunlop ", + "Sawyer Hollenshead ", + "Song Wang ", + "Stephen Sawchuk ", + "Tim Swast " + ], + "scripts": { + "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", + "docs": "repo-tools exec -- jsdoc -c .jsdoc.js", + "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", + "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/", + "prettier": "repo-tools exec -- prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", + "samples-test": "cd samples/ && npm test && cd ../", + "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --timeout 5000", + "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", + "test": "repo-tools test run --cmd npm -- run cover" + }, "dependencies": { - "extend": "^3.0", - "google-gax": "^0.13.5" + "google-gax": "^0.14.1", + "lodash.merge": "^4.6.0" }, "devDependencies": { - "mocha": "^3.2.0" - }, - "scripts": { - "publish-module": "node ../../scripts/publish.js language", - "smoke-test": "mocha smoke-test/*.js --timeout 5000", - "test": "mocha test/*.js" - }, - "license": "Apache-2.0", - "engines": { - "node": ">=4.0.0" + "@google-cloud/nodejs-repo-tools": "^2.0.8", + "async": "^2.5.0", + "codecov": "^2.3.0", + "eslint": "^4.8.0", + "eslint-config-prettier": "^2.6.0", + "eslint-plugin-node": "^5.2.0", + "eslint-plugin-prettier": "^2.3.1", + "extend": "^3.0.1", + "ink-docstrap": "^1.3.0", + "intelli-espower-loader": "^1.0.1", + "jsdoc": "^3.5.5", + "mocha": "^3.5.3", + "nyc": "^11.2.1", + "power-assert": "^1.4.4", + "prettier": "^1.7.4" } } diff --git a/packages/google-cloud-language/samples/.eslintrc.yml b/packages/google-cloud-language/samples/.eslintrc.yml new file mode 100644 index 00000000000..282535f55f6 --- /dev/null +++ b/packages/google-cloud-language/samples/.eslintrc.yml @@ -0,0 +1,3 @@ +--- +rules: + no-console: off diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index f2d5d8db302..63aa1a1b253 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -1,41 +1,29 @@ Google Cloud Platform logo -# Google Cloud Natural Language API Node.js Samples +# Google Cloud Natural Language API: Node.js Samples -[![Build](https://storage.googleapis.com/cloud-docs-samples-badges/GoogleCloudPlatform/nodejs-docs-samples/nodejs-docs-samples-language.svg)]() +[![Build](https://storage.googleapis.com/.svg)]() [Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. ## Table of Contents -* [Setup](#setup) +* [Before you begin](#before-you-begin) * [Samples](#samples) * [Analyze v1](#analyze-v1) * [Analyze v1beta2](#analyze-v1beta2) - * [Slack Bot](#slack-bot) -* [Running the tests](#running-the-tests) -## Setup +## Before you begin -1. Read [Prerequisites][prereq] and [How to run a sample][run] first. -1. Install dependencies: - - With **npm**: - - npm install - - With **yarn**: - - yarn install - -[prereq]: ../README.md#prerequisites -[run]: ../README.md#how-to-run-a-sample +Before running the samples, make sure you've followed the steps in the +[Before you begin section](../README.md#before-you-begin) of the client +library's README. ## Samples ### Analyze v1 -View the [documentation][analyze-v1_0_docs] or the [source code][analyze-v1_0_code]. +View the [source code][analyze-v1_0_code]. __Usage:__ `node analyze.v1.js --help` @@ -51,7 +39,8 @@ Commands: entity-sentiment-file Detects sentiment of the entities in a file in Google Cloud Storage. Options: - --help Show help [boolean] + --version Show version number [boolean] + --help Show help [boolean] Examples: node analyze.v1.js sentiment-text "President Obama is speaking at the White House." @@ -71,7 +60,7 @@ For more information, see https://cloud.google.com/natural-language/docs ### Analyze v1beta2 -View the [documentation][analyze-v1beta2_1_docs] or the [source code][analyze-v1beta2_1_code]. +View the [source code][analyze-v1beta2_1_code]. __Usage:__ `node analyze.v1beta2.js --help` @@ -87,7 +76,8 @@ Commands: classify-file Classifies text in a file in Google Cloud Storage. Options: - --help Show help [boolean] + --version Show version number [boolean] + --help Show help [boolean] Examples: node analyze.v1beta2.js sentiment-text "President Obama is speaking at the White House." @@ -96,8 +86,7 @@ Examples: node analyze.v1beta2.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt node analyze.v1beta2.js syntax-text "President Obama is speaking at the White House." node analyze.v1beta2.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt - node analyze.v1beta2.js classify-text "Currently the API requires 20 tokens in order \ - to return non-empty results. Let's use a longer piece of text for the sample in order to win." + node analyze.v1beta2.js classify-text "Android is a mobile operating system developed by Google." node analyze.v1beta2.js classify-file my-bucket Detects syntax in gs://my-bucket/android_text.txt android_text.txt @@ -106,24 +95,3 @@ For more information, see https://cloud.google.com/natural-language/docs [analyze-v1beta2_1_docs]: https://cloud.google.com/natural-language/docs/ [analyze-v1beta2_1_code]: analyze.v1beta2.js - -### Slack Bot - - -View the [README](slackbot/README.md). - - - -## Running the tests - -1. Set the **GCLOUD_PROJECT** and **GOOGLE_APPLICATION_CREDENTIALS** environment variables. - -1. Run the tests: - - With **npm**: - - npm test - - With **yarn**: - - yarn test diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 87c1ac179fe..a31c84a5da8 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -1,61 +1,33 @@ { "name": "nodejs-docs-samples-language", "version": "0.0.1", - "private": true, "license": "Apache-2.0", "author": "Google Inc.", - "repository": { - "type": "git", - "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" - }, "engines": { "node": ">=4.3.2" }, + "repository": "googleapis/nodejs-language", + "private": true, "semistandard": { "ignore": [ "node_modules" ] }, "scripts": { - "lint": "samples lint", - "pretest": "npm run lint", - "test": "samples test run --cmd ava -- -T 20s --verbose system-test/*.test.js" + "ava": "ava -T 20s --verbose test/*.test.js ./system-test/*.test.js", + "cover": "nyc --reporter=lcov --cache ava -T 20s --verbose test/*.test.js ./system-test/*.test.js && nyc report", + "test": "repo-tools test run --cmd npm -- run cover" }, "dependencies": { "@google-cloud/language": "0.12.1", - "@google-cloud/storage": "1.2.1", - "yargs": "8.0.2" + "@google-cloud/storage": "1.4.0", + "yargs": "9.0.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.17", - "ava": "0.21.0", + "@google-cloud/nodejs-repo-tools": "2.0.8", + "ava": "0.22.0", "proxyquire": "1.8.0", - "sinon": "3.2.0" - }, - "cloud-repo-tools": { - "requiresKeyFile": true, - "requiresProjectId": true, - "product": "nl", - "samples": [ - { - "id": "analyze-v1", - "name": "Analyze v1", - "file": "analyze.v1.js", - "docs_link": "https://cloud.google.com/natural-language/docs/", - "usage": "node analyze.v1.js --help" - }, - { - "id": "analyze-v1beta2", - "name": "Analyze v1beta2", - "file": "analyze.v1beta2.js", - "docs_link": "https://cloud.google.com/natural-language/docs/", - "usage": "node analyze.v1beta2.js --help" - }, - { - "id": "slackbot", - "name": "Slack Bot", - "ref": "slackbot/README.md" - } - ] + "sinon": "4.0.1", + "uuid": "3.1.0" } } diff --git a/packages/google-cloud-language/samples/quickstart.js b/packages/google-cloud-language/samples/quickstart.js index afc74fe253b..b1b5683bb9f 100644 --- a/packages/google-cloud-language/samples/quickstart.js +++ b/packages/google-cloud-language/samples/quickstart.js @@ -17,29 +17,30 @@ // [START language_quickstart] // Imports the Google Cloud client library -const Language = require('@google-cloud/language'); +const language = require('@google-cloud/language'); // Instantiates a client -const language = Language(); +const client = new language.LanguageServiceClient(); // The text to analyze const text = 'Hello, world!'; const document = { - 'content': text, - type: 'PLAIN_TEXT' + content: text, + type: 'PLAIN_TEXT', }; // Detects the sentiment of the text -language.analyzeSentiment({'document': document}) - .then((results) => { +client + .analyzeSentiment({document: document}) + .then(results => { const sentiment = results[0].documentSentiment; console.log(`Text: ${text}`); console.log(`Sentiment score: ${sentiment.score}`); console.log(`Sentiment magnitude: ${sentiment.magnitude}`); }) - .catch((err) => { + .catch(err => { console.error('ERROR:', err); }); // [END language_quickstart] diff --git a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js deleted file mode 100644 index 1f38b3207a2..00000000000 --- a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use strict'; - -describe('LanguageServiceSmokeTest', function() { - - it('successfully makes a call to the service', function(done) { - var language = require('../src'); - - var client = language.v1({ - // optional auth parameters. - }); - - var content = 'Hello, world!'; - var type = language.v1.types.Document.Type.PLAIN_TEXT; - var document = { - content : content, - type : type - }; - client.analyzeSentiment({document: document}).then(function(responses) { - var response = responses[0]; - console.log(response); - }) - .then(done) - .catch(done); - }); -}); \ No newline at end of file diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 299b668726b..59999ca9520 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -1,138 +1,102 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @namespace google + */ +/** + * @namespace google.cloud + */ +/** + * @namespace google.cloud.language + */ +/** + * @namespace google.cloud.language.v1 + */ +/** + * @namespace google.cloud.language.v1beta2 */ - /*! - * @module language - * @name Language - */ 'use strict'; -var extend = require('extend'); -var gapic = { +// Import the clients for each version supported by this package. +const gapic = Object.freeze({ v1: require('./v1'), v1beta2: require('./v1beta2'), -}; -var gaxGrpc = require('google-gax').grpc(); -var path = require('path'); - -const VERSION = require('../package.json').version; +}); /** - * Create an languageServiceClient with additional helpers for common - * tasks. + * The `@google-cloud/language` package has the following named exports: * - * Provides text analysis operations such as sentiment analysis and entity - * recognition. + * - `LanguageServiceClient` - Reference to + * {@link v1.LanguageServiceClient} + * - `v1` - This is used for selecting or pinning a + * particular backend service version. It exports: + * - `LanguageServiceClient` - Reference to + * {@link v1.LanguageServiceClient} + * - `v1beta2` - This is used for selecting or pinning a + * particular backend service version. It exports: + * - `LanguageServiceClient` - Reference to + * {@link v1beta2.LanguageServiceClient} * - * @param {object=} options - [Configuration object](#/docs). - * @param {object=} options.credentials - Credentials object. - * @param {string=} options.credentials.client_email - * @param {string=} options.credentials.private_key - * @param {string=} options.email - Account email address. Required when using a - * .pem or .p12 keyFilename. - * @param {string=} options.keyFilename - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option above is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number=} options.port - The port on which to connect to - * the remote host. - * @param {string=} options.projectId - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {function=} options.promise - Custom promise module to use instead - * of native Promises. - * @param {string=} options.servicePath - The domain name of the - * API remote host. - */ -function languageV1(options) { - // Define the header options. - options = extend({}, options, { - libName: 'gccl', - libVersion: VERSION - }); - - // Create the client with the provided options. - var client = gapic.v1(options).languageServiceClient(options); - return client; -} - -var v1Protos = {}; - -extend(v1Protos, gaxGrpc.loadProto( - path.join(__dirname, '..', 'protos', - 'google/cloud/language/v1/language_service.proto') -).google.cloud.language.v1); - - -/** - * Create an languageServiceClient with additional helpers for common - * tasks. + * @module {object} @google-cloud/language + * @alias nodejs-language + * + * @example Install the client library with + * npm: + * npm install --save @google-cloud/language + * + * @example Import the client library: + * const language = require('@google-cloud/language'); + * + * @example Create a client that uses + * Application Default Credentials + * (ADC): + * let client = new language.LanguageServiceClient(); * - * Provides text analysis operations such as sentiment analysis and entity - * recognition. + * @example Create a client with + * explicit credentials: + * let client = new language.LanguageServiceClient({ + * projectId: 'your-project-id', + * keyFilename: '/path/to/keyfile.json', + * }); * - * @param {object=} options - [Configuration object](#/docs). - * @param {object=} options.credentials - Credentials object. - * @param {string=} options.credentials.client_email - * @param {string=} options.credentials.private_key - * @param {string=} options.email - Account email address. Required when using a - * .pem or .p12 keyFilename. - * @param {string=} options.keyFilename - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option above is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number=} options.port - The port on which to connect to - * the remote host. - * @param {string=} options.projectId - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {function=} options.promise - Custom promise module to use instead - * of native Promises. - * @param {string=} options.servicePath - The domain name of the - * API remote host. + * @example include:samples/quickstart.js + * region_tag:language_quickstart + * Full quickstart example: */ -function languageV1beta2(options) { - // Define the header options. - options = extend({}, options, { - libName: 'gccl', - libVersion: VERSION - }); - // Create the client with the provided options. - var client = gapic.v1beta2(options).languageServiceClient(options); - return client; -} - -var v1beta2Protos = {}; +/** + * @type {object} + * @property {constructor} LanguageServiceClient + * Reference to {@link v1.LanguageServiceClient} + */ +module.exports = gapic.v1; -extend(v1beta2Protos, gaxGrpc.loadProto( - path.join(__dirname, '..', 'protos', - 'google/cloud/language/v1beta2/language_service.proto') -).google.cloud.language.v1beta2); +/** + * @type {object} + * @property {constructor} LanguageServiceClient + * Reference to {@link v1.LanguageServiceClient} + */ +module.exports.v1 = gapic.v1; +/** + * @type {object} + * @property {constructor} LanguageServiceClient + * Reference to {@link v1beta2.LanguageServiceClient} + */ +module.exports.v1beta2 = gapic.v1beta2; -module.exports = languageV1; -module.exports.types = v1Protos; -module.exports.v1 = languageV1; -module.exports.v1.types = v1Protos; -module.exports.v1beta2 = languageV1beta2; -module.exports.v1beta2.types = v1beta2Protos; +// Alias `module.exports` as `module.exports.default`, for future-proofing. +module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-cloud-language/src/v1/doc/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js similarity index 83% rename from packages/google-cloud-language/src/v1/doc/doc_language_service.js rename to packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js index 9982df7a0e1..a28e27464b6 100644 --- a/packages/google-cloud-language/src/v1/doc/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js @@ -1,23 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** * ################################################################ # @@ -28,7 +24,7 @@ * Required. If the type is not set or is `TYPE_UNSPECIFIED`, * returns an `INVALID_ARGUMENT` error. * - * The number should be among the values of [Type]{@link Type} + * The number should be among the values of [Type]{@link google.cloud.language.v1.Type} * * @property {string} content * The content of the input in string format. @@ -49,7 +45,8 @@ * is not supported by the called API method, an `INVALID_ARGUMENT` error * is returned. * - * @class + * @typedef Document + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var Document = { @@ -59,6 +56,7 @@ var Document = { * The document types enum. * * @enum {number} + * @memberof google.cloud.language.v1 */ Type: { @@ -85,16 +83,17 @@ var Document = { * @property {Object} text * The sentence text. * - * This object should have the same structure as [TextSpan]{@link TextSpan} + * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1.TextSpan} * * @property {Object} sentiment - * For calls to {@link AnalyzeSentiment} or if - * {@link AnnotateTextRequest.Features.extract_document_sentiment} is set to + * For calls to AnalyzeSentiment or if + * AnnotateTextRequest.Features.extract_document_sentiment is set to * true, this field will contain the sentiment for the sentence. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * - * @class + * @typedef Sentence + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Sentence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var Sentence = { @@ -112,7 +111,7 @@ var Sentence = { * @property {number} type * The entity type. * - * The number should be among the values of [Type]{@link Type} + * The number should be among the values of [Type]{@link google.cloud.language.v1.Type} * * @property {Object.} metadata * Metadata associated with the entity. @@ -132,17 +131,18 @@ var Sentence = { * The mentions of this entity in the input document. The API currently * supports proper noun mentions. * - * This object should have the same structure as [EntityMention]{@link EntityMention} + * This object should have the same structure as [EntityMention]{@link google.cloud.language.v1.EntityMention} * * @property {Object} sentiment - * For calls to {@link AnalyzeEntitySentiment} or if - * {@link AnnotateTextRequest.Features.extract_entity_sentiment} is set to + * For calls to AnalyzeEntitySentiment or if + * AnnotateTextRequest.Features.extract_entity_sentiment is set to * true, this field will contain the aggregate sentiment expressed for this * entity in the provided document. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * - * @class + * @typedef Entity + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var Entity = { @@ -152,6 +152,7 @@ var Entity = { * The type of the entity. * * @enum {number} + * @memberof google.cloud.language.v1 */ Type: { @@ -203,22 +204,23 @@ var Entity = { * @property {Object} text * The token text. * - * This object should have the same structure as [TextSpan]{@link TextSpan} + * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1.TextSpan} * * @property {Object} partOfSpeech * Parts of speech tag for this token. * - * This object should have the same structure as [PartOfSpeech]{@link PartOfSpeech} + * This object should have the same structure as [PartOfSpeech]{@link google.cloud.language.v1.PartOfSpeech} * * @property {Object} dependencyEdge * Dependency tree parse for this token. * - * This object should have the same structure as [DependencyEdge]{@link DependencyEdge} + * This object should have the same structure as [DependencyEdge]{@link google.cloud.language.v1.DependencyEdge} * * @property {string} lemma * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. * - * @class + * @typedef Token + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Token definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var Token = { @@ -238,7 +240,8 @@ var Token = { * Sentiment score between -1.0 (negative sentiment) and 1.0 * (positive sentiment). * - * @class + * @typedef Sentiment + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Sentiment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var Sentiment = { @@ -253,64 +256,65 @@ var Sentiment = { * @property {number} tag * The part of speech tag. * - * The number should be among the values of [Tag]{@link Tag} + * The number should be among the values of [Tag]{@link google.cloud.language.v1.Tag} * * @property {number} aspect * The grammatical aspect. * - * The number should be among the values of [Aspect]{@link Aspect} + * The number should be among the values of [Aspect]{@link google.cloud.language.v1.Aspect} * * @property {number} case * The grammatical case. * - * The number should be among the values of [Case]{@link Case} + * The number should be among the values of [Case]{@link google.cloud.language.v1.Case} * * @property {number} form * The grammatical form. * - * The number should be among the values of [Form]{@link Form} + * The number should be among the values of [Form]{@link google.cloud.language.v1.Form} * * @property {number} gender * The grammatical gender. * - * The number should be among the values of [Gender]{@link Gender} + * The number should be among the values of [Gender]{@link google.cloud.language.v1.Gender} * * @property {number} mood * The grammatical mood. * - * The number should be among the values of [Mood]{@link Mood} + * The number should be among the values of [Mood]{@link google.cloud.language.v1.Mood} * * @property {number} number * The grammatical number. * - * The number should be among the values of [Number]{@link Number} + * The number should be among the values of [Number]{@link google.cloud.language.v1.Number} * * @property {number} person * The grammatical person. * - * The number should be among the values of [Person]{@link Person} + * The number should be among the values of [Person]{@link google.cloud.language.v1.Person} * * @property {number} proper * The grammatical properness. * - * The number should be among the values of [Proper]{@link Proper} + * The number should be among the values of [Proper]{@link google.cloud.language.v1.Proper} * * @property {number} reciprocity * The grammatical reciprocity. * - * The number should be among the values of [Reciprocity]{@link Reciprocity} + * The number should be among the values of [Reciprocity]{@link google.cloud.language.v1.Reciprocity} * * @property {number} tense * The grammatical tense. * - * The number should be among the values of [Tense]{@link Tense} + * The number should be among the values of [Tense]{@link google.cloud.language.v1.Tense} * * @property {number} voice * The grammatical voice. * - * The number should be among the values of [Voice]{@link Voice} + * The number should be among the values of [Voice]{@link google.cloud.language.v1.Voice} * - * @class + * @typedef PartOfSpeech + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.PartOfSpeech definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var PartOfSpeech = { @@ -320,6 +324,7 @@ var PartOfSpeech = { * The part of speech tags enum. * * @enum {number} + * @memberof google.cloud.language.v1 */ Tag: { @@ -398,6 +403,7 @@ var PartOfSpeech = { * The characteristic of a verb that expresses time flow during an event. * * @enum {number} + * @memberof google.cloud.language.v1 */ Aspect: { @@ -428,6 +434,7 @@ var PartOfSpeech = { * adjective and determiner, take case inflection in agreement with the noun. * * @enum {number} + * @memberof google.cloud.language.v1 */ Case: { @@ -514,6 +521,7 @@ var PartOfSpeech = { * forms of adjectives and participles * * @enum {number} + * @memberof google.cloud.language.v1 */ Form: { @@ -582,6 +590,7 @@ var PartOfSpeech = { * Gender classes of nouns reflected in the behaviour of associated words. * * @enum {number} + * @memberof google.cloud.language.v1 */ Gender: { @@ -610,6 +619,7 @@ var PartOfSpeech = { * The grammatical feature of verbs, used for showing modality and attitude. * * @enum {number} + * @memberof google.cloud.language.v1 */ Mood: { @@ -653,6 +663,7 @@ var PartOfSpeech = { * Count distinctions. * * @enum {number} + * @memberof google.cloud.language.v1 */ Number: { @@ -681,6 +692,7 @@ var PartOfSpeech = { * The distinction between the speaker, second person, third person, etc. * * @enum {number} + * @memberof google.cloud.language.v1 */ Person: { @@ -714,6 +726,7 @@ var PartOfSpeech = { * This category shows if the token is part of a proper name. * * @enum {number} + * @memberof google.cloud.language.v1 */ Proper: { @@ -737,6 +750,7 @@ var PartOfSpeech = { * Reciprocal features of a pronoun. * * @enum {number} + * @memberof google.cloud.language.v1 */ Reciprocity: { @@ -761,6 +775,7 @@ var PartOfSpeech = { * Time reference. * * @enum {number} + * @memberof google.cloud.language.v1 */ Tense: { @@ -805,6 +820,7 @@ var PartOfSpeech = { * participants identified by its arguments. * * @enum {number} + * @memberof google.cloud.language.v1 */ Voice: { @@ -845,9 +861,10 @@ var PartOfSpeech = { * @property {number} label * The parse label for the token. * - * The number should be among the values of [Label]{@link Label} + * The number should be among the values of [Label]{@link google.cloud.language.v1.Label} * - * @class + * @typedef DependencyEdge + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.DependencyEdge definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var DependencyEdge = { @@ -857,6 +874,7 @@ var DependencyEdge = { * The parse label enum for the token. * * @enum {number} + * @memberof google.cloud.language.v1 */ Label: { @@ -1284,22 +1302,23 @@ var DependencyEdge = { * @property {Object} text * The mention text. * - * This object should have the same structure as [TextSpan]{@link TextSpan} + * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1.TextSpan} * * @property {number} type * The type of the entity mention. * - * The number should be among the values of [Type]{@link Type} + * The number should be among the values of [Type]{@link google.cloud.language.v1.Type} * * @property {Object} sentiment - * For calls to {@link AnalyzeEntitySentiment} or if - * {@link AnnotateTextRequest.Features.extract_entity_sentiment} is set to + * For calls to AnalyzeEntitySentiment or if + * AnnotateTextRequest.Features.extract_entity_sentiment is set to * true, this field will contain the sentiment expressed for this mention of * the entity in the provided document. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * - * @class + * @typedef EntityMention + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.EntityMention definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var EntityMention = { @@ -1309,6 +1328,7 @@ var EntityMention = { * The supported types of mentions. * * @enum {number} + * @memberof google.cloud.language.v1 */ Type: { @@ -1337,9 +1357,10 @@ var EntityMention = { * * @property {number} beginOffset * The API calculates the beginning offset of the content in the original - * document according to the {@link EncodingType} specified in the API request. + * document according to the EncodingType specified in the API request. * - * @class + * @typedef TextSpan + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.TextSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var TextSpan = { @@ -1352,14 +1373,15 @@ var TextSpan = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} * * @property {number} encodingType * The encoding type used by the API to calculate sentence offsets. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * - * @class + * @typedef AnalyzeSentimentRequest + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeSentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnalyzeSentimentRequest = { @@ -1372,19 +1394,20 @@ var AnalyzeSentimentRequest = { * @property {Object} documentSentiment * The overall sentiment of the input document. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * * @property {Object[]} sentences * The sentiment for all the sentences in the document. * - * This object should have the same structure as [Sentence]{@link Sentence} + * This object should have the same structure as [Sentence]{@link google.cloud.language.v1.Sentence} * - * @class + * @typedef AnalyzeSentimentResponse + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeSentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnalyzeSentimentResponse = { @@ -1397,14 +1420,15 @@ var AnalyzeSentimentResponse = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} * * @property {number} encodingType * The encoding type used by the API to calculate offsets. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * - * @class + * @typedef AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeEntitySentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnalyzeEntitySentimentRequest = { @@ -1417,14 +1441,15 @@ var AnalyzeEntitySentimentRequest = { * @property {Object[]} entities * The recognized entities in the input document with associated sentiments. * - * This object should have the same structure as [Entity]{@link Entity} + * This object should have the same structure as [Entity]{@link google.cloud.language.v1.Entity} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * - * @class + * @typedef AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeEntitySentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnalyzeEntitySentimentResponse = { @@ -1437,14 +1462,15 @@ var AnalyzeEntitySentimentResponse = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} * * @property {number} encodingType * The encoding type used by the API to calculate offsets. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * - * @class + * @typedef AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeEntitiesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnalyzeEntitiesRequest = { @@ -1457,14 +1483,15 @@ var AnalyzeEntitiesRequest = { * @property {Object[]} entities * The recognized entities in the input document. * - * This object should have the same structure as [Entity]{@link Entity} + * This object should have the same structure as [Entity]{@link google.cloud.language.v1.Entity} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * - * @class + * @typedef AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeEntitiesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnalyzeEntitiesResponse = { @@ -1477,14 +1504,15 @@ var AnalyzeEntitiesResponse = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} * * @property {number} encodingType * The encoding type used by the API to calculate offsets. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * - * @class + * @typedef AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeSyntaxRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnalyzeSyntaxRequest = { @@ -1497,19 +1525,20 @@ var AnalyzeSyntaxRequest = { * @property {Object[]} sentences * Sentences in the input document. * - * This object should have the same structure as [Sentence]{@link Sentence} + * This object should have the same structure as [Sentence]{@link google.cloud.language.v1.Sentence} * * @property {Object[]} tokens * Tokens, along with their syntactic information, in the input document. * - * This object should have the same structure as [Token]{@link Token} + * This object should have the same structure as [Token]{@link google.cloud.language.v1.Token} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * - * @class + * @typedef AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeSyntaxResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnalyzeSyntaxResponse = { @@ -1523,19 +1552,20 @@ var AnalyzeSyntaxResponse = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} * * @property {Object} features * The enabled features. * - * This object should have the same structure as [Features]{@link Features} + * This object should have the same structure as [Features]{@link google.cloud.language.v1.Features} * * @property {number} encodingType * The encoding type used by the API to calculate offsets. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * - * @class + * @typedef AnnotateTextRequest + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnnotateTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnnotateTextRequest = { @@ -1557,7 +1587,8 @@ var AnnotateTextRequest = { * @property {boolean} extractEntitySentiment * Extract entities and their associated sentiment. * - * @class + * @typedef Features + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnnotateTextRequest.Features definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ Features: { @@ -1570,36 +1601,37 @@ var AnnotateTextRequest = { * * @property {Object[]} sentences * Sentences in the input document. Populated if the user enables - * {@link AnnotateTextRequest.Features.extract_syntax}. + * AnnotateTextRequest.Features.extract_syntax. * - * This object should have the same structure as [Sentence]{@link Sentence} + * This object should have the same structure as [Sentence]{@link google.cloud.language.v1.Sentence} * * @property {Object[]} tokens * Tokens, along with their syntactic information, in the input document. * Populated if the user enables - * {@link AnnotateTextRequest.Features.extract_syntax}. + * AnnotateTextRequest.Features.extract_syntax. * - * This object should have the same structure as [Token]{@link Token} + * This object should have the same structure as [Token]{@link google.cloud.language.v1.Token} * * @property {Object[]} entities * Entities, along with their semantic information, in the input document. * Populated if the user enables - * {@link AnnotateTextRequest.Features.extract_entities}. + * AnnotateTextRequest.Features.extract_entities. * - * This object should have the same structure as [Entity]{@link Entity} + * This object should have the same structure as [Entity]{@link google.cloud.language.v1.Entity} * * @property {Object} documentSentiment * The overall sentiment for the document. Populated if the user enables - * {@link AnnotateTextRequest.Features.extract_document_sentiment}. + * AnnotateTextRequest.Features.extract_document_sentiment. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * - * @class + * @typedef AnnotateTextResponse + * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ var AnnotateTextResponse = { @@ -1614,6 +1646,7 @@ var AnnotateTextResponse = { * differently. * * @enum {number} + * @memberof google.cloud.language.v1 */ var EncodingType = { diff --git a/packages/google-cloud-language/src/v1/index.js b/packages/google-cloud-language/src/v1/index.js index c7808106836..4921903da71 100644 --- a/packages/google-cloud-language/src/v1/index.js +++ b/packages/google-cloud-language/src/v1/index.js @@ -1,34 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use strict'; - -var languageServiceClient = require('./language_service_client'); -var gax = require('google-gax'); -var extend = require('extend'); +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -function v1(options) { - options = extend({ - scopes: v1.ALL_SCOPES - }, options); - var gaxGrpc = gax.grpc(options); - return languageServiceClient(gaxGrpc); -} +'use strict'; -v1.GAPIC_VERSION = '0.0.5'; -v1.SERVICE_ADDRESS = languageServiceClient.SERVICE_ADDRESS; -v1.ALL_SCOPES = languageServiceClient.ALL_SCOPES; +const LanguageServiceClient = require('./language_service_client'); -module.exports = v1; \ No newline at end of file +module.exports.LanguageServiceClient = LanguageServiceClient; diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 4e59b4a86e2..aa5654e24c3 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -1,431 +1,459 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * EDITING INSTRUCTIONS - * This file was generated from the file - * https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto, - * and updates to that file get reflected here through a refresh process. - * For the short term, the refresh process will only be runnable by Google - * engineers. - * - * The only allowed edits are to method and file documentation. A 3-way - * merge preserves those additions if the generated source changes. - */ -/* TODO: introduce line-wrapping so that it never exceeds the limit. */ -/* jscs: disable maximumLineLength */ -'use strict'; - -var configData = require('./language_service_client_config'); -var extend = require('extend'); -var gax = require('google-gax'); -var googleProtoFiles = require('google-proto-files'); -var path = require('path'); +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -var SERVICE_ADDRESS = 'language.googleapis.com'; +'use strict'; -var DEFAULT_SERVICE_PORT = 443; +const gapicConfig = require('./language_service_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); -var CODE_GEN_NAME_VERSION = 'gapic/0.0.5'; - -/** - * The scopes needed to make gRPC calls to all of the methods defined in - * this service. - */ -var ALL_SCOPES = [ - 'https://www.googleapis.com/auth/cloud-platform' -]; +const VERSION = require('../../package.json').version; /** * Provides text analysis operations such as sentiment analysis and entity * recognition. * - * * @class + * @memberof v1 */ -function LanguageServiceClient(gaxGrpc, loadedProtos, opts) { - opts = extend({ - servicePath: SERVICE_ADDRESS, - port: DEFAULT_SERVICE_PORT, - clientConfig: {} - }, opts); +class LanguageServiceClient { + /** + * Construct an instance of LanguageServiceClient. + * + * @param {object=} options - The configuration object. See the subsequent + * parameters for more details. + * @param {object=} options.credentials - Credentials object. + * @param {string=} options.credentials.client_email + * @param {string=} options.credentials.private_key + * @param {string=} options.email - Account email address. Required when + * usaing a .pem or .p12 keyFilename. + * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option above is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number=} options.port - The port on which to connect to + * the remote host. + * @param {string=} options.projectId - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function=} options.promise - Custom promise module to use instead + * of native Promises. + * @param {string=} options.servicePath - The domain name of the + * API remote host. + */ + constructor(opts) { + this._descriptors = {}; - var googleApiClient = [ - 'gl-node/' + process.versions.node - ]; - if (opts.libName && opts.libVersion) { - googleApiClient.push(opts.libName + '/' + opts.libVersion); - } - googleApiClient.push( - CODE_GEN_NAME_VERSION, - 'gax/' + gax.version, - 'grpc/' + gaxGrpc.grpcVersion - ); + // Ensure that options include the service address and port. + opts = Object.assign( + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts + ); - var defaults = gaxGrpc.constructSettings( - 'google.cloud.language.v1.LanguageService', - configData, - opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')}); + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = this.constructor.scopes; + var gaxGrpc = gax.grpc(opts); - var self = this; + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth; - this.auth = gaxGrpc.auth; - var languageServiceStub = gaxGrpc.createStub( - loadedProtos.google.cloud.language.v1.LanguageService, - opts); - var languageServiceStubMethods = [ - 'analyzeSentiment', - 'analyzeEntities', - 'analyzeEntitySentiment', - 'analyzeSyntax', - 'annotateText' - ]; - languageServiceStubMethods.forEach(function(methodName) { - self['_' + methodName] = gax.createApiCall( - languageServiceStub.then(function(languageServiceStub) { - return function() { - var args = Array.prototype.slice.call(arguments, 0); - return languageServiceStub[methodName].apply(languageServiceStub, args); - }; - }), - defaults[methodName], - null); - }); -} + // Determine the client header string. + var clientHeader = [ + `gl-node/${process.version.node}`, + `grpc/${gaxGrpc.grpcVersion}`, + `gax/${gax.version}`, + `gapic/${VERSION}`, + ]; + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + var protos = merge( + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/cloud/language/v1/language_service.proto' + ) + ); -/** - * Get the project ID used by this class. - * @param {function(Error, string)} callback - the callback to be called with - * the current project Id. - */ -LanguageServiceClient.prototype.getProjectId = function(callback) { - return this.auth.getProjectId(callback); -}; - -// Service calls + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.cloud.language.v1.LanguageService', + gapicConfig, + opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')} + ); -/** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate sentence offsets. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1({ - * // optional auth parameters. - * }); - * - * var document = {}; - * client.analyzeSentiment({document: document}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.analyzeSentiment = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; - } + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; - return this._analyzeSentiment(request, options, callback); -}; + // Put together the "service stub" for + // google.cloud.language.v1.LanguageService. + var languageServiceStub = gaxGrpc.createStub( + protos.google.cloud.language.v1.LanguageService, + opts + ); -/** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1({ - * // optional auth parameters. - * }); - * - * var document = {}; - * client.analyzeEntities({document: document}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.analyzeEntities = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var languageServiceStubMethods = [ + 'analyzeSentiment', + 'analyzeEntities', + 'analyzeEntitySentiment', + 'analyzeSyntax', + 'annotateText', + ]; + for (let methodName of languageServiceStubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + languageServiceStub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + null + ); + } } - if (options === undefined) { - options = {}; + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'language.googleapis.com'; } - return this._analyzeEntities(request, options, callback); -}; + /** + * The port for this API service. + */ + static get port() { + return 443; + } -/** - * Finds entities, similar to {@link AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link AnalyzeEntitySentimentResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1({ - * // optional auth parameters. - * }); - * - * var document = {}; - * client.analyzeEntitySentiment({document: document}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.analyzeEntitySentiment = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; } - if (options === undefined) { - options = {}; + + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId(callback) { + return this.auth.getProjectId(callback); } - return this._analyzeEntitySentiment(request, options, callback); -}; + // ------------------- + // -- Service calls -- + // ------------------- -/** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link AnalyzeSyntaxResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1({ - * // optional auth parameters. - * }); - * - * var document = {}; - * client.analyzeSyntax({document: document}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + /** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate sentence offsets. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.analyzeSentiment({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + analyzeSentiment(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.analyzeSentiment(request, options, callback); } - return this._analyzeSyntax(request, options, callback); -}; + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.analyzeEntities({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + analyzeEntities(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * A convenience method that provides all the features that analyzeSentiment, - * analyzeEntities, and analyzeSyntax provide in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {Object} request.features - * The enabled features. - * - * This object should have the same structure as [Features]{@link Features} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1({ - * // optional auth parameters. - * }); - * - * var document = {}; - * var features = {}; - * var request = { - * document: document, - * features: features - * }; - * client.annotateText(request).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.annotateText = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + return this._innerApiCalls.analyzeEntities(request, options, callback); } - return this._annotateText(request, options, callback); -}; + /** + * Finds entities, similar to AnalyzeEntities in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.analyzeEntitySentiment({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + analyzeEntitySentiment(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -function LanguageServiceClientBuilder(gaxGrpc) { - if (!(this instanceof LanguageServiceClientBuilder)) { - return new LanguageServiceClientBuilder(gaxGrpc); + return this._innerApiCalls.analyzeEntitySentiment( + request, + options, + callback + ); } - var languageServiceStubProtos = gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos', 'google/cloud/language/v1/language_service.proto')); - extend(this, languageServiceStubProtos.google.cloud.language.v1); + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.analyzeSyntax({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + analyzeSyntax(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + return this._innerApiCalls.analyzeSyntax(request, options, callback); + } /** - * Build a new instance of {@link LanguageServiceClient}. - * - * @param {Object=} opts - The optional parameters. - * @param {String=} opts.servicePath - * The domain name of the API remote host. - * @param {number=} opts.port - * The port on which to connect to the remote host. - * @param {grpc.ClientCredentials=} opts.sslCreds - * A ClientCredentials for use with an SSL-enabled channel. - * @param {Object=} opts.clientConfig - * The customized config to build the call settings. See - * {@link gax.constructSettings} for the format. + * A convenience method that provides all the features that analyzeSentiment, + * analyzeEntities, and analyzeSyntax provide in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} + * @param {Object} request.features + * The enabled features. + * + * This object should have the same structure as [Features]{@link google.cloud.language.v1.Features} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * var features = {}; + * var request = { + * document: document, + * features: features, + * }; + * client.annotateText(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); */ - this.languageServiceClient = function(opts) { - return new LanguageServiceClient(gaxGrpc, languageServiceStubProtos, opts); - }; - extend(this.languageServiceClient, LanguageServiceClient); + annotateText(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.annotateText(request, options, callback); + } } -module.exports = LanguageServiceClientBuilder; -module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file + +module.exports = LanguageServiceClient; diff --git a/packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js similarity index 82% rename from packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js rename to packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js index 472e10e8be7..944c2cbc2c1 100644 --- a/packages/google-cloud-language/src/v1beta2/doc/doc_language_service.js +++ b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js @@ -1,23 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. /** * ################################################################ # @@ -28,7 +24,7 @@ * Required. If the type is not set or is `TYPE_UNSPECIFIED`, * returns an `INVALID_ARGUMENT` error. * - * The number should be among the values of [Type]{@link Type} + * The number should be among the values of [Type]{@link google.cloud.language.v1beta2.Type} * * @property {string} content * The content of the input in string format. @@ -49,7 +45,8 @@ * is not supported by the called API method, an `INVALID_ARGUMENT` error * is returned. * - * @class + * @typedef Document + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var Document = { @@ -59,6 +56,7 @@ var Document = { * The document types enum. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Type: { @@ -85,16 +83,17 @@ var Document = { * @property {Object} text * The sentence text. * - * This object should have the same structure as [TextSpan]{@link TextSpan} + * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1beta2.TextSpan} * * @property {Object} sentiment - * For calls to {@link AnalyzeSentiment} or if - * {@link AnnotateTextRequest.Features.extract_document_sentiment} is set to + * For calls to AnalyzeSentiment or if + * AnnotateTextRequest.Features.extract_document_sentiment is set to * true, this field will contain the sentiment for the sentence. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * - * @class + * @typedef Sentence + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Sentence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var Sentence = { @@ -112,7 +111,7 @@ var Sentence = { * @property {number} type * The entity type. * - * The number should be among the values of [Type]{@link Type} + * The number should be among the values of [Type]{@link google.cloud.language.v1beta2.Type} * * @property {Object.} metadata * Metadata associated with the entity. @@ -132,17 +131,18 @@ var Sentence = { * The mentions of this entity in the input document. The API currently * supports proper noun mentions. * - * This object should have the same structure as [EntityMention]{@link EntityMention} + * This object should have the same structure as [EntityMention]{@link google.cloud.language.v1beta2.EntityMention} * * @property {Object} sentiment - * For calls to {@link AnalyzeEntitySentiment} or if - * {@link AnnotateTextRequest.Features.extract_entity_sentiment} is set to + * For calls to AnalyzeEntitySentiment or if + * AnnotateTextRequest.Features.extract_entity_sentiment is set to * true, this field will contain the aggregate sentiment expressed for this * entity in the provided document. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * - * @class + * @typedef Entity + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var Entity = { @@ -152,6 +152,7 @@ var Entity = { * The type of the entity. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Type: { @@ -203,22 +204,23 @@ var Entity = { * @property {Object} text * The token text. * - * This object should have the same structure as [TextSpan]{@link TextSpan} + * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1beta2.TextSpan} * * @property {Object} partOfSpeech * Parts of speech tag for this token. * - * This object should have the same structure as [PartOfSpeech]{@link PartOfSpeech} + * This object should have the same structure as [PartOfSpeech]{@link google.cloud.language.v1beta2.PartOfSpeech} * * @property {Object} dependencyEdge * Dependency tree parse for this token. * - * This object should have the same structure as [DependencyEdge]{@link DependencyEdge} + * This object should have the same structure as [DependencyEdge]{@link google.cloud.language.v1beta2.DependencyEdge} * * @property {string} lemma * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. * - * @class + * @typedef Token + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Token definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var Token = { @@ -238,7 +240,8 @@ var Token = { * Sentiment score between -1.0 (negative sentiment) and 1.0 * (positive sentiment). * - * @class + * @typedef Sentiment + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Sentiment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var Sentiment = { @@ -251,64 +254,65 @@ var Sentiment = { * @property {number} tag * The part of speech tag. * - * The number should be among the values of [Tag]{@link Tag} + * The number should be among the values of [Tag]{@link google.cloud.language.v1beta2.Tag} * * @property {number} aspect * The grammatical aspect. * - * The number should be among the values of [Aspect]{@link Aspect} + * The number should be among the values of [Aspect]{@link google.cloud.language.v1beta2.Aspect} * * @property {number} case * The grammatical case. * - * The number should be among the values of [Case]{@link Case} + * The number should be among the values of [Case]{@link google.cloud.language.v1beta2.Case} * * @property {number} form * The grammatical form. * - * The number should be among the values of [Form]{@link Form} + * The number should be among the values of [Form]{@link google.cloud.language.v1beta2.Form} * * @property {number} gender * The grammatical gender. * - * The number should be among the values of [Gender]{@link Gender} + * The number should be among the values of [Gender]{@link google.cloud.language.v1beta2.Gender} * * @property {number} mood * The grammatical mood. * - * The number should be among the values of [Mood]{@link Mood} + * The number should be among the values of [Mood]{@link google.cloud.language.v1beta2.Mood} * * @property {number} number * The grammatical number. * - * The number should be among the values of [Number]{@link Number} + * The number should be among the values of [Number]{@link google.cloud.language.v1beta2.Number} * * @property {number} person * The grammatical person. * - * The number should be among the values of [Person]{@link Person} + * The number should be among the values of [Person]{@link google.cloud.language.v1beta2.Person} * * @property {number} proper * The grammatical properness. * - * The number should be among the values of [Proper]{@link Proper} + * The number should be among the values of [Proper]{@link google.cloud.language.v1beta2.Proper} * * @property {number} reciprocity * The grammatical reciprocity. * - * The number should be among the values of [Reciprocity]{@link Reciprocity} + * The number should be among the values of [Reciprocity]{@link google.cloud.language.v1beta2.Reciprocity} * * @property {number} tense * The grammatical tense. * - * The number should be among the values of [Tense]{@link Tense} + * The number should be among the values of [Tense]{@link google.cloud.language.v1beta2.Tense} * * @property {number} voice * The grammatical voice. * - * The number should be among the values of [Voice]{@link Voice} + * The number should be among the values of [Voice]{@link google.cloud.language.v1beta2.Voice} * - * @class + * @typedef PartOfSpeech + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.PartOfSpeech definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var PartOfSpeech = { @@ -318,6 +322,7 @@ var PartOfSpeech = { * The part of speech tags enum. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Tag: { @@ -396,6 +401,7 @@ var PartOfSpeech = { * The characteristic of a verb that expresses time flow during an event. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Aspect: { @@ -426,6 +432,7 @@ var PartOfSpeech = { * adjective and determiner, take case inflection in agreement with the noun. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Case: { @@ -512,6 +519,7 @@ var PartOfSpeech = { * forms of adjectives and participles * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Form: { @@ -580,6 +588,7 @@ var PartOfSpeech = { * Gender classes of nouns reflected in the behaviour of associated words. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Gender: { @@ -608,6 +617,7 @@ var PartOfSpeech = { * The grammatical feature of verbs, used for showing modality and attitude. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Mood: { @@ -651,6 +661,7 @@ var PartOfSpeech = { * Count distinctions. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Number: { @@ -679,6 +690,7 @@ var PartOfSpeech = { * The distinction between the speaker, second person, third person, etc. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Person: { @@ -712,6 +724,7 @@ var PartOfSpeech = { * This category shows if the token is part of a proper name. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Proper: { @@ -735,6 +748,7 @@ var PartOfSpeech = { * Reciprocal features of a pronoun. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Reciprocity: { @@ -759,6 +773,7 @@ var PartOfSpeech = { * Time reference. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Tense: { @@ -803,6 +818,7 @@ var PartOfSpeech = { * participants identified by its arguments. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Voice: { @@ -841,9 +857,10 @@ var PartOfSpeech = { * @property {number} label * The parse label for the token. * - * The number should be among the values of [Label]{@link Label} + * The number should be among the values of [Label]{@link google.cloud.language.v1beta2.Label} * - * @class + * @typedef DependencyEdge + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.DependencyEdge definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var DependencyEdge = { @@ -853,6 +870,7 @@ var DependencyEdge = { * The parse label enum for the token. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Label: { @@ -1280,22 +1298,23 @@ var DependencyEdge = { * @property {Object} text * The mention text. * - * This object should have the same structure as [TextSpan]{@link TextSpan} + * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1beta2.TextSpan} * * @property {number} type * The type of the entity mention. * - * The number should be among the values of [Type]{@link Type} + * The number should be among the values of [Type]{@link google.cloud.language.v1beta2.Type} * * @property {Object} sentiment - * For calls to {@link AnalyzeEntitySentiment} or if - * {@link AnnotateTextRequest.Features.extract_entity_sentiment} is set to + * For calls to AnalyzeEntitySentiment or if + * AnnotateTextRequest.Features.extract_entity_sentiment is set to * true, this field will contain the sentiment expressed for this mention of * the entity in the provided document. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * - * @class + * @typedef EntityMention + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.EntityMention definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var EntityMention = { @@ -1305,6 +1324,7 @@ var EntityMention = { * The supported types of mentions. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ Type: { @@ -1333,9 +1353,10 @@ var EntityMention = { * * @property {number} beginOffset * The API calculates the beginning offset of the content in the original - * document according to the {@link EncodingType} specified in the API request. + * document according to the EncodingType specified in the API request. * - * @class + * @typedef TextSpan + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.TextSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var TextSpan = { @@ -1352,7 +1373,8 @@ var TextSpan = { * The classifier's confidence of the category. Number represents how certain * the classifier is that this category represents the given text. * - * @class + * @typedef ClassificationCategory + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.ClassificationCategory definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var ClassificationCategory = { @@ -1365,15 +1387,16 @@ var ClassificationCategory = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * * @property {number} encodingType * The encoding type used by the API to calculate sentence offsets for the * sentence sentiment. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * - * @class + * @typedef AnalyzeSentimentRequest + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeSentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnalyzeSentimentRequest = { @@ -1386,19 +1409,20 @@ var AnalyzeSentimentRequest = { * @property {Object} documentSentiment * The overall sentiment of the input document. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * * @property {Object[]} sentences * The sentiment for all the sentences in the document. * - * This object should have the same structure as [Sentence]{@link Sentence} + * This object should have the same structure as [Sentence]{@link google.cloud.language.v1beta2.Sentence} * - * @class + * @typedef AnalyzeSentimentResponse + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeSentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnalyzeSentimentResponse = { @@ -1411,14 +1435,15 @@ var AnalyzeSentimentResponse = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * * @property {number} encodingType * The encoding type used by the API to calculate offsets. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * - * @class + * @typedef AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnalyzeEntitySentimentRequest = { @@ -1431,14 +1456,15 @@ var AnalyzeEntitySentimentRequest = { * @property {Object[]} entities * The recognized entities in the input document with associated sentiments. * - * This object should have the same structure as [Entity]{@link Entity} + * This object should have the same structure as [Entity]{@link google.cloud.language.v1beta2.Entity} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * - * @class + * @typedef AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnalyzeEntitySentimentResponse = { @@ -1451,14 +1477,15 @@ var AnalyzeEntitySentimentResponse = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * * @property {number} encodingType * The encoding type used by the API to calculate offsets. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * - * @class + * @typedef AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeEntitiesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnalyzeEntitiesRequest = { @@ -1471,14 +1498,15 @@ var AnalyzeEntitiesRequest = { * @property {Object[]} entities * The recognized entities in the input document. * - * This object should have the same structure as [Entity]{@link Entity} + * This object should have the same structure as [Entity]{@link google.cloud.language.v1beta2.Entity} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * - * @class + * @typedef AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeEntitiesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnalyzeEntitiesResponse = { @@ -1491,14 +1519,15 @@ var AnalyzeEntitiesResponse = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * * @property {number} encodingType * The encoding type used by the API to calculate offsets. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * - * @class + * @typedef AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeSyntaxRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnalyzeSyntaxRequest = { @@ -1511,19 +1540,20 @@ var AnalyzeSyntaxRequest = { * @property {Object[]} sentences * Sentences in the input document. * - * This object should have the same structure as [Sentence]{@link Sentence} + * This object should have the same structure as [Sentence]{@link google.cloud.language.v1beta2.Sentence} * * @property {Object[]} tokens * Tokens, along with their syntactic information, in the input document. * - * This object should have the same structure as [Token]{@link Token} + * This object should have the same structure as [Token]{@link google.cloud.language.v1beta2.Token} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * - * @class + * @typedef AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeSyntaxResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnalyzeSyntaxResponse = { @@ -1536,9 +1566,10 @@ var AnalyzeSyntaxResponse = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * - * @class + * @typedef ClassifyTextRequest + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.ClassifyTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var ClassifyTextRequest = { @@ -1551,9 +1582,10 @@ var ClassifyTextRequest = { * @property {Object[]} categories * Categories representing the input document. * - * This object should have the same structure as [ClassificationCategory]{@link ClassificationCategory} + * This object should have the same structure as [ClassificationCategory]{@link google.cloud.language.v1beta2.ClassificationCategory} * - * @class + * @typedef ClassifyTextResponse + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.ClassifyTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var ClassifyTextResponse = { @@ -1567,19 +1599,20 @@ var ClassifyTextResponse = { * @property {Object} document * Input document. * - * This object should have the same structure as [Document]{@link Document} + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * * @property {Object} features * The enabled features. * - * This object should have the same structure as [Features]{@link Features} + * This object should have the same structure as [Features]{@link google.cloud.language.v1beta2.Features} * * @property {number} encodingType * The encoding type used by the API to calculate offsets. * - * The number should be among the values of [EncodingType]{@link EncodingType} + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * - * @class + * @typedef AnnotateTextRequest + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnnotateTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnnotateTextRequest = { @@ -1604,7 +1637,8 @@ var AnnotateTextRequest = { * @property {boolean} classifyText * Classify the full document into categories. * - * @class + * @typedef Features + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnnotateTextRequest.Features definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ Features: { @@ -1617,41 +1651,42 @@ var AnnotateTextRequest = { * * @property {Object[]} sentences * Sentences in the input document. Populated if the user enables - * {@link AnnotateTextRequest.Features.extract_syntax}. + * AnnotateTextRequest.Features.extract_syntax. * - * This object should have the same structure as [Sentence]{@link Sentence} + * This object should have the same structure as [Sentence]{@link google.cloud.language.v1beta2.Sentence} * * @property {Object[]} tokens * Tokens, along with their syntactic information, in the input document. * Populated if the user enables - * {@link AnnotateTextRequest.Features.extract_syntax}. + * AnnotateTextRequest.Features.extract_syntax. * - * This object should have the same structure as [Token]{@link Token} + * This object should have the same structure as [Token]{@link google.cloud.language.v1beta2.Token} * * @property {Object[]} entities * Entities, along with their semantic information, in the input document. * Populated if the user enables - * {@link AnnotateTextRequest.Features.extract_entities}. + * AnnotateTextRequest.Features.extract_entities. * - * This object should have the same structure as [Entity]{@link Entity} + * This object should have the same structure as [Entity]{@link google.cloud.language.v1beta2.Entity} * * @property {Object} documentSentiment * The overall sentiment for the document. Populated if the user enables - * {@link AnnotateTextRequest.Features.extract_document_sentiment}. + * AnnotateTextRequest.Features.extract_document_sentiment. * - * This object should have the same structure as [Sentiment]{@link Sentiment} + * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See {@link Document.language} field for more details. + * See Document.language field for more details. * * @property {Object[]} categories * Categories identified in the input document. * - * This object should have the same structure as [ClassificationCategory]{@link ClassificationCategory} + * This object should have the same structure as [ClassificationCategory]{@link google.cloud.language.v1beta2.ClassificationCategory} * - * @class + * @typedef AnnotateTextResponse + * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ var AnnotateTextResponse = { @@ -1666,6 +1701,7 @@ var AnnotateTextResponse = { * differently. * * @enum {number} + * @memberof google.cloud.language.v1beta2 */ var EncodingType = { diff --git a/packages/google-cloud-language/src/v1beta2/index.js b/packages/google-cloud-language/src/v1beta2/index.js index eabebb8f311..4921903da71 100644 --- a/packages/google-cloud-language/src/v1beta2/index.js +++ b/packages/google-cloud-language/src/v1beta2/index.js @@ -1,34 +1,19 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use strict'; - -var languageServiceClient = require('./language_service_client'); -var gax = require('google-gax'); -var extend = require('extend'); +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -function v1beta2(options) { - options = extend({ - scopes: v1beta2.ALL_SCOPES - }, options); - var gaxGrpc = gax.grpc(options); - return languageServiceClient(gaxGrpc); -} +'use strict'; -v1beta2.GAPIC_VERSION = '0.0.5'; -v1beta2.SERVICE_ADDRESS = languageServiceClient.SERVICE_ADDRESS; -v1beta2.ALL_SCOPES = languageServiceClient.ALL_SCOPES; +const LanguageServiceClient = require('./language_service_client'); -module.exports = v1beta2; \ No newline at end of file +module.exports.LanguageServiceClient = LanguageServiceClient; diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 6c9e1d52537..5aa12bd05f5 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -1,482 +1,509 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * EDITING INSTRUCTIONS - * This file was generated from the file - * https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto, - * and updates to that file get reflected here through a refresh process. - * For the short term, the refresh process will only be runnable by Google - * engineers. - * - * The only allowed edits are to method and file documentation. A 3-way - * merge preserves those additions if the generated source changes. - */ -/* TODO: introduce line-wrapping so that it never exceeds the limit. */ -/* jscs: disable maximumLineLength */ -'use strict'; - -var configData = require('./language_service_client_config'); -var extend = require('extend'); -var gax = require('google-gax'); -var googleProtoFiles = require('google-proto-files'); -var path = require('path'); +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -var SERVICE_ADDRESS = 'language.googleapis.com'; +'use strict'; -var DEFAULT_SERVICE_PORT = 443; +const gapicConfig = require('./language_service_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); -var CODE_GEN_NAME_VERSION = 'gapic/0.0.5'; - -/** - * The scopes needed to make gRPC calls to all of the methods defined in - * this service. - */ -var ALL_SCOPES = [ - 'https://www.googleapis.com/auth/cloud-platform' -]; +const VERSION = require('../../package.json').version; /** * Provides text analysis operations such as sentiment analysis and entity * recognition. * - * * @class + * @memberof v1beta2 */ -function LanguageServiceClient(gaxGrpc, loadedProtos, opts) { - opts = extend({ - servicePath: SERVICE_ADDRESS, - port: DEFAULT_SERVICE_PORT, - clientConfig: {} - }, opts); +class LanguageServiceClient { + /** + * Construct an instance of LanguageServiceClient. + * + * @param {object=} options - The configuration object. See the subsequent + * parameters for more details. + * @param {object=} options.credentials - Credentials object. + * @param {string=} options.credentials.client_email + * @param {string=} options.credentials.private_key + * @param {string=} options.email - Account email address. Required when + * usaing a .pem or .p12 keyFilename. + * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option above is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number=} options.port - The port on which to connect to + * the remote host. + * @param {string=} options.projectId - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function=} options.promise - Custom promise module to use instead + * of native Promises. + * @param {string=} options.servicePath - The domain name of the + * API remote host. + */ + constructor(opts) { + this._descriptors = {}; - var googleApiClient = [ - 'gl-node/' + process.versions.node - ]; - if (opts.libName && opts.libVersion) { - googleApiClient.push(opts.libName + '/' + opts.libVersion); - } - googleApiClient.push( - CODE_GEN_NAME_VERSION, - 'gax/' + gax.version, - 'grpc/' + gaxGrpc.grpcVersion - ); + // Ensure that options include the service address and port. + opts = Object.assign( + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts + ); - var defaults = gaxGrpc.constructSettings( - 'google.cloud.language.v1beta2.LanguageService', - configData, - opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')}); + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = this.constructor.scopes; + var gaxGrpc = gax.grpc(opts); - var self = this; + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth; - this.auth = gaxGrpc.auth; - var languageServiceStub = gaxGrpc.createStub( - loadedProtos.google.cloud.language.v1beta2.LanguageService, - opts); - var languageServiceStubMethods = [ - 'analyzeSentiment', - 'analyzeEntities', - 'analyzeEntitySentiment', - 'analyzeSyntax', - 'classifyText', - 'annotateText' - ]; - languageServiceStubMethods.forEach(function(methodName) { - self['_' + methodName] = gax.createApiCall( - languageServiceStub.then(function(languageServiceStub) { - return function() { - var args = Array.prototype.slice.call(arguments, 0); - return languageServiceStub[methodName].apply(languageServiceStub, args); - }; - }), - defaults[methodName], - null); - }); -} + // Determine the client header string. + var clientHeader = [ + `gl-node/${process.version.node}`, + `grpc/${gaxGrpc.grpcVersion}`, + `gax/${gax.version}`, + `gapic/${VERSION}`, + ]; + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + var protos = merge( + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/cloud/language/v1beta2/language_service.proto' + ) + ); -/** - * Get the project ID used by this class. - * @param {function(Error, string)} callback - the callback to be called with - * the current project Id. - */ -LanguageServiceClient.prototype.getProjectId = function(callback) { - return this.auth.getProjectId(callback); -}; - -// Service calls + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.cloud.language.v1beta2.LanguageService', + gapicConfig, + opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')} + ); -/** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1beta2({ - * // optional auth parameters. - * }); - * - * var document = {}; - * client.analyzeSentiment({document: document}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.analyzeSentiment = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; - } + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; - return this._analyzeSentiment(request, options, callback); -}; + // Put together the "service stub" for + // google.cloud.language.v1beta2.LanguageService. + var languageServiceStub = gaxGrpc.createStub( + protos.google.cloud.language.v1beta2.LanguageService, + opts + ); -/** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1beta2({ - * // optional auth parameters. - * }); - * - * var document = {}; - * client.analyzeEntities({document: document}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.analyzeEntities = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var languageServiceStubMethods = [ + 'analyzeSentiment', + 'analyzeEntities', + 'analyzeEntitySentiment', + 'analyzeSyntax', + 'classifyText', + 'annotateText', + ]; + for (let methodName of languageServiceStubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + languageServiceStub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + null + ); + } } - if (options === undefined) { - options = {}; + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'language.googleapis.com'; } - return this._analyzeEntities(request, options, callback); -}; + /** + * The port for this API service. + */ + static get port() { + return 443; + } -/** - * Finds entities, similar to {@link AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link AnalyzeEntitySentimentResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1beta2({ - * // optional auth parameters. - * }); - * - * var document = {}; - * client.analyzeEntitySentiment({document: document}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.analyzeEntitySentiment = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; } - if (options === undefined) { - options = {}; + + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId(callback) { + return this.auth.getProjectId(callback); } - return this._analyzeEntitySentiment(request, options, callback); -}; + // ------------------- + // -- Service calls -- + // ------------------- -/** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link AnalyzeSyntaxResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1beta2({ - * // optional auth parameters. - * }); - * - * var document = {}; - * client.analyzeSyntax({document: document}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.analyzeSyntax = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + /** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1beta2.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.analyzeSentiment({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + analyzeSentiment(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.analyzeSentiment(request, options, callback); } - return this._analyzeSyntax(request, options, callback); -}; + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1beta2.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.analyzeEntities({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + analyzeEntities(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Classifies a document into categories. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [ClassifyTextResponse]{@link ClassifyTextResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ClassifyTextResponse]{@link ClassifyTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1beta2({ - * // optional auth parameters. - * }); - * - * var document = {}; - * client.classifyText({document: document}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.classifyText = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + return this._innerApiCalls.analyzeEntities(request, options, callback); } - return this._classifyText(request, options, callback); -}; + /** + * Finds entities, similar to AnalyzeEntities in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1beta2.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.analyzeEntitySentiment({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + analyzeEntitySentiment(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * A convenience method that provides all syntax, sentiment, entity, and - * classification features in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link Document} - * @param {Object} request.features - * The enabled features. - * - * This object should have the same structure as [Features]{@link Features} - * @param {number=} request.encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link EncodingType} - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var language = require('@google-cloud/language'); - * - * var client = language.v1beta2({ - * // optional auth parameters. - * }); - * - * var document = {}; - * var features = {}; - * var request = { - * document: document, - * features: features - * }; - * client.annotateText(request).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -LanguageServiceClient.prototype.annotateText = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + return this._innerApiCalls.analyzeEntitySentiment( + request, + options, + callback + ); } - return this._annotateText(request, options, callback); -}; + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1beta2.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.analyzeSyntax({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + analyzeSyntax(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -function LanguageServiceClientBuilder(gaxGrpc) { - if (!(this instanceof LanguageServiceClientBuilder)) { - return new LanguageServiceClientBuilder(gaxGrpc); + return this._innerApiCalls.analyzeSyntax(request, options, callback); } - var languageServiceStubProtos = gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos', 'google/cloud/language/v1beta2/language_service.proto')); - extend(this, languageServiceStubProtos.google.cloud.language.v1beta2); + /** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1beta2.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.classifyText({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + classifyText(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + return this._innerApiCalls.classifyText(request, options, callback); + } /** - * Build a new instance of {@link LanguageServiceClient}. - * - * @param {Object=} opts - The optional parameters. - * @param {String=} opts.servicePath - * The domain name of the API remote host. - * @param {number=} opts.port - * The port on which to connect to the remote host. - * @param {grpc.ClientCredentials=} opts.sslCreds - * A ClientCredentials for use with an SSL-enabled channel. - * @param {Object=} opts.clientConfig - * The customized config to build the call settings. See - * {@link gax.constructSettings} for the format. + * A convenience method that provides all syntax, sentiment, entity, and + * classification features in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} + * @param {Object} request.features + * The enabled features. + * + * This object should have the same structure as [Features]{@link google.cloud.language.v1beta2.Features} + * @param {number=} request.encodingType + * The encoding type used by the API to calculate offsets. + * + * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1beta2.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * var features = {}; + * var request = { + * document: document, + * features: features, + * }; + * client.annotateText(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); */ - this.languageServiceClient = function(opts) { - return new LanguageServiceClient(gaxGrpc, languageServiceStubProtos, opts); - }; - extend(this.languageServiceClient, LanguageServiceClient); + annotateText(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.annotateText(request, options, callback); + } } -module.exports = LanguageServiceClientBuilder; -module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file + +module.exports = LanguageServiceClient; diff --git a/packages/google-cloud-language/system-test/.eslintrc.yml b/packages/google-cloud-language/system-test/.eslintrc.yml new file mode 100644 index 00000000000..2e6882e46d2 --- /dev/null +++ b/packages/google-cloud-language/system-test/.eslintrc.yml @@ -0,0 +1,6 @@ +--- +env: + mocha: true +rules: + node/no-unpublished-require: off + no-console: off diff --git a/packages/google-cloud-language/system-test/language_service_smoke_test.js b/packages/google-cloud-language/system-test/language_service_smoke_test.js new file mode 100644 index 00000000000..eb13a4a2849 --- /dev/null +++ b/packages/google-cloud-language/system-test/language_service_smoke_test.js @@ -0,0 +1,40 @@ +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +describe('LanguageServiceSmokeTest', () => { + it('successfully makes a call to the service', done => { + const language = require('../src'); + + var client = new language.v1.LanguageServiceClient({ + // optional auth parameters. + }); + + var content = 'Hello, world!'; + var type = 'PLAIN_TEXT'; + var document = { + content: content, + type: type, + }; + client + .analyzeSentiment({document: document}) + .then(responses => { + var response = responses[0]; + console.log(response); + }) + .then(done) + .catch(done); + }); +}); diff --git a/packages/google-cloud-language/test/.eslintrc.yml b/packages/google-cloud-language/test/.eslintrc.yml new file mode 100644 index 00000000000..73f7bbc946f --- /dev/null +++ b/packages/google-cloud-language/test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +env: + mocha: true +rules: + node/no-unpublished-require: off diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js index 268e21d2fd5..4b9a0e33050 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -1,262 +1,301 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + 'use strict'; -var assert = require('assert'); -var language = require('../src'); +const assert = require('assert'); + +const languageModule = require('../src'); var FAKE_STATUS_CODE = 1; var error = new Error(); error.code = FAKE_STATUS_CODE; -describe('LanguageServiceClient', function() { - describe('analyzeSentiment', function() { - it('invokes analyzeSentiment without error', function(done) { - var client = language.v1(); +describe('LanguageServiceClient', () => { + describe('analyzeSentiment', () => { + it('invokes analyzeSentiment without error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._analyzeSentiment = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.analyzeSentiment(request, function(err, response) { + client.analyzeSentiment(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes analyzeSentiment with error', function(done) { - var client = language.v1(); + it('invokes analyzeSentiment with error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock Grpc layer - client._analyzeSentiment = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( + request, + null, + error + ); - client.analyzeSentiment(request, function(err, response) { + client.analyzeSentiment(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeEntities', function() { - it('invokes analyzeEntities without error', function(done) { - var client = language.v1(); + describe('analyzeEntities', () => { + it('invokes analyzeEntities without error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._analyzeEntities = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.analyzeEntities(request, function(err, response) { + client.analyzeEntities(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes analyzeEntities with error', function(done) { - var client = language.v1(); + it('invokes analyzeEntities with error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock Grpc layer - client._analyzeEntities = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( + request, + null, + error + ); - client.analyzeEntities(request, function(err, response) { + client.analyzeEntities(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeEntitySentiment', function() { - it('invokes analyzeEntitySentiment without error', function(done) { - var client = language.v1(); + describe('analyzeEntitySentiment', () => { + it('invokes analyzeEntitySentiment without error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._analyzeEntitySentiment = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.analyzeEntitySentiment(request, function(err, response) { + client.analyzeEntitySentiment(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes analyzeEntitySentiment with error', function(done) { - var client = language.v1(); + it('invokes analyzeEntitySentiment with error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock Grpc layer - client._analyzeEntitySentiment = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( + request, + null, + error + ); - client.analyzeEntitySentiment(request, function(err, response) { + client.analyzeEntitySentiment(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeSyntax', function() { - it('invokes analyzeSyntax without error', function(done) { - var client = language.v1(); + describe('analyzeSyntax', () => { + it('invokes analyzeSyntax without error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._analyzeSyntax = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.analyzeSyntax(request, function(err, response) { + client.analyzeSyntax(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes analyzeSyntax with error', function(done) { - var client = language.v1(); + it('invokes analyzeSyntax with error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock Grpc layer - client._analyzeSyntax = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( + request, + null, + error + ); - client.analyzeSyntax(request, function(err, response) { + client.analyzeSyntax(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('annotateText', function() { - it('invokes annotateText without error', function(done) { - var client = language.v1(); + describe('annotateText', () => { + it('invokes annotateText without error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var features = {}; var request = { - document : document, - features : features + document: document, + features: features, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._annotateText = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.annotateText = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.annotateText(request, function(err, response) { + client.annotateText(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes annotateText with error', function(done) { - var client = language.v1(); + it('invokes annotateText with error', done => { + var client = new languageModule.v1.LanguageServiceClient(); // Mock request var document = {}; var features = {}; var request = { - document : document, - features : features + document: document, + features: features, }; // Mock Grpc layer - client._annotateText = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.annotateText = mockSimpleGrpcMethod( + request, + null, + error + ); - client.annotateText(request, function(err, response) { + client.annotateText(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - }); function mockSimpleGrpcMethod(expectedRequest, response, error) { diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-v1beta2.js index 6614ae65865..ce078db1b27 100644 --- a/packages/google-cloud-language/test/gapic-v1beta2.js +++ b/packages/google-cloud-language/test/gapic-v1beta2.js @@ -1,305 +1,352 @@ -/* - * Copyright 2017, Google Inc. All rights reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017, Google Inc. All rights reserved. +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + 'use strict'; -var assert = require('assert'); -var language = require('../src'); +const assert = require('assert'); + +const languageModule = require('../src'); var FAKE_STATUS_CODE = 1; var error = new Error(); error.code = FAKE_STATUS_CODE; -describe('LanguageServiceClient', function() { - describe('analyzeSentiment', function() { - it('invokes analyzeSentiment without error', function(done) { - var client = language.v1beta2(); +describe('LanguageServiceClient', () => { + describe('analyzeSentiment', () => { + it('invokes analyzeSentiment without error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._analyzeSentiment = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.analyzeSentiment(request, function(err, response) { + client.analyzeSentiment(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes analyzeSentiment with error', function(done) { - var client = language.v1beta2(); + it('invokes analyzeSentiment with error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock Grpc layer - client._analyzeSentiment = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( + request, + null, + error + ); - client.analyzeSentiment(request, function(err, response) { + client.analyzeSentiment(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeEntities', function() { - it('invokes analyzeEntities without error', function(done) { - var client = language.v1beta2(); + describe('analyzeEntities', () => { + it('invokes analyzeEntities without error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._analyzeEntities = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.analyzeEntities(request, function(err, response) { + client.analyzeEntities(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes analyzeEntities with error', function(done) { - var client = language.v1beta2(); + it('invokes analyzeEntities with error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock Grpc layer - client._analyzeEntities = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( + request, + null, + error + ); - client.analyzeEntities(request, function(err, response) { + client.analyzeEntities(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeEntitySentiment', function() { - it('invokes analyzeEntitySentiment without error', function(done) { - var client = language.v1beta2(); + describe('analyzeEntitySentiment', () => { + it('invokes analyzeEntitySentiment without error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._analyzeEntitySentiment = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.analyzeEntitySentiment(request, function(err, response) { + client.analyzeEntitySentiment(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes analyzeEntitySentiment with error', function(done) { - var client = language.v1beta2(); + it('invokes analyzeEntitySentiment with error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock Grpc layer - client._analyzeEntitySentiment = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( + request, + null, + error + ); - client.analyzeEntitySentiment(request, function(err, response) { + client.analyzeEntitySentiment(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeSyntax', function() { - it('invokes analyzeSyntax without error', function(done) { - var client = language.v1beta2(); + describe('analyzeSyntax', () => { + it('invokes analyzeSyntax without error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._analyzeSyntax = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.analyzeSyntax(request, function(err, response) { + client.analyzeSyntax(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes analyzeSyntax with error', function(done) { - var client = language.v1beta2(); + it('invokes analyzeSyntax with error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock Grpc layer - client._analyzeSyntax = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( + request, + null, + error + ); - client.analyzeSyntax(request, function(err, response) { + client.analyzeSyntax(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('classifyText', function() { - it('invokes classifyText without error', function(done) { - var client = language.v1beta2(); + describe('classifyText', () => { + it('invokes classifyText without error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock response var expectedResponse = {}; // Mock Grpc layer - client._classifyText = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.classifyText = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.classifyText(request, function(err, response) { + client.classifyText(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes classifyText with error', function(done) { - var client = language.v1beta2(); + it('invokes classifyText with error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var request = { - document : document + document: document, }; // Mock Grpc layer - client._classifyText = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.classifyText = mockSimpleGrpcMethod( + request, + null, + error + ); - client.classifyText(request, function(err, response) { + client.classifyText(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('annotateText', function() { - it('invokes annotateText without error', function(done) { - var client = language.v1beta2(); + describe('annotateText', () => { + it('invokes annotateText without error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var features = {}; var request = { - document : document, - features : features + document: document, + features: features, }; // Mock response - var language_ = 'language-1613589672'; + var language = 'language-1613589672'; var expectedResponse = { - language : language_ + language: language, }; // Mock Grpc layer - client._annotateText = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.annotateText = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.annotateText(request, function(err, response) { + client.annotateText(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes annotateText with error', function(done) { - var client = language.v1beta2(); + it('invokes annotateText with error', done => { + var client = new languageModule.v1beta2.LanguageServiceClient(); // Mock request var document = {}; var features = {}; var request = { - document : document, - features : features + document: document, + features: features, }; // Mock Grpc layer - client._annotateText = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.annotateText = mockSimpleGrpcMethod( + request, + null, + error + ); - client.annotateText(request, function(err, response) { + client.annotateText(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - }); function mockSimpleGrpcMethod(expectedRequest, response, error) { From 914852719f60195d6d92d494f7fbb2053c5a273e Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 13 Oct 2017 10:50:23 -0700 Subject: [PATCH 105/488] Fix module JSDoc examples. (#9) --- packages/google-cloud-language/src/index.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js index 59999ca9520..b34ed1fc877 100644 --- a/packages/google-cloud-language/src/index.js +++ b/packages/google-cloud-language/src/index.js @@ -53,21 +53,17 @@ const gapic = Object.freeze({ * @module {object} @google-cloud/language * @alias nodejs-language * - * @example Install the client library with - * npm: + * @example Install the client library with npm: * npm install --save @google-cloud/language * * @example Import the client library: * const language = require('@google-cloud/language'); * - * @example Create a client that uses - * Application Default Credentials - * (ADC): - * let client = new language.LanguageServiceClient(); + * @example Create a client that uses Application Default Credentials (ADC): + * const client = new language.LanguageServiceClient(); * - * @example Create a client with - * explicit credentials: - * let client = new language.LanguageServiceClient({ + * @example Create a client with explicit credentials: + * const client = new language.LanguageServiceClient({ * projectId: 'your-project-id', * keyFilename: '/path/to/keyfile.json', * }); From 9a047dd5a67104f445aed6b288139ab99e958583 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Fri, 13 Oct 2017 12:28:15 -0700 Subject: [PATCH 106/488] Fix system test config. (#10) --- packages/google-cloud-language/.circleci/config.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 286149e73b1..97f54e8d3f9 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -187,12 +187,6 @@ jobs: openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - - run: - name: Decrypt second account credentials (storage-specific). - command: | - openssl aes-256-cbc -d -in .circleci/no-whitelist-key.json.enc \ - -out .circleci/no-whitelist-key.json \ - -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - run: name: Install modules and dependencies. command: npm install @@ -200,8 +194,6 @@ jobs: name: Run system tests. command: npm run system-test environment: - GCN_STORAGE_2ND_PROJECT_ID: gcloud-node-whitelist-ci-tests - GCN_STORAGE_2ND_PROJECT_KEY: .circleci/no-whitelist-key.json GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json - run: name: Remove unencrypted key. From b272ffea9700cb2928022bb8ce124a3446380614 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 13 Oct 2017 12:49:22 -0700 Subject: [PATCH 107/488] Update .cloud-repo-tools.json (#8) --- packages/google-cloud-language/.cloud-repo-tools.json | 2 +- packages/google-cloud-language/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.cloud-repo-tools.json b/packages/google-cloud-language/.cloud-repo-tools.json index eba0a0110d1..871e5a2ba44 100644 --- a/packages/google-cloud-language/.cloud-repo-tools.json +++ b/packages/google-cloud-language/.cloud-repo-tools.json @@ -2,7 +2,7 @@ "product": "nl", "requiresKeyFile": true, "requiresProjectId": true, - "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/natural-language/latest/", + "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/language/latest/", "release_quality": "beta", "samples": [ { diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 1956bddebc1..c68741651c0 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -126,5 +126,5 @@ Apache Version 2.0 See [LICENSE](LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/natural-language/latest/ +[client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest/ [product-docs]: https://cloud.google.com/natural-language/docs From 425c6c98017722862238ce692fab76ebb8249c7b Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 13 Oct 2017 13:39:22 -0700 Subject: [PATCH 108/488] Update repo-tools. (#11) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index fa90b79b970..d705b4b019b 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -62,7 +62,7 @@ "lodash.merge": "^4.6.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.0.8", + "@google-cloud/nodejs-repo-tools": "^2.0.9", "async": "^2.5.0", "codecov": "^2.3.0", "eslint": "^4.8.0", From d8c28bf5455b0bdbe80a8ced8058ca9166a18707 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Fri, 13 Oct 2017 15:18:28 -0700 Subject: [PATCH 109/488] Bump version to 0.13.0 (#12) --- packages/google-cloud-language/.circleci/config.yml | 8 +++++--- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 97f54e8d3f9..0993572efc8 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -117,13 +117,15 @@ jobs: - checkout - run: name: Install modules and dependencies. - command: npm install + command: | + npm install + npm link - run: name: Link the module being tested to the samples. command: | cd samples/ - npm install npm link @google-cloud/language + npm install cd .. - run: name: Run linting. @@ -161,8 +163,8 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm install npm link @google-cloud/language + npm install cd .. - run: name: Run sample tests. diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index d705b4b019b..f2a69bf05df 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "0.12.1", + "version": "0.13.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index a31c84a5da8..a06f4835399 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -19,7 +19,7 @@ "test": "repo-tools test run --cmd npm -- run cover" }, "dependencies": { - "@google-cloud/language": "0.12.1", + "@google-cloud/language": "0.13.0", "@google-cloud/storage": "1.4.0", "yargs": "9.0.1" }, From aaffe16124672608eb4dc6c82e414389d04c487c Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 16 Oct 2017 15:04:51 -0700 Subject: [PATCH 110/488] =?UTF-8?q?Update=20dependencies=20to=20enable=20G?= =?UTF-8?q?reenkeeper=20=F0=9F=8C=B4=20(#13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f2a69bf05df..9258f80f7b0 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -73,7 +73,7 @@ "ink-docstrap": "^1.3.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^3.5.3", + "mocha": "^4.0.1", "nyc": "^11.2.1", "power-assert": "^1.4.4", "prettier": "^1.7.4" From 4d3d1f1f95d88f47dc29cfc6c7cddc55ba8ee843 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Tue, 17 Oct 2017 14:39:53 -0700 Subject: [PATCH 111/488] Bump @google-cloud/language to v1.0.0 (#14) --- packages/google-cloud-language/.cloud-repo-tools.json | 2 +- packages/google-cloud-language/CONTRIBUTORS | 1 + packages/google-cloud-language/README.md | 11 ++++++----- packages/google-cloud-language/package.json | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-language/.cloud-repo-tools.json b/packages/google-cloud-language/.cloud-repo-tools.json index 871e5a2ba44..3eaf3caeae1 100644 --- a/packages/google-cloud-language/.cloud-repo-tools.json +++ b/packages/google-cloud-language/.cloud-repo-tools.json @@ -3,7 +3,7 @@ "requiresKeyFile": true, "requiresProjectId": true, "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/language/latest/", - "release_quality": "beta", + "release_quality": "ga", "samples": [ { "id": "analyze-v1", diff --git a/packages/google-cloud-language/CONTRIBUTORS b/packages/google-cloud-language/CONTRIBUTORS index a3d8ca46557..2df064c968c 100644 --- a/packages/google-cloud-language/CONTRIBUTORS +++ b/packages/google-cloud-language/CONTRIBUTORS @@ -18,3 +18,4 @@ Sawyer Hollenshead Song Wang Stephen Sawchuk Tim Swast +greenkeeper[bot] diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index c68741651c0..326fa81b5b6 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -2,7 +2,7 @@ # Google Cloud Natural Language API: Node.js Client -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-language.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-language) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-language?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-language) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-language/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-language) @@ -107,10 +107,11 @@ also contains samples. This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **GA** libraries +are addressed with the highest priority. More Information: [Google Cloud Platform Launch Stages][launch_stages] diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 9258f80f7b0..06e74f5a475 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "0.13.0", + "version": "1.0.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { @@ -44,7 +44,8 @@ "Sawyer Hollenshead ", "Song Wang ", "Stephen Sawchuk ", - "Tim Swast " + "Tim Swast ", + "greenkeeper[bot] " ], "scripts": { "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", From 68889c8de1f1a8562491b5467d1b8ea4f1f42e92 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 18 Oct 2017 07:19:02 -0700 Subject: [PATCH 112/488] Upgrade repo-tools and regenerate scaffolding. (#17) --- packages/google-cloud-language/README.md | 2 +- packages/google-cloud-language/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 326fa81b5b6..c05e9358127 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -92,7 +92,7 @@ client ## Samples -Samples are in the [`samples/`](https://github.com/blob/master/samples) directory. The samples' `README.md` +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/blob/master/samples) directory. The samples' `README.md` has instructions for running the samples. | Sample | Source Code | diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 06e74f5a475..714ca1f36a8 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -63,7 +63,7 @@ "lodash.merge": "^4.6.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.0.9", + "@google-cloud/nodejs-repo-tools": "^2.0.10", "async": "^2.5.0", "codecov": "^2.3.0", "eslint": "^4.8.0", From dded777012402693798bdb79c61565ebf1e98944 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 30 Oct 2017 06:27:11 -0700 Subject: [PATCH 113/488] Upgrade repo-tools and regenerate scaffolding. (#20) --- packages/google-cloud-language/.gitignore | 2 +- packages/google-cloud-language/README.md | 19 ++++---- packages/google-cloud-language/package.json | 2 +- .../google-cloud-language/samples/README.md | 46 ++++++++++++------- .../samples/package.json | 12 ++--- 5 files changed, 48 insertions(+), 33 deletions(-) diff --git a/packages/google-cloud-language/.gitignore b/packages/google-cloud-language/.gitignore index d97022b4503..6b80718f261 100644 --- a/packages/google-cloud-language/.gitignore +++ b/packages/google-cloud-language/.gitignore @@ -7,4 +7,4 @@ out/ system-test/secrets.js system-test/*key.json *.lock -*-lock.json +*-lock.js* diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index c05e9358127..36300c83ff4 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -1,6 +1,6 @@ Google Cloud Platform logo -# Google Cloud Natural Language API: Node.js Client +# [Google Cloud Natural Language API: Node.js Client](https://github.com/googleapis/nodejs-language) [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-language.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-language) @@ -11,7 +11,9 @@ [Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. + * [Natural Language API Node.js Client API Reference][client-docs] +* [github.com/googleapis/nodejs-language](https://github.com/googleapis/nodejs-language) * [Natural Language API Documentation][product-docs] Read more about the client libraries for Cloud APIs, including the older @@ -92,13 +94,13 @@ client ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/blob/master/samples) directory. The samples' `README.md` +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/tree/master/samples) directory. The samples' `README.md` has instructions for running the samples. -| Sample | Source Code | -| --------------------------- | --------------------------------- | -| Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | -| Analyze v1beta2 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js) | +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) | +| Analyze v1beta2 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) | The [Natural Language API Node.js Client API Reference][client-docs] documentation also contains samples. @@ -119,13 +121,14 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](.github/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-language/blob/master/.github/CONTRIBUTING.md). ## License Apache Version 2.0 -See [LICENSE](LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest/ [product-docs]: https://cloud.google.com/natural-language/docs +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 714ca1f36a8..780ec0f05ca 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -63,7 +63,7 @@ "lodash.merge": "^4.6.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.0.10", + "@google-cloud/nodejs-repo-tools": "^2.1.0", "async": "^2.5.0", "codecov": "^2.3.0", "eslint": "^4.8.0", diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 63aa1a1b253..35e305b9bb9 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -2,7 +2,7 @@ # Google Cloud Natural Language API: Node.js Samples -[![Build](https://storage.googleapis.com/.svg)]() +[![Open in Cloud Shell][shell_img]][shell_link] [Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. @@ -25,18 +25,23 @@ library's README. View the [source code][analyze-v1_0_code]. +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) + __Usage:__ `node analyze.v1.js --help` ``` +analyze.v1.js + 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. - entity-sentiment-text Detects sentiment of the entities in a string. - entity-sentiment-file Detects sentiment of the entities in a file in Google Cloud Storage. + analyze.v1.js sentiment-text Detects sentiment of a string. + analyze.v1.js sentiment-file Detects sentiment in a file in Google Cloud Storage. + analyze.v1.js entities-text Detects entities in a string. + analyze.v1.js entities-file Detects entities in a file in Google Cloud Storage. + analyze.v1.js syntax-text Detects syntax of a string. + analyze.v1.js syntax-file Detects syntax in a file in Google Cloud Storage. + analyze.v1.js entity-sentiment-text Detects sentiment of the entities in a string. + analyze.v1.js entity-sentiment-file Detects sentiment of the entities in a file in Google + Cloud Storage. Options: --version Show version number [boolean] @@ -62,18 +67,22 @@ For more information, see https://cloud.google.com/natural-language/docs View the [source code][analyze-v1beta2_1_code]. +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) + __Usage:__ `node analyze.v1beta2.js --help` ``` +analyze.v1beta2.js + 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. - classify-text Classifies text of a string. - classify-file Classifies text in a file in Google Cloud Storage. + analyze.v1beta2.js sentiment-text Detects sentiment of a string. + analyze.v1beta2.js sentiment-file Detects sentiment in a file in Google Cloud Storage. + analyze.v1beta2.js entities-text Detects entities in a string. + analyze.v1beta2.js entities-file Detects entities in a file in Google Cloud Storage. + analyze.v1beta2.js syntax-text Detects syntax of a string. + analyze.v1beta2.js syntax-file Detects syntax in a file in Google Cloud Storage. + analyze.v1beta2.js classify-text Classifies text of a string. + analyze.v1beta2.js classify-file Classifies text in a file in Google Cloud Storage. Options: --version Show version number [boolean] @@ -95,3 +104,6 @@ For more information, see https://cloud.google.com/natural-language/docs [analyze-v1beta2_1_docs]: https://cloud.google.com/natural-language/docs/ [analyze-v1beta2_1_code]: analyze.v1beta2.js + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index a06f4835399..5048f608b8b 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google Inc.", "engines": { - "node": ">=4.3.2" + "node": ">=4.0.0" }, "repository": "googleapis/nodejs-language", "private": true, @@ -19,15 +19,15 @@ "test": "repo-tools test run --cmd npm -- run cover" }, "dependencies": { - "@google-cloud/language": "0.13.0", + "@google-cloud/language": "1.0.0", "@google-cloud/storage": "1.4.0", - "yargs": "9.0.1" + "yargs": "10.0.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.0.8", - "ava": "0.22.0", + "@google-cloud/nodejs-repo-tools": "2.1.0", + "ava": "0.23.0", "proxyquire": "1.8.0", - "sinon": "4.0.1", + "sinon": "4.0.2", "uuid": "3.1.0" } } From 217504d4425ee47aaa9221c0302b79df92921bc3 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 30 Oct 2017 15:02:24 -0700 Subject: [PATCH 114/488] chore(package): update codecov to version 3.0.0 (#19) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 780ec0f05ca..2cb8fc9b7c3 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -65,7 +65,7 @@ "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.1.0", "async": "^2.5.0", - "codecov": "^2.3.0", + "codecov": "^3.0.0", "eslint": "^4.8.0", "eslint-config-prettier": "^2.6.0", "eslint-plugin-node": "^5.2.0", From 068ca25249a69e9bdade9612e239076a0f906977 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Thu, 2 Nov 2017 14:24:12 -0700 Subject: [PATCH 115/488] Test on Node 9. (#24) Drop Node != 8 on Windows. --- packages/google-cloud-language/.appveyor.yml | 3 --- packages/google-cloud-language/.circleci/config.yml | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/.appveyor.yml b/packages/google-cloud-language/.appveyor.yml index babe1d587f4..24082152655 100644 --- a/packages/google-cloud-language/.appveyor.yml +++ b/packages/google-cloud-language/.appveyor.yml @@ -1,8 +1,5 @@ environment: matrix: - - nodejs_version: 4 - - nodejs_version: 6 - - nodejs_version: 7 - nodejs_version: 8 install: diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 0993572efc8..a78e9093e3a 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -35,12 +35,17 @@ workflows: filters: tags: only: /.*/ + - node9: + filters: + tags: + only: /.*/ - lint: requires: - node4 - node6 - node7 - node8 + - node9 filters: tags: only: /.*/ @@ -50,6 +55,7 @@ workflows: - node6 - node7 - node8 + - node9 filters: tags: only: /.*/ @@ -109,6 +115,10 @@ jobs: docker: - image: node:8 <<: *unit_tests + node9: + docker: + - image: node:9 + <<: *unit_tests lint: docker: From 5474d058ad7e2c89c4f58aeeee82f3446680c13b Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Mon, 13 Nov 2017 13:21:29 -0800 Subject: [PATCH 116/488] Add the `classifyText` method to language (v1). (#22) --- .../cloud/language/v1/language_service.proto | 33 ++++++ .../cloud/language/v1/doc_language_service.js | 58 ++++++++++ .../src/v1/language_service_client.js | 99 ++++++++++++---- .../v1/language_service_client_config.json | 5 + .../google-cloud-language/test/gapic-v1.js | 107 ++++++++++++++++-- 5 files changed, 267 insertions(+), 35 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index 6620c2c632f..6895b0d82d4 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -52,6 +52,11 @@ service LanguageService { option (google.api.http) = { post: "/v1/documents:analyzeSyntax" body: "*" }; } + // Classifies a document into categories. + rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) { + option (google.api.http) = { post: "/v1/documents:classifyText" body: "*" }; + } + // A convenience method that provides all the features that analyzeSentiment, // analyzeEntities, and analyzeSyntax provide in one call. rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) { @@ -839,6 +844,16 @@ message TextSpan { int32 begin_offset = 2; } +// Represents a category returned from the text classifier. +message ClassificationCategory { + // The name of the category representing the document. + string name = 1; + + // The classifier's confidence of the category. Number represents how certain + // the classifier is that this category represents the given text. + float confidence = 2; +} + // The sentiment analysis request message. message AnalyzeSentimentRequest { // Input document. @@ -925,6 +940,18 @@ message AnalyzeSyntaxResponse { string language = 3; } +// The document classification request message. +message ClassifyTextRequest { + // Input document. + Document document = 1; +} + +// The document classification response message. +message ClassifyTextResponse { + // Categories representing the input document. + repeated ClassificationCategory categories = 1; +} + // The request message for the text annotation API, which can perform multiple // analysis types (sentiment, entities, and syntax) in one call. message AnnotateTextRequest { @@ -942,6 +969,9 @@ message AnnotateTextRequest { // Extract entities and their associated sentiment. bool extract_entity_sentiment = 4; + + // Classify the full document into categories. + bool classify_text = 6; } // Input document. @@ -978,6 +1008,9 @@ message AnnotateTextResponse { // in the request or, if not specified, the automatically-detected language. // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 5; + + // Categories identified in the input document. + repeated ClassificationCategory categories = 6; } // Represents the text encoding that the caller uses to process the output. diff --git a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js index a28e27464b6..eec9ea7fc9d 100644 --- a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js @@ -1367,6 +1367,24 @@ var TextSpan = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * Represents a category returned from the text classifier. + * + * @property {string} name + * The name of the category representing the document. + * + * @property {number} confidence + * The classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * + * @typedef ClassificationCategory + * @memberof google.cloud.language.v1 + * @see [google.cloud.language.v1.ClassificationCategory definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var ClassificationCategory = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * The sentiment analysis request message. * @@ -1545,6 +1563,38 @@ var AnalyzeSyntaxResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * The document classification request message. + * + * @property {Object} document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} + * + * @typedef ClassifyTextRequest + * @memberof google.cloud.language.v1 + * @see [google.cloud.language.v1.ClassifyTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var ClassifyTextRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The document classification response message. + * + * @property {Object[]} categories + * Categories representing the input document. + * + * This object should have the same structure as [ClassificationCategory]{@link google.cloud.language.v1.ClassificationCategory} + * + * @typedef ClassifyTextResponse + * @memberof google.cloud.language.v1 + * @see [google.cloud.language.v1.ClassifyTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} + */ +var ClassifyTextResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * The request message for the text annotation API, which can perform multiple * analysis types (sentiment, entities, and syntax) in one call. @@ -1587,6 +1637,9 @@ var AnnotateTextRequest = { * @property {boolean} extractEntitySentiment * Extract entities and their associated sentiment. * + * @property {boolean} classifyText + * Classify the full document into categories. + * * @typedef Features * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnnotateTextRequest.Features definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} @@ -1630,6 +1683,11 @@ var AnnotateTextRequest = { * in the request or, if not specified, the automatically-detected language. * See Document.language field for more details. * + * @property {Object[]} categories + * Categories identified in the input document. + * + * This object should have the same structure as [ClassificationCategory]{@link google.cloud.language.v1.ClassificationCategory} + * * @typedef AnnotateTextResponse * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index aa5654e24c3..bf9568229a6 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -32,28 +32,28 @@ class LanguageServiceClient { /** * Construct an instance of LanguageServiceClient. * - * @param {object=} options - The configuration object. See the subsequent + * @param {object} [options] - The configuration object. See the subsequent * parameters for more details. - * @param {object=} options.credentials - Credentials object. - * @param {string=} options.credentials.client_email - * @param {string=} options.credentials.private_key - * @param {string=} options.email - Account email address. Required when + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when * usaing a .pem or .p12 keyFilename. - * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide * a path to a JSON file, the projectId option above is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number=} options.port - The port on which to connect to + * @param {number} [options.port] - The port on which to connect to * the remote host. - * @param {string=} options.projectId - The project ID from the Google + * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. - * @param {function=} options.promise - Custom promise module to use instead + * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string=} options.servicePath - The domain name of the + * @param {string} [options.servicePath] - The domain name of the * API remote host. */ constructor(opts) { @@ -124,6 +124,7 @@ class LanguageServiceClient { 'analyzeEntities', 'analyzeEntitySentiment', 'analyzeSyntax', + 'classifyText', 'annotateText', ]; for (let methodName of languageServiceStubMethods) { @@ -185,14 +186,14 @@ class LanguageServiceClient { * Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate sentence offsets. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. @@ -239,14 +240,14 @@ class LanguageServiceClient { * Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. @@ -292,14 +293,14 @@ class LanguageServiceClient { * Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. @@ -350,14 +351,14 @@ class LanguageServiceClient { * Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. @@ -393,6 +394,54 @@ class LanguageServiceClient { return this._innerApiCalls.analyzeSyntax(request, options, callback); } + /** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.document + * Input document. + * + * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const language = require('@google-cloud/language'); + * + * var client = new language.v1.LanguageServiceClient({ + * // optional auth parameters. + * }); + * + * var document = {}; + * client.classifyText({document: document}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + classifyText(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.classifyText(request, options, callback); + } + /** * A convenience method that provides all the features that analyzeSentiment, * analyzeEntities, and analyzeSyntax provide in one call. @@ -407,14 +456,14 @@ class LanguageServiceClient { * The enabled features. * * This object should have the same structure as [Features]{@link google.cloud.language.v1.Features} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. diff --git a/packages/google-cloud-language/src/v1/language_service_client_config.json b/packages/google-cloud-language/src/v1/language_service_client_config.json index 7c00b67d111..0f2f69be6c1 100644 --- a/packages/google-cloud-language/src/v1/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1/language_service_client_config.json @@ -40,6 +40,11 @@ "retry_codes_name": "idempotent", "retry_params_name": "default" }, + "ClassifyText": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, "AnnotateText": { "timeout_millis": 30000, "retry_codes_name": "idempotent", diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js index 4b9a0e33050..550c0ad5300 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -25,7 +25,10 @@ error.code = FAKE_STATUS_CODE; describe('LanguageServiceClient', () => { describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -53,7 +56,10 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSentiment with error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -79,7 +85,10 @@ describe('LanguageServiceClient', () => { describe('analyzeEntities', () => { it('invokes analyzeEntities without error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -107,7 +116,10 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntities with error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -133,7 +145,10 @@ describe('LanguageServiceClient', () => { describe('analyzeEntitySentiment', () => { it('invokes analyzeEntitySentiment without error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -161,7 +176,10 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntitySentiment with error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -187,7 +205,10 @@ describe('LanguageServiceClient', () => { describe('analyzeSyntax', () => { it('invokes analyzeSyntax without error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -215,7 +236,10 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSyntax with error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -239,9 +263,69 @@ describe('LanguageServiceClient', () => { }); }); + describe('classifyText', () => { + it('invokes classifyText without error', done => { + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var document = {}; + var request = { + document: document, + }; + + // Mock response + var expectedResponse = {}; + + // Mock Grpc layer + client._innerApiCalls.classifyText = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.classifyText(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes classifyText with error', done => { + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var document = {}; + var request = { + document: document, + }; + + // Mock Grpc layer + client._innerApiCalls.classifyText = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.classifyText(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('annotateText', () => { it('invokes annotateText without error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -271,7 +355,10 @@ describe('LanguageServiceClient', () => { }); it('invokes annotateText with error', done => { - var client = new languageModule.v1.LanguageServiceClient(); + var client = new languageModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; From ae6c9c68b6a489ba36680b06054ccaff05915a4b Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Mon, 13 Nov 2017 13:48:45 -0800 Subject: [PATCH 117/488] Stage v1.1.0. (#25) Release notes in the usual place on GitHub. --- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 2cb8fc9b7c3..859efefdfb3 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "1.0.0", + "version": "1.1.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 5048f608b8b..bcb2001bcdf 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -19,7 +19,7 @@ "test": "repo-tools test run --cmd npm -- run cover" }, "dependencies": { - "@google-cloud/language": "1.0.0", + "@google-cloud/language": "1.1.0", "@google-cloud/storage": "1.4.0", "yargs": "10.0.3" }, From e24691a49d1214b7224e2c77eebe3527403b0c66 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Thu, 18 Jan 2018 08:18:29 -0500 Subject: [PATCH 118/488] =?UTF-8?q?Update=20mocha=20to=20the=20latest=20ve?= =?UTF-8?q?rsion=20=F0=9F=9A=80=20(#30)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 859efefdfb3..2d86be25463 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -74,7 +74,7 @@ "ink-docstrap": "^1.3.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^4.0.1", + "mocha": "^5.0.0", "nyc": "^11.2.1", "power-assert": "^1.4.4", "prettier": "^1.7.4" From 865cb7a43e8153d211064f9d3cdb5050d5cf5302 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 5 Feb 2018 08:59:46 -0500 Subject: [PATCH 119/488] =?UTF-8?q?Update=20eslint-plugin-node=20to=20the?= =?UTF-8?q?=20latest=20version=20=F0=9F=9A=80=20(#32)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 2d86be25463..4750b35be15 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -68,7 +68,7 @@ "codecov": "^3.0.0", "eslint": "^4.8.0", "eslint-config-prettier": "^2.6.0", - "eslint-plugin-node": "^5.2.0", + "eslint-plugin-node": "^6.0.0", "eslint-plugin-prettier": "^2.3.1", "extend": "^3.0.1", "ink-docstrap": "^1.3.0", From ff4f6b46e189129ba2c6bbaf797a3044dd45e650 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 22 Feb 2018 16:10:09 -0800 Subject: [PATCH 120/488] chore: removing node7 job from CircleCI (#36) * chore: removing node7 job from CircleCI * chore: rename reference --- .../.circleci/config.yml | 61 +++++++------------ 1 file changed, 21 insertions(+), 40 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index a78e9093e3a..fc5d460ee8e 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -1,7 +1,5 @@ ---- -# "Include" for unit tests definition. -unit_tests: &unit_tests - steps: +unit_tests: + steps: &unit_tests - checkout - run: name: Install modules and dependencies. @@ -13,8 +11,7 @@ unit_tests: &unit_tests name: Submit coverage data to codecov. command: node_modules/.bin/codecov when: always - -version: 2.0 +version: 2 workflows: version: 2 tests: @@ -27,10 +24,6 @@ workflows: filters: tags: only: /.*/ - - node7: - filters: - tags: - only: /.*/ - node8: filters: tags: @@ -43,7 +36,6 @@ workflows: requires: - node4 - node6 - - node7 - node8 - node9 filters: @@ -53,7 +45,6 @@ workflows: requires: - node4 - node6 - - node7 - node8 - node9 filters: @@ -67,7 +58,7 @@ workflows: branches: only: master tags: - only: /^v[\d.]+$/ + only: '/^v[\d.]+$/' - sample_tests: requires: - lint @@ -76,7 +67,7 @@ workflows: branches: only: master tags: - only: /^v[\d.]+$/ + only: '/^v[\d.]+$/' - publish_npm: requires: - system_tests @@ -85,12 +76,11 @@ workflows: branches: ignore: /.*/ tags: - only: /^v[\d.]+$/ - + only: '/^v[\d.]+$/' jobs: node4: docker: - - image: node:4 + - image: 'node:4' steps: - checkout - run: @@ -105,24 +95,19 @@ jobs: when: always node6: docker: - - image: node:6 - <<: *unit_tests - node7: - docker: - - image: node:7 - <<: *unit_tests + - image: 'node:6' + steps: *unit_tests node8: docker: - - image: node:8 - <<: *unit_tests + - image: 'node:8' + steps: *unit_tests node9: docker: - - image: node:9 - <<: *unit_tests - + - image: 'node:9' + steps: *unit_tests lint: docker: - - image: node:8 + - image: 'node:8' steps: - checkout - run: @@ -140,10 +125,9 @@ jobs: - run: name: Run linting. command: npm run lint - docs: docker: - - image: node:8 + - image: 'node:8' steps: - checkout - run: @@ -152,10 +136,9 @@ jobs: - run: name: Build documentation. command: npm run docs - sample_tests: docker: - - image: node:8 + - image: 'node:8' steps: - checkout - run: @@ -187,10 +170,9 @@ jobs: command: rm .circleci/key.json when: always working_directory: /var/language/ - system_tests: docker: - - image: node:8 + - image: 'node:8' steps: - checkout - run: @@ -211,15 +193,14 @@ jobs: name: Remove unencrypted key. command: rm .circleci/key.json when: always - publish_npm: docker: - - image: node:8 + - image: 'node:8' steps: - checkout - run: name: Set NPM authentication. - command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + command: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - run: - name: Publish the module to npm. - command: npm publish + name: Publish the module to npm. + command: npm publish From 5e6a2a0c109b83807f129e79e2dfe47ae2a4e69d Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 5 Mar 2018 16:22:18 -0500 Subject: [PATCH 121/488] fix(package): update google-gax to version 0.15.0 (#38) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 4750b35be15..5b6fb156e07 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -59,7 +59,7 @@ "test": "repo-tools test run --cmd npm -- run cover" }, "dependencies": { - "google-gax": "^0.14.1", + "google-gax": "^0.15.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From 29b0958e56bcea7025cac02f9919abfcf57ca977 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 14 Mar 2018 16:20:42 -0400 Subject: [PATCH 122/488] fix(package): update google-gax to version 0.16.0 (#40) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 5b6fb156e07..3b35f3e04bd 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -59,7 +59,7 @@ "test": "repo-tools test run --cmd npm -- run cover" }, "dependencies": { - "google-gax": "^0.15.0", + "google-gax": "^0.16.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From 225e0616558cdc0c44aec349db875419253b11a5 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 16 Mar 2018 12:43:56 -0700 Subject: [PATCH 123/488] Upgrade repo-tools and regenerate scaffolding. (#41) --- packages/google-cloud-language/.gitignore | 1 - packages/google-cloud-language/CONTRIBUTORS | 1 + packages/google-cloud-language/README.md | 2 +- .../google-cloud-language/package-lock.json | 12715 ++++++++++++++++ packages/google-cloud-language/package.json | 3 +- .../google-cloud-language/samples/README.md | 6 +- .../samples/package.json | 2 +- 7 files changed, 12725 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-language/package-lock.json diff --git a/packages/google-cloud-language/.gitignore b/packages/google-cloud-language/.gitignore index 6b80718f261..b7d407606fb 100644 --- a/packages/google-cloud-language/.gitignore +++ b/packages/google-cloud-language/.gitignore @@ -7,4 +7,3 @@ out/ system-test/secrets.js system-test/*key.json *.lock -*-lock.js* diff --git a/packages/google-cloud-language/CONTRIBUTORS b/packages/google-cloud-language/CONTRIBUTORS index 2df064c968c..21228368fb6 100644 --- a/packages/google-cloud-language/CONTRIBUTORS +++ b/packages/google-cloud-language/CONTRIBUTORS @@ -4,6 +4,7 @@ # name # Ace Nassri +Alexander Fenster Amy Dave Gramlich Eric Uldall diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 36300c83ff4..8373d7cfb0a 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -131,4 +131,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest/ [product-docs]: https://cloud.google.com/natural-language/docs -[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_img]: //gstatic.com/cloudssh/images/open-btn.png diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json new file mode 100644 index 00000000000..a576b6ef050 --- /dev/null +++ b/packages/google-cloud-language/package-lock.json @@ -0,0 +1,12715 @@ +{ + "name": "@google-cloud/language", + "version": "1.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ava/babel-plugin-throws-helper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@ava/babel-plugin-throws-helper/-/babel-plugin-throws-helper-2.0.0.tgz", + "integrity": "sha1-L8H+PCEacQcaTsp7j3r1hCzRrnw=", + "dev": true + }, + "@ava/babel-preset-stage-4": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@ava/babel-preset-stage-4/-/babel-preset-stage-4-1.1.0.tgz", + "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "package-hash": "1.2.0" + }, + "dependencies": { + "md5-hex": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", + "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "package-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-1.2.0.tgz", + "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", + "dev": true, + "requires": { + "md5-hex": "1.3.0" + } + } + } + }, + "@ava/babel-preset-transform-test-files": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@ava/babel-preset-transform-test-files/-/babel-preset-transform-test-files-3.0.0.tgz", + "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", + "dev": true, + "requires": { + "@ava/babel-plugin-throws-helper": "2.0.0", + "babel-plugin-espower": "2.3.2" + } + }, + "@ava/write-file-atomic": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ava/write-file-atomic/-/write-file-atomic-2.2.0.tgz", + "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + }, + "@concordance/react": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@concordance/react/-/react-1.0.0.tgz", + "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", + "dev": true, + "requires": { + "arrify": "1.0.1" + } + }, + "@google-cloud/nodejs-repo-tools": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.2.3.tgz", + "integrity": "sha512-O6OVc8lKiLL8Qtoc1lVAynf5pJT550fHZcW33a7oQ7TMNkrTHPgeoYw4esi4KSbDRn8gV+cfefnkgqxXmr+KzA==", + "dev": true, + "requires": { + "ava": "0.25.0", + "colors": "1.1.2", + "fs-extra": "5.0.0", + "got": "8.2.0", + "handlebars": "4.0.11", + "lodash": "4.17.5", + "nyc": "11.4.1", + "proxyquire": "1.8.0", + "sinon": "4.3.0", + "string": "3.3.3", + "supertest": "3.0.0", + "yargs": "11.0.0", + "yargs-parser": "9.0.2" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ava": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/ava/-/ava-0.25.0.tgz", + "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", + "dev": true, + "requires": { + "@ava/babel-preset-stage-4": "1.1.0", + "@ava/babel-preset-transform-test-files": "3.0.0", + "@ava/write-file-atomic": "2.2.0", + "@concordance/react": "1.0.0", + "@ladjs/time-require": "0.1.4", + "ansi-escapes": "3.0.0", + "ansi-styles": "3.2.0", + "arr-flatten": "1.1.0", + "array-union": "1.0.2", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "auto-bind": "1.1.0", + "ava-init": "0.2.1", + "babel-core": "6.26.0", + "babel-generator": "6.26.0", + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "bluebird": "3.5.1", + "caching-transform": "1.0.1", + "chalk": "2.1.0", + "chokidar": "1.7.0", + "clean-stack": "1.3.0", + "clean-yaml-object": "0.1.0", + "cli-cursor": "2.1.0", + "cli-spinners": "1.1.0", + "cli-truncate": "1.1.0", + "co-with-promise": "4.6.0", + "code-excerpt": "2.1.1", + "common-path-prefix": "1.0.0", + "concordance": "3.0.0", + "convert-source-map": "1.5.1", + "core-assert": "0.2.1", + "currently-unhandled": "0.4.1", + "debug": "3.1.0", + "dot-prop": "4.2.0", + "empower-core": "0.6.2", + "equal-length": "1.0.1", + "figures": "2.0.0", + "find-cache-dir": "1.0.0", + "fn-name": "2.0.1", + "get-port": "3.2.0", + "globby": "6.1.0", + "has-flag": "2.0.0", + "hullabaloo-config-manager": "1.1.1", + "ignore-by-default": "1.0.1", + "import-local": "0.1.1", + "indent-string": "3.2.0", + "is-ci": "1.0.10", + "is-generator-fn": "1.0.0", + "is-obj": "1.0.1", + "is-observable": "1.1.0", + "is-promise": "2.1.0", + "last-line-stream": "1.0.0", + "lodash.clonedeepwith": "4.5.0", + "lodash.debounce": "4.0.8", + "lodash.difference": "4.5.0", + "lodash.flatten": "4.4.0", + "loud-rejection": "1.6.0", + "make-dir": "1.1.0", + "matcher": "1.0.0", + "md5-hex": "2.0.0", + "meow": "3.7.0", + "ms": "2.0.0", + "multimatch": "2.1.0", + "observable-to-promise": "0.5.0", + "option-chain": "1.0.0", + "package-hash": "2.0.0", + "pkg-conf": "2.0.0", + "plur": "2.1.2", + "pretty-ms": "3.0.1", + "require-precompiled": "0.1.0", + "resolve-cwd": "2.0.0", + "safe-buffer": "5.1.1", + "semver": "5.4.1", + "slash": "1.0.0", + "source-map-support": "0.5.4", + "stack-utils": "1.0.1", + "strip-ansi": "4.0.0", + "strip-bom-buf": "1.0.0", + "supertap": "1.0.0", + "supports-color": "5.3.0", + "trim-off-newlines": "1.0.1", + "unique-temp-dir": "1.0.0", + "update-notifier": "2.3.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "cliui": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", + "integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==", + "dev": true, + "requires": { + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" + } + }, + "code-excerpt": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-2.1.1.tgz", + "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", + "dev": true, + "requires": { + "convert-to-spaces": "1.0.2" + } + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" + } + }, + "got": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/got/-/got-8.2.0.tgz", + "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", + "dev": true, + "requires": { + "@sindresorhus/is": "0.7.0", + "cacheable-request": "2.1.4", + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "into-stream": "3.1.0", + "is-retry-allowed": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.0", + "mimic-response": "1.0.0", + "p-cancelable": "0.3.0", + "p-timeout": "2.0.1", + "pify": "3.0.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "url-parse-lax": "3.0.0", + "url-to-options": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-observable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", + "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", + "dev": true, + "requires": { + "symbol-observable": "1.2.0" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", + "dev": true + }, + "lolex": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", + "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==", + "dev": true + }, + "nyc": { + "version": "11.4.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", + "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", + "dev": true, + "requires": { + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.1", + "debug-log": "1.0.1", + "default-require-extensions": "1.0.0", + "find-cache-dir": "0.1.1", + "find-up": "2.1.0", + "foreground-child": "1.5.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "1.9.1", + "istanbul-lib-report": "1.1.2", + "istanbul-lib-source-maps": "1.2.2", + "istanbul-reports": "1.1.3", + "md5-hex": "1.3.0", + "merge-source-map": "1.0.4", + "micromatch": "2.3.11", + "mkdirp": "0.5.1", + "resolve-from": "2.0.0", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "spawn-wrap": "1.4.2", + "test-exclude": "4.1.1", + "yargs": "10.0.3", + "yargs-parser": "8.0.0" + }, + "dependencies": { + "align-text": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "append-transform": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "requires": { + "default-require-extensions": "1.0.0" + } + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "arrify": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "async": { + "version": "1.5.2", + "bundled": true, + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-generator": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" + } + }, + "babel-template": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "bundled": true, + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "bundled": true, + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "builtin-modules": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "caching-transform": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" + } + }, + "camelcase": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true + }, + "center-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "cliui": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "commondir": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "bundled": true, + "dev": true + }, + "core-js": { + "version": "2.5.3", + "bundled": true, + "dev": true + }, + "cross-spawn": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "which": "1.3.0" + } + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debug-log": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "default-require-extensions": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "strip-bom": "2.0.0" + } + }, + "detect-indent": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "esutils": { + "version": "2.0.2", + "bundled": true, + "dev": true + }, + "execa": { + "version": "0.7.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + } + } + }, + "expand-brackets": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "bundled": true, + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "extglob": { + "version": "0.3.2", + "bundled": true, + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "bundled": true, + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-cache-dir": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "requires": { + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "for-own": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "4.0.2", + "signal-exit": "3.0.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "globals": { + "version": "9.18.0", + "bundled": true, + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "bundled": true, + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invariant": { + "version": "2.2.2", + "bundled": true, + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "istanbul-lib-coverage": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "append-transform": "0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.9.1", + "bundled": true, + "dev": true, + "requires": { + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.4.1" + } + }, + "istanbul-lib-report": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.2", + "bundled": true, + "dev": true, + "requires": { + "debug": "3.1.0", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "istanbul-reports": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "handlebars": "4.0.11" + } + }, + "js-tokens": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + }, + "lodash": { + "version": "4.17.4", + "bundled": true, + "dev": true + }, + "longest": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "lru-cache": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "md5-hex": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "md5-o-matic": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "mem": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "mimic-fn": "1.1.0" + } + }, + "merge-source-map": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "micromatch": { + "version": "2.3.11", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mimic-fn": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "object.omit": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "1.1.0" + } + }, + "parse-glob": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "path-exists": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "path-type": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "bundled": true, + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "bundled": true, + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "pkg-dir": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "1.1.2" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "preserve": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "read-pkg": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "bundled": true, + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "bundled": true, + "dev": true + }, + "repeating": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "resolve-from": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "right-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "semver": { + "version": "5.4.1", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "source-map": { + "version": "0.5.7", + "bundled": true, + "dev": true + }, + "spawn-wrap": { + "version": "1.4.2", + "bundled": true, + "dev": true, + "requires": { + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "which": "1.3.0" + } + }, + "spdx-correct": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "bundled": true, + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "test-exclude": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "arrify": "1.0.1", + "micromatch": "2.3.11", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + } + }, + "to-fast-properties": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "yargs": { + "version": "3.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "which": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "window-size": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "bundled": true, + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + }, + "y18n": { + "version": "3.2.1", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "10.0.3", + "bundled": true, + "dev": true, + "requires": { + "cliui": "3.2.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "8.0.0" + }, + "dependencies": { + "cliui": { + "version": "3.2.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + } + } + }, + "yargs-parser": { + "version": "8.0.0", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "dev": true, + "requires": { + "p-finally": "1.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "sinon": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.3.0.tgz", + "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", + "dev": true, + "requires": { + "@sinonjs/formatio": "2.0.0", + "diff": "3.4.0", + "lodash.get": "4.4.2", + "lolex": "2.3.2", + "nise": "1.2.0", + "supports-color": "5.3.0", + "type-detect": "4.0.8" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.4.tgz", + "integrity": "sha512-PETSPG6BjY1AHs2t64vS2aqAgu6dMIMXJULWFBGbh2Gr8nVLbCFDo6i/RMMvviIQ2h1Z8+5gQhVKSn2je9nmdg==", + "dev": true, + "requires": { + "source-map": "0.6.1" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + } + } + }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "2.0.0" + } + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "dev": true, + "requires": { + "cliui": "4.0.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "@ladjs/time-require": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@ladjs/time-require/-/time-require-0.1.4.tgz", + "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", + "dev": true, + "requires": { + "chalk": "0.4.0", + "date-time": "0.1.1", + "pretty-ms": "0.2.2", + "text-table": "0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", + "dev": true + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "dev": true, + "requires": { + "ansi-styles": "1.0.0", + "has-color": "0.1.7", + "strip-ansi": "0.1.1" + } + }, + "date-time": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-0.1.1.tgz", + "integrity": "sha1-7S9tk9l5DOL9ZtW1/z7dW7y/Owc=", + "dev": true + }, + "parse-ms": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-0.1.2.tgz", + "integrity": "sha1-3T+iXtbC78e93hKtm0bBY6opIk4=", + "dev": true + }, + "pretty-ms": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-0.2.2.tgz", + "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", + "dev": true, + "requires": { + "parse-ms": "0.1.2" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", + "dev": true + } + } + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "requires": { + "call-me-maybe": "1.0.1", + "glob-to-regexp": "0.3.0" + } + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/inquire": "1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", + "dev": true + }, + "@sinonjs/formatio": { + "version": "2.0.0", + "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, + "@types/long": { + "version": "3.0.32", + "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", + "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + }, + "@types/node": { + "version": "7.0.43", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz", + "integrity": "sha512-7scYwwfHNppXvH/9JzakbVxk0o0QUILVk1Lv64GRaxwPuGpnF1QBiwdvhDpLcymb8BpomQL3KYoWKq3wUdDMhQ==" + }, + "acorn": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", + "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==", + "dev": true + }, + "acorn-es7-plugin": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz", + "integrity": "sha1-8u4fMiipDurRJF+asZIusucdM2s=" + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "3.3.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "ajv": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz", + "integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "json-schema-traverse": "0.3.1", + "json-stable-stringify": "1.0.1" + } + }, + "ajv-keywords": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.0.tgz", + "integrity": "sha1-opbhf3v658HOT34N5T0pyzIWLfA=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "argv": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", + "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=", + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-exclude": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/arr-exclude/-/arr-exclude-1.0.0.tgz", + "integrity": "sha1-38fC5VKicHI8zaBM8xKMjL/lxjE=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-filter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", + "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=" + }, + "array-find": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", + "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + }, + "ascli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", + "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", + "requires": { + "colour": "0.7.1", + "optjs": "3.2.2" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "requires": { + "lodash": "4.17.4" + } + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "atob": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", + "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=" + }, + "auto-bind": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.1.0.tgz", + "integrity": "sha1-k7hk3H7gGjJigXddXHXKCnUeWWE=", + "dev": true + }, + "ava-init": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ava-init/-/ava-init-0.2.1.tgz", + "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", + "dev": true, + "requires": { + "arr-exclude": "1.0.0", + "execa": "0.7.0", + "has-yarn": "1.0.0", + "read-pkg-up": "2.0.0", + "write-pkg": "3.1.0" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "axios": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", + "requires": { + "follow-redirects": "1.4.1", + "is-buffer": "1.1.6" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.0", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.0", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "babel-generator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + } + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "dev": true, + "requires": { + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.4" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-espower": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-2.3.2.tgz", + "integrity": "sha1-VRa4/NsmyfDh2BYHSfbkxl5xJx4=", + "dev": true, + "requires": { + "babel-generator": "6.26.0", + "babylon": "6.18.0", + "call-matcher": "1.0.1", + "core-js": "2.5.1", + "espower-location-detector": "1.0.0", + "espurify": "1.7.0", + "estraverse": "4.2.0" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", + "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.1", + "home-or-tmp": "2.0.0", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "2.5.1", + "regenerator-runtime": "0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "binary-extensions": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz", + "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.2.0" + } + }, + "boxen": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.2.2.tgz", + "integrity": "sha1-Px1AMsMP/qnUsCwyLq8up0HcvOU=", + "dev": true, + "requires": { + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.1.0", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "1.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "buf-compare": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", + "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", + "dev": true + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "bytebuffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", + "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", + "requires": { + "long": "3.2.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "dev": true, + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + } + }, + "caching-transform": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz", + "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", + "dev": true, + "requires": { + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" + }, + "dependencies": { + "md5-hex": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", + "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + } + } + }, + "call-matcher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-matcher/-/call-matcher-1.0.1.tgz", + "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", + "dev": true, + "requires": { + "core-js": "2.5.1", + "deep-equal": "1.0.1", + "espurify": "1.7.0", + "estraverse": "4.2.0" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, + "call-signature": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/call-signature/-/call-signature-0.0.2.tgz", + "integrity": "sha1-qEq8glpV70yysCi9dOIFpluaSZY=" + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "2.1.1", + "map-obj": "1.0.1" + } + }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "catharsis": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", + "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", + "dev": true, + "requires": { + "underscore-contrib": "0.3.0" + } + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.1.2", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "ci-info": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.1.tgz", + "integrity": "sha512-vHDDF/bP9RYpTWtUhpJRhCFdvvp3iDWvEbuDbWgvjUrNGV1MXJrE0MPcwGtEled04m61iwdBLUIHZtDgzWS4ZQ==", + "dev": true + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "clean-stack": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-1.3.0.tgz", + "integrity": "sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=", + "dev": true + }, + "clean-yaml-object": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", + "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", + "dev": true + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cli-spinners": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.1.0.tgz", + "integrity": "sha1-8YR7FohE2RemceudFH499JfJDQY=", + "dev": true + }, + "cli-truncate": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-1.1.0.tgz", + "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", + "dev": true, + "requires": { + "slice-ansi": "1.0.0", + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "1.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "co-with-promise": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co-with-promise/-/co-with-promise-4.6.0.tgz", + "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", + "dev": true, + "requires": { + "pinkie-promise": "1.0.0" + }, + "dependencies": { + "pinkie": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", + "integrity": "sha1-Wkfyi6EBXQIBvae/DzWOR77Ix+Q=", + "dev": true + }, + "pinkie-promise": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", + "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", + "dev": true, + "requires": { + "pinkie": "1.0.0" + } + } + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "codecov": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.0.tgz", + "integrity": "sha1-wnO4xPEpRXI+jcnSWAPYk0Pl8o4=", + "dev": true, + "requires": { + "argv": "0.0.2", + "request": "2.81.0", + "urlgrey": "0.4.4" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + } + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "color-convert": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "colour": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", + "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "common-path-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-1.0.0.tgz", + "integrity": "sha1-zVL28HEuC6q5fW+XModPIvR3UsA=", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, + "concordance": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/concordance/-/concordance-3.0.0.tgz", + "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", + "dev": true, + "requires": { + "date-time": "2.1.0", + "esutils": "2.0.2", + "fast-diff": "1.1.2", + "function-name-support": "0.2.0", + "js-string-escape": "1.0.1", + "lodash.clonedeep": "4.5.0", + "lodash.flattendeep": "4.4.0", + "lodash.merge": "4.6.0", + "md5-hex": "2.0.0", + "semver": "5.4.1", + "well-known-symbols": "1.0.0" + } + }, + "configstore": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", + "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "dev": true, + "requires": { + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.1.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" + } + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true + }, + "convert-to-spaces": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", + "integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=", + "dev": true + }, + "cookiejar": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", + "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "core-assert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz", + "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", + "dev": true, + "requires": { + "buf-compare": "1.0.1", + "is-error": "2.2.1" + } + }, + "core-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "1.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "1.0.2" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "0.10.31" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "date-time": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", + "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", + "dev": true, + "requires": { + "time-zone": "1.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "1.0.0" + } + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.11" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + }, + "dependencies": { + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "diff": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", + "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "dev": true + }, + "diff-match-patch": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.0.tgz", + "integrity": "sha1-HMPIOkkNZ/ldkeOfatHy4Ia2MEg=" + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "requires": { + "arrify": "1.0.1", + "path-type": "3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "requires": { + "pify": "3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "doctrine": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", + "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", + "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", + "dev": true, + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.6.2.tgz", + "integrity": "sha1-GVjMC0yUJuntNn+xyOhUiRsPo/8=", + "dev": true, + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "1.0.1" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "duplexify": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", + "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", + "requires": { + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "stream-shift": "1.0.0" + } + }, + "eastasianwidth": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", + "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "requires": { + "base64url": "2.0.0", + "safe-buffer": "5.1.1" + } + }, + "empower": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", + "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", + "requires": { + "core-js": "2.5.1", + "empower-core": "0.6.2" + } + }, + "empower-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.0.1.tgz", + "integrity": "sha1-MeMQq8BluqfDoEh+a+W7zGXzwd4=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "empower-core": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-0.6.2.tgz", + "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", + "requires": { + "call-signature": "0.0.2", + "core-js": "2.5.1" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "1.4.0" + } + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, + "equal-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz", + "integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=", + "dev": true + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es5-ext": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.31.tgz", + "integrity": "sha1-e7k4yVp/G59ygJLcCcQe3MOY7v4=", + "dev": true, + "requires": { + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "es6-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.0.2.tgz", + "integrity": "sha1-7sXHJurO9Rt/a3PCDbbhsTsGnJg=", + "dev": true + }, + "es6-iterator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", + "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31", + "es6-symbol": "3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31", + "es6-iterator": "2.0.1", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31", + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31", + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "escallmatch": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/escallmatch/-/escallmatch-1.5.0.tgz", + "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", + "dev": true, + "requires": { + "call-matcher": "1.0.1", + "esprima": "2.7.3" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", + "integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==", + "dev": true, + "requires": { + "esprima": "3.1.3", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.5.7" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + } + } + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true, + "requires": { + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + } + }, + "eslint": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.8.0.tgz", + "integrity": "sha1-Ip7w41Tg5h2DfHqA/fuoJeGZgV4=", + "dev": true, + "requires": { + "ajv": "5.2.3", + "babel-code-frame": "6.26.0", + "chalk": "2.1.0", + "concat-stream": "1.6.0", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.0.0", + "eslint-scope": "3.7.1", + "espree": "3.5.1", + "esquery": "1.0.0", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "9.18.0", + "ignore": "3.3.5", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.0.0", + "js-yaml": "3.10.0", + "json-stable-stringify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "require-uncached": "1.0.3", + "semver": "5.4.1", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.2", + "text-table": "0.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "eslint-config-prettier": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.6.0.tgz", + "integrity": "sha1-8h2w67Q4rWePuYlGCXxLsZi+/Mw=", + "dev": true, + "requires": { + "get-stdin": "5.0.1" + }, + "dependencies": { + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "dev": true + } + } + }, + "eslint-plugin-node": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", + "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", + "dev": true, + "requires": { + "ignore": "3.3.7", + "minimatch": "3.0.4", + "resolve": "1.5.0", + "semver": "5.4.1" + }, + "dependencies": { + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", + "dev": true + }, + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + } + } + }, + "eslint-plugin-prettier": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz", + "integrity": "sha512-AV8shBlGN9tRZffj5v/f4uiQWlP3qiQ+lh+BhTqRLuKSyczx+HRWVkVZaf7dOmguxghAH1wftnou/JUEEChhGg==", + "dev": true, + "requires": { + "fast-diff": "1.1.2", + "jest-docblock": "21.2.0" + } + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + } + }, + "espower": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/espower/-/espower-2.1.0.tgz", + "integrity": "sha1-zh7bPZhwKEH99ZbRy46FvcSujkg=", + "dev": true, + "requires": { + "array-find": "1.0.0", + "escallmatch": "1.5.0", + "escodegen": "1.9.0", + "escope": "3.6.0", + "espower-location-detector": "1.0.0", + "espurify": "1.7.0", + "estraverse": "4.2.0", + "source-map": "0.5.7", + "type-name": "2.0.2", + "xtend": "4.0.1" + } + }, + "espower-loader": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/espower-loader/-/espower-loader-1.2.2.tgz", + "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", + "dev": true, + "requires": { + "convert-source-map": "1.5.0", + "espower-source": "2.2.0", + "minimatch": "3.0.4", + "source-map-support": "0.4.18", + "xtend": "4.0.1" + } + }, + "espower-location-detector": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/espower-location-detector/-/espower-location-detector-1.0.0.tgz", + "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", + "dev": true, + "requires": { + "is-url": "1.2.2", + "path-is-absolute": "1.0.1", + "source-map": "0.5.7", + "xtend": "4.0.1" + } + }, + "espower-source": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/espower-source/-/espower-source-2.2.0.tgz", + "integrity": "sha1-fgBSVa5HtcE2RIZEs/PYAtUD91I=", + "dev": true, + "requires": { + "acorn": "5.1.2", + "acorn-es7-plugin": "1.1.7", + "convert-source-map": "1.5.0", + "empower-assert": "1.0.1", + "escodegen": "1.9.0", + "espower": "2.1.0", + "estraverse": "4.2.0", + "merge-estraverse-visitors": "1.0.0", + "multi-stage-sourcemap": "0.2.1", + "path-is-absolute": "1.0.1", + "xtend": "4.0.1" + } + }, + "espree": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.1.tgz", + "integrity": "sha1-DJiLirRttTEAoZVK5LqZXd0n2H4=", + "dev": true, + "requires": { + "acorn": "5.1.2", + "acorn-jsx": "3.0.1" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "espurify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", + "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", + "requires": { + "core-js": "2.5.1" + } + }, + "esquery": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", + "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "dev": true, + "requires": { + "estraverse": "4.2.0", + "object-assign": "4.1.1" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.5.tgz", + "integrity": "sha512-Msjo64WT5W+NhOpQXh0nOHm+n0RfU1QUwDnKYvJ8dEJ8zlwLrqXNTv5mSUTJpepf41PDJGyhueTw2vNZW+Fr/w==", + "dev": true, + "requires": { + "iconv-lite": "0.4.19", + "jschardet": "1.5.1", + "tmp": "0.0.33" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "fast-diff": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", + "dev": true + }, + "fast-glob": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.0.tgz", + "integrity": "sha512-4F75PTznkNtSKs2pbhtBwRkw8sRwa7LfXx5XaQJOe4IQ6yTjceLDTwM5gj1s80R2t/5WeDC1gVfm3jLE+l39Tw==", + "requires": { + "@mrmlnc/readdir-enhanced": "2.2.1", + "glob-parent": "3.1.0", + "is-glob": "4.0.0", + "merge2": "1.2.1", + "micromatch": "3.1.9" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "braces": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "kind-of": "6.0.2", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "micromatch": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", + "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.1", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + } + } + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", + "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", + "dev": true, + "requires": { + "is-object": "1.0.1", + "merge-descriptors": "1.0.1" + } + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "1.0.1", + "make-dir": "1.1.0", + "pkg-dir": "2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "fn-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz", + "integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=", + "dev": true + }, + "follow-redirects": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", + "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", + "requires": { + "debug": "3.1.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "formatio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", + "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, + "formidable": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.1.1.tgz", + "integrity": "sha1-lriIb3w8NQi5Mta9cMTTqI818ak=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", + "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.7.0", + "node-pre-gyp": "0.6.36" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.36", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-name-support": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/function-name-support/-/function-name-support-0.2.0.tgz", + "integrity": "sha1-VdO/qm6v1QWlD5vIH99XVkoLsHE=", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gcp-metadata": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", + "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", + "requires": { + "axios": "0.18.0", + "extend": "3.0.1", + "retry-axios": "0.3.2" + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" + }, + "global-dirs": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.0.tgz", + "integrity": "sha1-ENNAOeDfBCcuJizyQiT3IJQ0308=", + "dev": true, + "requires": { + "ini": "1.3.4" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "google-gax": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.0.tgz", + "integrity": "sha512-sslPB7USGD8SrVUGlWFIGYVZrgZ6oj+fWUEW3f8Bk43+nxqeLyrNoI3iFBRpjLfwMCEYaXVziWNmatwLRP8azg==", + "requires": { + "duplexify": "3.5.4", + "extend": "3.0.1", + "globby": "8.0.1", + "google-auto-auth": "0.9.7", + "google-proto-files": "0.15.1", + "grpc": "1.9.1", + "is-stream-ended": "0.1.3", + "lodash": "4.17.4", + "protobufjs": "6.8.0", + "through2": "2.0.3" + }, + "dependencies": { + "globby": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", + "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "requires": { + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "fast-glob": "2.2.0", + "glob": "7.1.2", + "ignore": "3.3.5", + "pify": "3.0.0", + "slash": "1.0.0" + } + }, + "google-auth-library": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.3.2.tgz", + "integrity": "sha512-aRz0om4Bs85uyR2Ousk3Gb8Nffx2Sr2RoKts1smg1MhRwrehE1aD1HC4RmprNt1HVJ88IDnQ8biJQ/aXjiIxlQ==", + "requires": { + "axios": "0.18.0", + "gcp-metadata": "0.6.3", + "gtoken": "2.2.0", + "jws": "3.1.4", + "lodash.isstring": "4.0.1", + "lru-cache": "4.1.2", + "retry-axios": "0.3.2" + } + }, + "google-auto-auth": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", + "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "requires": { + "async": "2.5.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.3.2", + "request": "2.83.0" + } + }, + "google-p12-pem": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", + "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", + "requires": { + "node-forge": "0.7.4", + "pify": "3.0.0" + } + }, + "google-proto-files": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", + "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", + "requires": { + "globby": "7.1.1", + "power-assert": "1.4.4", + "protobufjs": "6.8.0" + }, + "dependencies": { + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "requires": { + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.5", + "pify": "3.0.0", + "slash": "1.0.0" + } + } + } + }, + "grpc": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.9.1.tgz", + "integrity": "sha512-WNW3MWMuAoo63AwIlzFE3T0KzzvNBSvOkg67Hm8WhvHNkXFBlIk1QyJRE3Ocm0O5eIwS7JU8Ssota53QR1zllg==", + "requires": { + "lodash": "4.17.4", + "nan": "2.7.0", + "node-pre-gyp": "0.6.39", + "protobufjs": "5.0.2" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.3" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "bundled": true + }, + "co": { + "version": "4.6.0", + "bundled": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true + }, + "extsprintf": { + "version": "1.3.0", + "bundled": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true + }, + "jsprim": { + "version": "1.4.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "mime-db": { + "version": "1.30.0", + "bundled": true + }, + "mime-types": { + "version": "2.1.17", + "bundled": true, + "requires": { + "mime-db": "1.30.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "requires": { + "detect-libc": "1.0.3", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.2", + "rc": "1.2.4", + "request": "2.81.0", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "2.2.1", + "tar-pack": "3.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true + }, + "protobufjs": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.2.tgz", + "integrity": "sha1-WXSNfc8D0tsiwT2p/rAk4Wq4DJE=", + "requires": { + "ascli": "1.0.1", + "bytebuffer": "5.0.1", + "glob": "7.1.2", + "yargs": "3.32.0" + } + }, + "punycode": { + "version": "1.4.1", + "bundled": true + }, + "qs": { + "version": "6.4.0", + "bundled": true + }, + "rc": { + "version": "1.2.4", + "bundled": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true + } + } + }, + "readable-stream": { + "version": "2.3.3", + "bundled": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true + }, + "semver": { + "version": "5.5.0", + "bundled": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.1", + "bundled": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.1", + "bundled": true, + "requires": { + "debug": "2.6.9", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.3.3", + "rimraf": "2.6.2", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.3", + "bundled": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "uuid": { + "version": "3.2.1", + "bundled": true + }, + "verror": { + "version": "1.10.0", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + } + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + } + } + }, + "gtoken": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.2.0.tgz", + "integrity": "sha512-tvQs8B1z5+I1FzMPZnq/OCuxTWFOkvy7cUJcpNdBOK2L7yEtPZTVCPtZU181sSDF+isUPebSqFTNTkIejFASAQ==", + "requires": { + "axios": "0.18.0", + "google-p12-pem": "1.0.2", + "jws": "3.1.4", + "mime": "2.2.0", + "pify": "3.0.0" + } + }, + "lru-cache": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "mime": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", + "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + }, + "node-forge": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.4.tgz", + "integrity": "sha512-8Df0906+tq/omxuCZD6PqhPaQDYuyJ1d+VITgxoIA8zvQd1ru+nMJcDChHH324MWitIgbVkAkQoGEEVJNpn/PA==" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "5.2.3", + "har-schema": "2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-color": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", + "dev": true + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.1.tgz", + "integrity": "sha512-JkaetveU7hFbqnAC1EV1sF4rlojU2D4Usc5CmS69l6NfmPDnpnFUegzFg33eDkkpNCxZ0mQp65HwUDrNFS/8MA==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "1.4.1" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "has-yarn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-1.0.0.tgz", + "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=", + "dev": true + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.0.2" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "htmlparser2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "dev": true, + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.4.1", + "domutils": "1.6.2", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "hullabaloo-config-manager": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/hullabaloo-config-manager/-/hullabaloo-config-manager-1.1.1.tgz", + "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", + "dev": true, + "requires": { + "dot-prop": "4.2.0", + "es6-error": "4.0.2", + "graceful-fs": "4.1.11", + "indent-string": "3.2.0", + "json5": "0.5.1", + "lodash.clonedeep": "4.5.0", + "lodash.clonedeepwith": "4.5.0", + "lodash.isequal": "4.5.0", + "lodash.merge": "4.6.0", + "md5-hex": "2.0.0", + "package-hash": "2.0.0", + "pkg-dir": "2.0.0", + "resolve-from": "3.0.0", + "safe-buffer": "5.1.1" + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "ignore": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.5.tgz", + "integrity": "sha512-JLH93mL8amZQhh/p6mfQgVBH3M6epNq3DfsXsTSuSrInVjwyYlFE1nv2AgfRCC8PoOhM0jwQ5v8s9LgbK7yGDw==" + }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "import-local": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-0.1.1.tgz", + "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", + "dev": true, + "requires": { + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "dev": true + }, + "ink-docstrap": { + "version": "git+https://github.com/docstrap/docstrap.git#f6585698b30598ce6dcb8fd2a7357f422a7d7094", + "dev": true, + "requires": { + "moment": "2.19.1", + "sanitize-html": "1.14.1" + } + }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "requires": { + "ansi-escapes": "3.0.0", + "chalk": "2.1.0", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.0.5", + "figures": "2.0.0", + "lodash": "4.17.4", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "intelli-espower-loader": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/intelli-espower-loader/-/intelli-espower-loader-1.0.1.tgz", + "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", + "dev": true, + "requires": { + "espower-loader": "1.2.2" + } + }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "dev": true, + "requires": { + "from2": "2.3.0", + "p-is-promise": "1.1.0" + } + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "irregular-plurals": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", + "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "1.10.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-ci": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", + "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", + "dev": true, + "requires": { + "ci-info": "1.1.1" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-error": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.1.tgz", + "integrity": "sha1-aEqW2EB2V3yY9M20DG0mpRI78Zw=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-generator-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", + "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "0.1.0", + "is-path-inside": "1.0.0" + } + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", + "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", + "dev": true, + "requires": { + "symbol-observable": "0.2.4" + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "requires": { + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-resolvable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", + "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", + "dev": true, + "requires": { + "tryit": "1.0.3" + } + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-stream-ended": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.3.tgz", + "integrity": "sha1-oEc7Jnx1ZjVIa+7cfjNE5UnRUqw=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-url": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.2.tgz", + "integrity": "sha1-SYkFpZO/R8wtnn9zg3K792lsfyY=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "1.4.1", + "is-object": "1.0.1" + } + }, + "jest-docblock": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", + "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==", + "dev": true + }, + "js-string-escape": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + } + }, + "js2xmlparser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", + "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", + "dev": true, + "requires": { + "xmlcreate": "1.0.2" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "jschardet": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.1.tgz", + "integrity": "sha512-vE2hT1D0HLZCLLclfBSfkfTTedhVj0fubHpJBHKwwUWX0nSbhPAfk+SG9rTX95BYNmau8rGFfCeaT6T5OW1C2A==", + "dev": true + }, + "jsdoc": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", + "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", + "dev": true, + "requires": { + "babylon": "7.0.0-beta.19", + "bluebird": "3.5.1", + "catharsis": "0.8.9", + "escape-string-regexp": "1.0.5", + "js2xmlparser": "3.0.0", + "klaw": "2.0.0", + "marked": "0.3.6", + "mkdirp": "0.5.1", + "requizzle": "0.2.1", + "strip-json-comments": "2.0.1", + "taffydb": "2.6.2", + "underscore": "1.8.3" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.19", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.19.tgz", + "integrity": "sha512-Vg0C9s/REX6/WIXN37UKpv5ZhRi6A4pjHlpkE34+8/a6c2W1Q692n3hmc+SZG5lKRnaExLUbxtJ1SVT+KaCQ/A==", + "dev": true + } + } + }, + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-extend": { + "version": "1.1.26", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.26.tgz", + "integrity": "sha512-IIG0FXHB/XpUZ7vGbktoc2EGsF+fLHJ1tU+vaqoKkVRBwH2FDxLTmkGkSp0XHRp6Y3KGZPIldH1YW8lOluGYrA==", + "dev": true + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "requires": { + "base64url": "2.0.0", + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.9", + "safe-buffer": "5.1.1" + } + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "requires": { + "base64url": "2.0.0", + "jwa": "1.1.5", + "safe-buffer": "5.1.1" + } + }, + "keyv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + }, + "klaw": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", + "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "last-line-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/last-line-stream/-/last-line-stream-1.0.0.tgz", + "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", + "dev": true, + "requires": { + "through2": "2.0.3" + } + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "4.0.1" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.clonedeepwith": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz", + "integrity": "sha1-buMFc6A6GmDWcKYu8zwQzxr9vdQ=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.merge": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz", + "integrity": "sha1-aYhLoUSsM/5plzemCG3v+t0PicU=" + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "make-dir": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", + "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "dev": true, + "requires": { + "pify": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "1.0.1" + } + }, + "marked": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", + "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=", + "dev": true + }, + "matcher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.0.0.tgz", + "integrity": "sha1-qvDEgW62m5IJRnQXViXzRmsOPhk=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "md5-hex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", + "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "md5-o-matic": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", + "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "1.1.0" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge-estraverse-visitors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/merge-estraverse-visitors/-/merge-estraverse-visitors-1.0.0.tgz", + "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "merge2": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.1.tgz", + "integrity": "sha512-wUqcG5pxrAcaFI1lkqkMnk3Q7nUxV/NWfpAFSeWUwG9TRODnBDCUHa75mi3o3vLWQ5N4CQERWCauSlP0I3ZqUg==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "dev": true + }, + "mimic-response": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.4.tgz", + "integrity": "sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA==", + "dev": true, + "requires": { + "browser-stdout": "1.3.1", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + }, + "dependencies": { + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + } + } + }, + "module-not-found-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", + "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", + "dev": true + }, + "moment": { + "version": "2.19.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.1.tgz", + "integrity": "sha1-VtoaLRy/AdOLfhr8McELz6GSkWc=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multi-stage-sourcemap": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/multi-stage-sourcemap/-/multi-stage-sourcemap-0.2.1.tgz", + "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", + "dev": true, + "requires": { + "source-map": "0.1.43" + }, + "dependencies": { + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", + "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nise": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.2.0.tgz", + "integrity": "sha512-q9jXh3UNsMV28KeqI43ILz5+c3l+RiNW8mhurEwCKckuHQbL+hTJIKKTiUlCPKlgQ/OukFvSnKB/Jk3+sFbkGA==", + "dev": true, + "requires": { + "formatio": "1.2.0", + "just-extend": "1.1.26", + "lolex": "1.6.0", + "path-to-regexp": "1.7.0", + "text-encoding": "0.6.4" + }, + "dependencies": { + "lolex": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", + "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + "dev": true + } + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "dev": true, + "requires": { + "prepend-http": "2.0.0", + "query-string": "5.1.1", + "sort-keys": "2.0.0" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "nyc": { + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.2.1.tgz", + "integrity": "sha1-rYUK/p261/SXByi0suR/7Rw4chw=", + "dev": true, + "requires": { + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.0", + "debug-log": "1.0.1", + "default-require-extensions": "1.0.0", + "find-cache-dir": "0.1.1", + "find-up": "2.1.0", + "foreground-child": "1.5.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.0.7", + "istanbul-lib-instrument": "1.8.0", + "istanbul-lib-report": "1.1.1", + "istanbul-lib-source-maps": "1.2.1", + "istanbul-reports": "1.1.2", + "md5-hex": "1.3.0", + "merge-source-map": "1.0.4", + "micromatch": "2.3.11", + "mkdirp": "0.5.1", + "resolve-from": "2.0.0", + "rimraf": "2.6.1", + "signal-exit": "3.0.2", + "spawn-wrap": "1.3.8", + "test-exclude": "4.1.1", + "yargs": "8.0.2", + "yargs-parser": "5.0.0" + }, + "dependencies": { + "align-text": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "append-transform": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "requires": { + "default-require-extensions": "1.0.0" + } + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "arrify": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "async": { + "version": "1.5.2", + "bundled": true, + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-generator": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "core-js": "2.5.1", + "regenerator-runtime": "0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.8", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "bundled": true, + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "bundled": true, + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "builtin-modules": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "caching-transform": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" + } + }, + "camelcase": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true + }, + "center-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "cliui": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "commondir": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.5.0", + "bundled": true, + "dev": true + }, + "core-js": { + "version": "2.5.1", + "bundled": true, + "dev": true + }, + "cross-spawn": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "which": "1.3.0" + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debug-log": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "default-require-extensions": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "strip-bom": "2.0.0" + } + }, + "detect-indent": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "esutils": { + "version": "2.0.2", + "bundled": true, + "dev": true + }, + "execa": { + "version": "0.7.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + } + } + }, + "expand-brackets": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "bundled": true, + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "extglob": { + "version": "0.3.2", + "bundled": true, + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "bundled": true, + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-cache-dir": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "requires": { + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "for-own": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "4.0.2", + "signal-exit": "3.0.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "globals": { + "version": "9.18.0", + "bundled": true, + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "handlebars": { + "version": "4.0.10", + "bundled": true, + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invariant": { + "version": "2.2.2", + "bundled": true, + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "is-buffer": { + "version": "1.1.5", + "bundled": true, + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "istanbul-lib-coverage": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.0.7", + "bundled": true, + "dev": true, + "requires": { + "append-transform": "0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.8.0", + "bundled": true, + "dev": true, + "requires": { + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.4.1" + } + }, + "istanbul-lib-report": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "debug": "2.6.8", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.1", + "source-map": "0.5.7" + } + }, + "istanbul-reports": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "handlebars": "4.0.10" + } + }, + "js-tokens": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + }, + "lodash": { + "version": "4.17.4", + "bundled": true, + "dev": true + }, + "longest": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "lru-cache": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "md5-hex": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "md5-o-matic": "0.1.1" + } + }, + "md5-o-matic": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "mem": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "mimic-fn": "1.1.0" + } + }, + "merge-source-map": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "micromatch": { + "version": "2.3.11", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mimic-fn": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "object.omit": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "1.1.0" + } + }, + "parse-glob": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "path-exists": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "path-type": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "bundled": true, + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "bundled": true, + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "pkg-dir": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "1.1.2" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "preserve": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "read-pkg": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "regenerator-runtime": { + "version": "0.11.0", + "bundled": true, + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "bundled": true, + "dev": true + }, + "repeating": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "resolve-from": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "right-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "semver": { + "version": "5.4.1", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "source-map": { + "version": "0.5.7", + "bundled": true, + "dev": true + }, + "spawn-wrap": { + "version": "1.3.8", + "bundled": true, + "dev": true, + "requires": { + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.1", + "signal-exit": "3.0.2", + "which": "1.3.0" + } + }, + "spdx-correct": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "bundled": true, + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "test-exclude": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "arrify": "1.0.1", + "micromatch": "2.3.11", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + } + }, + "to-fast-properties": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "yargs": { + "version": "3.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "which": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "window-size": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "bundled": true, + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + }, + "y18n": { + "version": "3.2.1", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "8.0.2", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "cliui": { + "version": "3.2.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "load-json-file": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "path-type": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "yargs-parser": { + "version": "7.0.0", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + } + } + }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "observable-to-promise": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/observable-to-promise/-/observable-to-promise-0.5.0.tgz", + "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", + "dev": true, + "requires": { + "is-observable": "0.2.0", + "symbol-observable": "1.0.4" + }, + "dependencies": { + "symbol-observable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", + "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=", + "dev": true + } + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "1.1.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + } + }, + "option-chain": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/option-chain/-/option-chain-1.0.0.tgz", + "integrity": "sha1-k41zvU4Xg/lI00AjZEraI2aeMPI=", + "dev": true + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "optjs": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", + "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.1.0" + } + }, + "package-hash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-2.0.0.tgz", + "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "lodash.flattendeep": "4.4.0", + "md5-hex": "2.0.0", + "release-zalgo": "1.0.0" + } + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "6.7.1", + "registry-auth-token": "3.3.1", + "registry-url": "3.1.0", + "semver": "5.4.1" + }, + "dependencies": { + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" + } + } + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "parse-ms": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", + "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "pkg-conf": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.0.0.tgz", + "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "load-json-file": "2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + } + }, + "plur": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "dev": true, + "requires": { + "irregular-plurals": "1.4.0" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "power-assert": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.4.4.tgz", + "integrity": "sha1-kpXqdDcZb1pgH95CDwQmMRhtdRc=", + "requires": { + "define-properties": "1.1.2", + "empower": "1.2.3", + "power-assert-formatter": "1.4.1", + "universal-deep-strict-equal": "1.2.2", + "xtend": "4.0.1" + } + }, + "power-assert-context-formatter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.1.1.tgz", + "integrity": "sha1-7bo1LT7YpgMRTWZyZazOYNaJzN8=", + "requires": { + "core-js": "2.5.1", + "power-assert-context-traversal": "1.1.1" + } + }, + "power-assert-context-reducer-ast": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.1.2.tgz", + "integrity": "sha1-SEqZ4m9Jc/+IMuXFzHVnAuYJQXQ=", + "requires": { + "acorn": "4.0.13", + "acorn-es7-plugin": "1.1.7", + "core-js": "2.5.1", + "espurify": "1.7.0", + "estraverse": "4.2.0" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + } + } + }, + "power-assert-context-traversal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.1.1.tgz", + "integrity": "sha1-iMq8oNE7Y1nwfT0+ivppkmRXftk=", + "requires": { + "core-js": "2.5.1", + "estraverse": "4.2.0" + } + }, + "power-assert-formatter": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", + "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", + "requires": { + "core-js": "2.5.1", + "power-assert-context-formatter": "1.1.1", + "power-assert-context-reducer-ast": "1.1.2", + "power-assert-renderer-assertion": "1.1.1", + "power-assert-renderer-comparison": "1.1.1", + "power-assert-renderer-diagram": "1.1.2", + "power-assert-renderer-file": "1.1.1" + } + }, + "power-assert-renderer-assertion": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.1.1.tgz", + "integrity": "sha1-y/wOd+AIao+Wrz8djme57n4ozpg=", + "requires": { + "power-assert-renderer-base": "1.1.1", + "power-assert-util-string-width": "1.1.1" + } + }, + "power-assert-renderer-base": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-renderer-base/-/power-assert-renderer-base-1.1.1.tgz", + "integrity": "sha1-lqZQxv0F7hvB9mtUrWFELIs/Y+s=" + }, + "power-assert-renderer-comparison": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.1.1.tgz", + "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", + "requires": { + "core-js": "2.5.1", + "diff-match-patch": "1.0.0", + "power-assert-renderer-base": "1.1.1", + "stringifier": "1.3.0", + "type-name": "2.0.2" + } + }, + "power-assert-renderer-diagram": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.1.2.tgz", + "integrity": "sha1-ZV+PcRk1qbbVQbhjJ2VHF8Y3qYY=", + "requires": { + "core-js": "2.5.1", + "power-assert-renderer-base": "1.1.1", + "power-assert-util-string-width": "1.1.1", + "stringifier": "1.3.0" + } + }, + "power-assert-renderer-file": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.1.1.tgz", + "integrity": "sha1-o34rvReMys0E5427eckv40kzxec=", + "requires": { + "power-assert-renderer-base": "1.1.1" + } + }, + "power-assert-util-string-width": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.1.1.tgz", + "integrity": "sha1-vmWet5N/3S5smncmjar2S9W3xZI=", + "requires": { + "eastasianwidth": "0.1.1" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "prettier": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.7.4.tgz", + "integrity": "sha1-XoYkrpNjyA+V7GRFhOzfVddPk/o=", + "dev": true + }, + "pretty-ms": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.0.1.tgz", + "integrity": "sha1-fBi3PCKKm49u3Cg1oSy49+2F+fQ=", + "dev": true, + "requires": { + "parse-ms": "1.0.1", + "plur": "2.1.2" + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "protobufjs": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.0.tgz", + "integrity": "sha512-47Y49f5JN5Qsbxas2TyI2zFO8j9GpQAQm5thf54fr2O8qcP/jkIXYxmYx1hN2WQFAhESU1xpVn5NWVDBB8WFnw==", + "requires": { + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/base64": "1.1.2", + "@protobufjs/codegen": "2.0.4", + "@protobufjs/eventemitter": "1.1.0", + "@protobufjs/fetch": "1.1.0", + "@protobufjs/float": "1.0.2", + "@protobufjs/inquire": "1.1.0", + "@protobufjs/path": "1.1.2", + "@protobufjs/pool": "1.1.0", + "@protobufjs/utf8": "1.1.0", + "@types/long": "3.0.32", + "@types/node": "7.0.43", + "long": "3.2.0" + } + }, + "proxyquire": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-1.8.0.tgz", + "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", + "dev": true, + "requires": { + "fill-keys": "1.0.2", + "module-not-found-error": "1.0.1", + "resolve": "1.1.7" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "requires": { + "decode-uri-component": "0.2.0", + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" + } + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "rc": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", + "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", + "dev": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.3", + "set-immediate-shim": "1.0.1" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + }, + "dependencies": { + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + } + } + }, + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==", + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } + }, + "regexp-quote": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/regexp-quote/-/regexp-quote-0.0.0.tgz", + "integrity": "sha1-Hg9GUMhi3L/tVP1CsUjpuxch/PI=", + "dev": true + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "1.3.3", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + } + }, + "registry-auth-token": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", + "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "dev": true, + "requires": { + "rc": "1.2.2", + "safe-buffer": "5.1.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "1.2.2" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "0.5.0" + } + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "4.0.2" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "require-precompiled": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/require-precompiled/-/require-precompiled-0.1.0.tgz", + "integrity": "sha1-WhtS63Dr7UPrmC6XTIWrWVceVvo=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + }, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + } + } + }, + "requizzle": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", + "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, + "retry-axios": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-0.3.2.tgz", + "integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ==" + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "2.1.0" + } + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "4.0.8" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "0.1.15" + } + }, + "samsam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", + "dev": true + }, + "sanitize-html": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.14.1.tgz", + "integrity": "sha1-cw/6Ikm98YMz7/5FsoYXPJxa0Lg=", + "dev": true, + "requires": { + "htmlparser2": "3.9.2", + "regexp-quote": "0.0.0", + "xtend": "4.0.1" + } + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "5.4.1" + } + }, + "serialize-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", + "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "requires": { + "kind-of": "3.2.2" + } + }, + "sntp": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.0.2.tgz", + "integrity": "sha1-UGQRDwr4X3z9t9a2ekACjOUrSys=", + "requires": { + "hoek": "4.2.0" + } + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "1.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", + "requires": { + "atob": "2.0.3", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "3.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "stack-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/string/-/string-3.3.3.tgz", + "integrity": "sha1-XqIRzZLSKOGEKUmQpsyXs2anfLA=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringifier": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", + "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", + "requires": { + "core-js": "2.5.1", + "traverse": "0.6.6", + "type-name": "2.0.2" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-bom-buf": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", + "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "superagent": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.0.tgz", + "integrity": "sha512-71XGWgtn70TNwgmgYa69dPOYg55aU9FCahjUNY03rOrKvaTCaU3b9MeZmqonmf9Od96SCxr3vGfEAnhM7dtxCw==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "cookiejar": "2.1.1", + "debug": "3.1.0", + "extend": "3.0.1", + "form-data": "2.3.1", + "formidable": "1.1.1", + "methods": "1.1.2", + "mime": "1.4.1", + "qs": "6.5.1", + "readable-stream": "2.3.3" + } + }, + "supertap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supertap/-/supertap-1.0.0.tgz", + "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", + "dev": true, + "requires": { + "arrify": "1.0.1", + "indent-string": "3.2.0", + "js-yaml": "3.10.0", + "serialize-error": "2.1.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "supertest": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.0.0.tgz", + "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", + "dev": true, + "requires": { + "methods": "1.1.2", + "superagent": "3.8.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + }, + "symbol-observable": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", + "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", + "dev": true + }, + "table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "dev": true, + "requires": { + "ajv": "5.2.3", + "ajv-keywords": "2.1.0", + "chalk": "2.1.0", + "lodash": "4.17.4", + "slice-ansi": "1.0.0", + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "0.7.0" + } + }, + "text-encoding": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, + "time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "3.2.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + } + } + } + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "requires": { + "punycode": "1.4.1" + } + }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tryit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", + "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/type-name/-/type-name-2.0.2.tgz", + "integrity": "sha1-7+fUEj2KxSr/9/QMfk3sUmYAj7Q=" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uid2": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz", + "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I=", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "underscore-contrib": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", + "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "1.0.0" + } + }, + "unique-temp-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz", + "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", + "dev": true, + "requires": { + "mkdirp": "0.5.1", + "os-tmpdir": "1.0.2", + "uid2": "0.0.3" + } + }, + "universal-deep-strict-equal": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", + "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", + "requires": { + "array-filter": "1.0.0", + "indexof": "0.0.1", + "object-keys": "1.0.11" + } + }, + "universalify": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "update-notifier": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", + "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", + "dev": true, + "requires": { + "boxen": "1.2.2", + "chalk": "2.1.0", + "configstore": "3.1.1", + "import-lazy": "2.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "1.0.4" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "urlgrey": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz", + "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=", + "dev": true + }, + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "well-known-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-1.0.0.tgz", + "integrity": "sha1-c8eK6Bp3Jqj6WY4ogIAcixYiVRg=", + "dev": true + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "widest-line": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", + "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", + "dev": true, + "requires": { + "string-width": "1.0.2" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" + } + }, + "write-json-file": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz", + "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", + "dev": true, + "requires": { + "detect-indent": "5.0.0", + "graceful-fs": "4.1.11", + "make-dir": "1.1.0", + "pify": "3.0.0", + "sort-keys": "2.0.0", + "write-file-atomic": "2.3.0" + }, + "dependencies": { + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "write-pkg": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.1.0.tgz", + "integrity": "sha1-AwqZlMyZk9JbTnWp8aGSNgcpHOk=", + "dev": true, + "requires": { + "sort-keys": "2.0.0", + "write-json-file": "2.3.0" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "xmlcreate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz", + "integrity": "sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" + } + } + } +} diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 3b35f3e04bd..6ee8922297d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -31,6 +31,7 @@ ], "contributors": [ "Ace Nassri ", + "Alexander Fenster ", "Amy ", "Dave Gramlich ", "Eric Uldall ", @@ -63,7 +64,7 @@ "lodash.merge": "^4.6.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.1.0", + "@google-cloud/nodejs-repo-tools": "^2.2.3", "async": "^2.5.0", "codecov": "^3.0.0", "eslint": "^4.8.0", diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 35e305b9bb9..916dc6b8eb0 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -42,6 +42,8 @@ Commands: analyze.v1.js entity-sentiment-text Detects sentiment of the entities in a string. analyze.v1.js entity-sentiment-file Detects sentiment of the entities in a file in Google Cloud Storage. + analyze.v1.js classify-text Classifies text of a string. + analyze.v1.js classify-file Classifies text in a file in Google Cloud Storage. Options: --version Show version number [boolean] @@ -56,6 +58,8 @@ Examples: node analyze.v1.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt node analyze.v1.js entity-sentiment-text "President Obama is speaking at the White House." node analyze.v1.js entity-sentiment-file my-bucket file.txt Detects sentiment of entities in gs://my-bucket/file.txt + node analyze.v1.js classify-text "Android is a mobile operating system developed by Google." + node analyze.v1.js classify-file my-bucket android_text.txt Detects syntax in gs://my-bucket/android_text.txt For more information, see https://cloud.google.com/natural-language/docs ``` @@ -105,5 +109,5 @@ For more information, see https://cloud.google.com/natural-language/docs [analyze-v1beta2_1_docs]: https://cloud.google.com/natural-language/docs/ [analyze-v1beta2_1_code]: analyze.v1beta2.js -[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_img]: //gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index bcb2001bcdf..2dcb50c319f 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -24,7 +24,7 @@ "yargs": "10.0.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.1.0", + "@google-cloud/nodejs-repo-tools": "2.2.3", "ava": "0.23.0", "proxyquire": "1.8.0", "sinon": "4.0.2", From f33ad437d7f0d9b26e49c336323906c66f057768 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Tue, 20 Mar 2018 07:48:05 +1300 Subject: [PATCH 124/488] v1.2.0 (#42) --- packages/google-cloud-language/package-lock.json | 2 +- packages/google-cloud-language/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index a576b6ef050..375c5cb9227 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/language", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6ee8922297d..2f4c7bfae88 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "1.1.0", + "version": "1.2.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { From 8a4fa9098f656585097823ad67a53dd2ed0b2b48 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 19 Mar 2018 18:30:28 -0700 Subject: [PATCH 125/488] chore: setup nighty build in CircleCI (#43) * chore: setup nighty build in CircleCI * chore: setup nighty build in CircleCI --- .../.circleci/config.yml | 48 +++++++------ .../.circleci/get_workflow_name.py | 67 +++++++++++++++++++ 2 files changed, 96 insertions(+), 19 deletions(-) create mode 100644 packages/google-cloud-language/.circleci/get_workflow_name.py diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index fc5d460ee8e..ac5dc20ac46 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -1,21 +1,8 @@ -unit_tests: - steps: &unit_tests - - checkout - - run: - name: Install modules and dependencies. - command: npm install - - run: - name: Run unit tests. - command: npm test - - run: - name: Submit coverage data to codecov. - command: node_modules/.bin/codecov - when: always version: 2 workflows: version: 2 tests: - jobs: + jobs: &workflow_jobs - node4: filters: tags: @@ -77,15 +64,34 @@ workflows: ignore: /.*/ tags: only: '/^v[\d.]+$/' + nightly: + triggers: + - schedule: + cron: 0 7 * * * + filters: + branches: + only: master + jobs: *workflow_jobs jobs: node4: docker: - image: 'node:4' - steps: + steps: &unit_tests_steps - checkout + - run: &remove_package_lock + name: Remove package-lock.json if needed. + command: | + WORKFLOW_NAME=`python .circleci/get_workflow_name.py` + echo "Workflow name: $WORKFLOW_NAME" + if [ "$WORKFLOW_NAME" = "nightly" ]; then + echo "Nightly build detected, removing package-lock.json." + rm -f package-lock.json samples/package-lock.json + else + echo "Not a nightly build, skipping this step." + fi - run: name: Install modules and dependencies. - command: npm install --unsafe-perm + command: npm install - run: name: Run unit tests. command: npm test @@ -96,20 +102,21 @@ jobs: node6: docker: - image: 'node:6' - steps: *unit_tests + steps: *unit_tests_steps node8: docker: - image: 'node:8' - steps: *unit_tests + steps: *unit_tests_steps node9: docker: - image: 'node:9' - steps: *unit_tests + steps: *unit_tests_steps lint: docker: - image: 'node:8' steps: - checkout + - run: *remove_package_lock - run: name: Install modules and dependencies. command: | @@ -130,6 +137,7 @@ jobs: - image: 'node:8' steps: - checkout + - run: *remove_package_lock - run: name: Install modules and dependencies. command: npm install @@ -141,6 +149,7 @@ jobs: - image: 'node:8' steps: - checkout + - run: *remove_package_lock - run: name: Decrypt credentials. command: | @@ -175,6 +184,7 @@ jobs: - image: 'node:8' steps: - checkout + - run: *remove_package_lock - run: name: Decrypt credentials. command: | diff --git a/packages/google-cloud-language/.circleci/get_workflow_name.py b/packages/google-cloud-language/.circleci/get_workflow_name.py new file mode 100644 index 00000000000..ff6b58fd24f --- /dev/null +++ b/packages/google-cloud-language/.circleci/get_workflow_name.py @@ -0,0 +1,67 @@ +# Copyright 2018 Google LLC +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Get workflow name for the current build using CircleCI API. +Would be great if this information is available in one of +CircleCI environment variables, but it's not there. +https://circleci.ideas.aha.io/ideas/CCI-I-295 +""" + +import json +import os +import sys +import urllib2 + + +def main(): + try: + username = os.environ['CIRCLE_PROJECT_USERNAME'] + reponame = os.environ['CIRCLE_PROJECT_REPONAME'] + build_num = os.environ['CIRCLE_BUILD_NUM'] + except: + sys.stderr.write( + 'Looks like we are not inside CircleCI container. Exiting...\n') + return 1 + + try: + request = urllib2.Request( + "https://circleci.com/api/v1.1/project/github/%s/%s/%s" % + (username, reponame, build_num), + headers={"Accept": "application/json"}) + contents = urllib2.urlopen(request).read() + except: + sys.stderr.write('Cannot query CircleCI API. Exiting...\n') + return 1 + + try: + build_info = json.loads(contents) + except: + sys.stderr.write( + 'Cannot parse JSON received from CircleCI API. Exiting...\n') + return 1 + + try: + workflow_name = build_info['workflows']['workflow_name'] + except: + sys.stderr.write( + 'Cannot get workflow name from CircleCI build info. Exiting...\n') + return 1 + + print workflow_name + return 0 + + +retval = main() +exit(retval) From 5af61056ed88554e24df5ef5c5aa5857c5de19ef Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 20 Mar 2018 16:39:23 -0700 Subject: [PATCH 126/488] chore: make samples depend on the current version (#44) * chore: make samples depend on the current version * chore: make samples depend on the current version --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 2dcb50c319f..872923e346f 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -19,7 +19,7 @@ "test": "repo-tools test run --cmd npm -- run cover" }, "dependencies": { - "@google-cloud/language": "1.1.0", + "@google-cloud/language": "1.2.0", "@google-cloud/storage": "1.4.0", "yargs": "10.0.3" }, From ae3a819d0ee362d9d285c5e5f6324be19460ee88 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 27 Mar 2018 18:09:52 -0700 Subject: [PATCH 127/488] chore: workaround for repo-tools EPERM (#45) --- .../google-cloud-language/.circleci/config.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index ac5dc20ac46..a7716baa8d1 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -91,7 +91,12 @@ jobs: fi - run: name: Install modules and dependencies. - command: npm install + command: |- + npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi - run: name: Run unit tests. command: npm test @@ -121,6 +126,10 @@ jobs: name: Install modules and dependencies. command: | npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi npm link - run: name: Link the module being tested to the samples. @@ -140,7 +149,12 @@ jobs: - run: *remove_package_lock - run: name: Install modules and dependencies. - command: npm install + command: |- + npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi - run: name: Build documentation. command: npm run docs From 7c2f56b539f199cb04989027b49c22fb8a9c79ca Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 28 Mar 2018 18:42:29 -0700 Subject: [PATCH 128/488] chore: one more workaround for repo-tools EPERM (#46) --- packages/google-cloud-language/.circleci/config.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index a7716baa8d1..74c3b1aa3d9 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -174,6 +174,10 @@ jobs: name: Install and link the module. command: | npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi npm link - run: name: Link the module being tested to the samples. @@ -207,7 +211,12 @@ jobs: -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - run: name: Install modules and dependencies. - command: npm install + command: |- + npm install + repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" + if ! test -x "$repo_tools"; then + chmod +x "$repo_tools" + fi - run: name: Run system tests. command: npm run system-test From 01b10cd2e2e052451b8eb8fd7b72ec38cfb8a539 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 2 May 2018 08:30:59 -0700 Subject: [PATCH 129/488] chore: lock files maintenance (#48) * chore: lock files maintenance * chore: lock files maintenance --- .../google-cloud-language/package-lock.json | 9952 +++++++++-------- 1 file changed, 5252 insertions(+), 4700 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index 375c5cb9227..f40820272cb 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -21,7 +21,7 @@ "babel-plugin-transform-async-to-generator": "6.24.1", "babel-plugin-transform-es2015-destructuring": "6.23.0", "babel-plugin-transform-es2015-function-name": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", "babel-plugin-transform-es2015-parameters": "6.24.1", "babel-plugin-transform-es2015-spread": "6.22.0", "babel-plugin-transform-es2015-sticky-regex": "6.24.1", @@ -57,7 +57,7 @@ "dev": true, "requires": { "@ava/babel-plugin-throws-helper": "2.0.0", - "babel-plugin-espower": "2.3.2" + "babel-plugin-espower": "2.4.0" } }, "@ava/write-file-atomic": { @@ -81,9 +81,9 @@ } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.2.3.tgz", - "integrity": "sha512-O6OVc8lKiLL8Qtoc1lVAynf5pJT550fHZcW33a7oQ7TMNkrTHPgeoYw4esi4KSbDRn8gV+cfefnkgqxXmr+KzA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.0.tgz", + "integrity": "sha512-c8dIGESnNkmM88duFxGHvMQP5QKPgp/sfJq0QhC6+gOcJC7/PKjqd0PkmgPPeIgVl6SXy5Zf/KLbxnJUVgNT1Q==", "dev": true, "requires": { "ava": "0.25.0", @@ -94,6 +94,7 @@ "lodash": "4.17.5", "nyc": "11.4.1", "proxyquire": "1.8.0", + "semver": "5.5.0", "sinon": "4.3.0", "string": "3.3.3", "supertest": "3.0.0", @@ -101,119 +102,16 @@ "yargs-parser": "9.0.2" }, "dependencies": { - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", - "dev": true - }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "ava": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/ava/-/ava-0.25.0.tgz", - "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", - "dev": true, - "requires": { - "@ava/babel-preset-stage-4": "1.1.0", - "@ava/babel-preset-transform-test-files": "3.0.0", - "@ava/write-file-atomic": "2.2.0", - "@concordance/react": "1.0.0", - "@ladjs/time-require": "0.1.4", - "ansi-escapes": "3.0.0", - "ansi-styles": "3.2.0", - "arr-flatten": "1.1.0", - "array-union": "1.0.2", - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "auto-bind": "1.1.0", - "ava-init": "0.2.1", - "babel-core": "6.26.0", - "babel-generator": "6.26.0", - "babel-plugin-syntax-object-rest-spread": "6.13.0", - "bluebird": "3.5.1", - "caching-transform": "1.0.1", - "chalk": "2.1.0", - "chokidar": "1.7.0", - "clean-stack": "1.3.0", - "clean-yaml-object": "0.1.0", - "cli-cursor": "2.1.0", - "cli-spinners": "1.1.0", - "cli-truncate": "1.1.0", - "co-with-promise": "4.6.0", - "code-excerpt": "2.1.1", - "common-path-prefix": "1.0.0", - "concordance": "3.0.0", - "convert-source-map": "1.5.1", - "core-assert": "0.2.1", - "currently-unhandled": "0.4.1", - "debug": "3.1.0", - "dot-prop": "4.2.0", - "empower-core": "0.6.2", - "equal-length": "1.0.1", - "figures": "2.0.0", - "find-cache-dir": "1.0.0", - "fn-name": "2.0.1", - "get-port": "3.2.0", - "globby": "6.1.0", - "has-flag": "2.0.0", - "hullabaloo-config-manager": "1.1.1", - "ignore-by-default": "1.0.1", - "import-local": "0.1.1", - "indent-string": "3.2.0", - "is-ci": "1.0.10", - "is-generator-fn": "1.0.0", - "is-obj": "1.0.1", - "is-observable": "1.1.0", - "is-promise": "2.1.0", - "last-line-stream": "1.0.0", - "lodash.clonedeepwith": "4.5.0", - "lodash.debounce": "4.0.8", - "lodash.difference": "4.5.0", - "lodash.flatten": "4.4.0", - "loud-rejection": "1.6.0", - "make-dir": "1.1.0", - "matcher": "1.0.0", - "md5-hex": "2.0.0", - "meow": "3.7.0", - "ms": "2.0.0", - "multimatch": "2.1.0", - "observable-to-promise": "0.5.0", - "option-chain": "1.0.0", - "package-hash": "2.0.0", - "pkg-conf": "2.0.0", - "plur": "2.1.2", - "pretty-ms": "3.0.1", - "require-precompiled": "0.1.0", - "resolve-cwd": "2.0.0", - "safe-buffer": "5.1.1", - "semver": "5.4.1", - "slash": "1.0.0", - "source-map-support": "0.5.4", - "stack-utils": "1.0.1", - "strip-ansi": "4.0.0", - "strip-bom-buf": "1.0.0", - "supertap": "1.0.0", - "supports-color": "5.3.0", - "trim-off-newlines": "1.0.1", - "unique-temp-dir": "1.0.0", - "update-notifier": "2.3.0" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, "cliui": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", - "integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { "string-width": "2.1.1", @@ -221,84 +119,18 @@ "wrap-ansi": "2.1.0" } }, - "code-excerpt": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-2.1.1.tgz", - "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", - "dev": true, - "requires": { - "convert-to-spaces": "1.0.2" - } - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" - } - }, - "got": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/got/-/got-8.2.0.tgz", - "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", - "dev": true, - "requires": { - "@sindresorhus/is": "0.7.0", - "cacheable-request": "2.1.4", - "decompress-response": "3.3.0", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "into-stream": "3.1.0", - "is-retry-allowed": "1.1.0", - "isurl": "1.0.0", - "lowercase-keys": "1.0.0", - "mimic-response": "1.0.0", - "p-cancelable": "0.3.0", - "p-timeout": "2.0.1", - "pify": "3.0.0", - "safe-buffer": "5.1.1", - "timed-out": "4.0.1", - "url-parse-lax": "3.0.0", - "url-to-options": "1.0.1" - } - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "is-observable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", - "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", - "dev": true, - "requires": { - "symbol-observable": "1.2.0" - } - }, "lodash": { "version": "4.17.5", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", "dev": true }, - "lolex": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", - "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==", - "dev": true - }, "nyc": { "version": "11.4.1", "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", @@ -1904,57 +1736,6 @@ "mem": "1.1.0" } }, - "p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", - "dev": true, - "requires": { - "p-finally": "1.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "sinon": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.3.0.tgz", - "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", - "dev": true, - "requires": { - "@sinonjs/formatio": "2.0.0", - "diff": "3.4.0", - "lodash.get": "4.4.2", - "lolex": "2.3.2", - "nise": "1.2.0", - "supports-color": "5.3.0", - "type-detect": "4.0.8" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.4.tgz", - "integrity": "sha512-PETSPG6BjY1AHs2t64vS2aqAgu6dMIMXJULWFBGbh2Gr8nVLbCFDo6i/RMMvviIQ2h1Z8+5gQhVKSn2je9nmdg==", - "dev": true, - "requires": { - "source-map": "0.6.1" - } - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -1974,51 +1755,13 @@ "ansi-regex": "3.0.0" } }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "dev": true, - "requires": { - "has-flag": "3.0.0" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - } - } - }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "requires": { - "prepend-http": "2.0.0" - } - }, "yargs": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "dev": true, "requires": { - "cliui": "4.0.0", + "cliui": "4.1.0", "decamelize": "1.2.0", "find-up": "2.1.0", "get-caller-file": "1.0.2", @@ -2031,15 +1774,6 @@ "y18n": "3.2.1", "yargs-parser": "9.0.2" } - }, - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "dev": true, - "requires": { - "camelcase": "4.1.0" - } } } }, @@ -2072,18 +1806,6 @@ "strip-ansi": "0.1.1" } }, - "date-time": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/date-time/-/date-time-0.1.1.tgz", - "integrity": "sha1-7S9tk9l5DOL9ZtW1/z7dW7y/Owc=", - "dev": true - }, - "parse-ms": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-0.1.2.tgz", - "integrity": "sha1-3T+iXtbC78e93hKtm0bBY6opIk4=", - "dev": true - }, "pretty-ms": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-0.2.2.tgz", @@ -2185,15 +1907,14 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "7.0.43", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz", - "integrity": "sha512-7scYwwfHNppXvH/9JzakbVxk0o0QUILVk1Lv64GRaxwPuGpnF1QBiwdvhDpLcymb8BpomQL3KYoWKq3wUdDMhQ==" + "version": "8.10.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.11.tgz", + "integrity": "sha512-FM7tvbjbn2BUzM/Qsdk9LUGq3zeh7li8NcHoS398dBzqLzfmSqSP1+yKbMRTCcZzLcu2JAR5lq3IKIEYkto7iQ==" }, "acorn": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", - "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==", - "dev": true + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" }, "acorn-es7-plugin": { "version": "1.1.7", @@ -2218,20 +1939,20 @@ } }, "ajv": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz", - "integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "json-schema-traverse": "0.3.1", - "json-stable-stringify": "1.0.1" + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ajv-keywords": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.0.tgz", - "integrity": "sha1-opbhf3v658HOT34N5T0pyzIWLfA=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", "dev": true }, "align-text": { @@ -2243,6 +1964,17 @@ "kind-of": "3.2.2", "longest": "1.0.1", "repeat-string": "1.6.1" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } } }, "amdefine": { @@ -2293,18 +2025,24 @@ } } }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.0" + "color-convert": "1.9.1" } }, "anymatch": { @@ -2315,12 +2053,103 @@ "requires": { "micromatch": "2.3.11", "normalize-path": "2.1.1" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + } } }, "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "1.0.3" @@ -2333,13 +2162,9 @@ "dev": true }, "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "1.1.0" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, "arr-exclude": { "version": "1.0.0", @@ -2394,10 +2219,9 @@ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" }, "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "arrify": { "version": "1.0.1", @@ -2429,11 +2253,11 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { - "lodash": "4.17.4" + "lodash": "4.17.10" } }, "async-each": { @@ -2448,40 +2272,191 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", - "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, "auto-bind": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.1.0.tgz", - "integrity": "sha1-k7hk3H7gGjJigXddXHXKCnUeWWE=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.0.tgz", + "integrity": "sha512-Zw7pZp7tztvKnWWtoII4AmqH5a2PV3ZN5F0BPRTGcc1kpRm4b6QXQnPU7Znbl6BfPfqOVOV29g4JeMqZQaqqOA==", "dev": true }, - "ava-init": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ava-init/-/ava-init-0.2.1.tgz", - "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", + "ava": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/ava/-/ava-0.25.0.tgz", + "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", "dev": true, "requires": { - "arr-exclude": "1.0.0", - "execa": "0.7.0", - "has-yarn": "1.0.0", - "read-pkg-up": "2.0.0", - "write-pkg": "3.1.0" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" - }, - "axios": { + "@ava/babel-preset-stage-4": "1.1.0", + "@ava/babel-preset-transform-test-files": "3.0.0", + "@ava/write-file-atomic": "2.2.0", + "@concordance/react": "1.0.0", + "@ladjs/time-require": "0.1.4", + "ansi-escapes": "3.1.0", + "ansi-styles": "3.2.1", + "arr-flatten": "1.1.0", + "array-union": "1.0.2", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "auto-bind": "1.2.0", + "ava-init": "0.2.1", + "babel-core": "6.26.3", + "babel-generator": "6.26.1", + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "bluebird": "3.5.1", + "caching-transform": "1.0.1", + "chalk": "2.4.1", + "chokidar": "1.7.0", + "clean-stack": "1.3.0", + "clean-yaml-object": "0.1.0", + "cli-cursor": "2.1.0", + "cli-spinners": "1.3.1", + "cli-truncate": "1.1.0", + "co-with-promise": "4.6.0", + "code-excerpt": "2.1.1", + "common-path-prefix": "1.0.0", + "concordance": "3.0.0", + "convert-source-map": "1.5.1", + "core-assert": "0.2.1", + "currently-unhandled": "0.4.1", + "debug": "3.1.0", + "dot-prop": "4.2.0", + "empower-core": "0.6.2", + "equal-length": "1.0.1", + "figures": "2.0.0", + "find-cache-dir": "1.0.0", + "fn-name": "2.0.1", + "get-port": "3.2.0", + "globby": "6.1.0", + "has-flag": "2.0.0", + "hullabaloo-config-manager": "1.1.1", + "ignore-by-default": "1.0.1", + "import-local": "0.1.1", + "indent-string": "3.2.0", + "is-ci": "1.1.0", + "is-generator-fn": "1.0.0", + "is-obj": "1.0.1", + "is-observable": "1.1.0", + "is-promise": "2.1.0", + "last-line-stream": "1.0.0", + "lodash.clonedeepwith": "4.5.0", + "lodash.debounce": "4.0.8", + "lodash.difference": "4.5.0", + "lodash.flatten": "4.4.0", + "loud-rejection": "1.6.0", + "make-dir": "1.2.0", + "matcher": "1.1.0", + "md5-hex": "2.0.0", + "meow": "3.7.0", + "ms": "2.0.0", + "multimatch": "2.1.0", + "observable-to-promise": "0.5.0", + "option-chain": "1.0.0", + "package-hash": "2.0.0", + "pkg-conf": "2.1.0", + "plur": "2.1.2", + "pretty-ms": "3.1.0", + "require-precompiled": "0.1.0", + "resolve-cwd": "2.0.0", + "safe-buffer": "5.1.2", + "semver": "5.5.0", + "slash": "1.0.0", + "source-map-support": "0.5.5", + "stack-utils": "1.0.1", + "strip-ansi": "4.0.0", + "strip-bom-buf": "1.0.0", + "supertap": "1.0.0", + "supports-color": "5.4.0", + "trim-off-newlines": "1.0.1", + "unique-temp-dir": "1.0.0", + "update-notifier": "2.5.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "ava-init": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ava-init/-/ava-init-0.2.1.tgz", + "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", + "dev": true, + "requires": { + "arr-exclude": "1.0.0", + "execa": "0.7.0", + "has-yarn": "1.0.0", + "read-pkg-up": "2.0.0", + "write-pkg": "3.1.0" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" + }, + "axios": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", @@ -2529,13 +2504,13 @@ } }, "babel-core": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", - "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { "babel-code-frame": "6.26.0", - "babel-generator": "6.26.0", + "babel-generator": "6.26.1", "babel-helpers": "6.24.1", "babel-messages": "6.23.0", "babel-register": "6.26.0", @@ -2544,32 +2519,21 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "convert-source-map": "1.5.0", + "convert-source-map": "1.5.1", "debug": "2.6.9", "json5": "0.5.1", - "lodash": "4.17.4", + "lodash": "4.17.10", "minimatch": "3.0.4", "path-is-absolute": "1.0.1", "private": "0.1.8", "slash": "1.0.0", "source-map": "0.5.7" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } } }, "babel-generator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", - "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { "babel-messages": "6.23.0", @@ -2577,7 +2541,7 @@ "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", - "lodash": "4.17.4", + "lodash": "4.17.10", "source-map": "0.5.7", "trim-right": "1.0.1" }, @@ -2665,7 +2629,7 @@ "requires": { "babel-runtime": "6.26.0", "babel-types": "6.26.0", - "lodash": "4.17.4" + "lodash": "4.17.10" } }, "babel-helper-remap-async-to-generator": { @@ -2710,15 +2674,15 @@ } }, "babel-plugin-espower": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-2.3.2.tgz", - "integrity": "sha1-VRa4/NsmyfDh2BYHSfbkxl5xJx4=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-2.4.0.tgz", + "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", "dev": true, "requires": { - "babel-generator": "6.26.0", + "babel-generator": "6.26.1", "babylon": "6.18.0", "call-matcher": "1.0.1", - "core-js": "2.5.1", + "core-js": "2.5.5", "espower-location-detector": "1.0.0", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -2780,9 +2744,9 @@ } }, "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", - "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { "babel-plugin-transform-strict-mode": "6.24.1", @@ -2863,13 +2827,24 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "6.26.0", + "babel-core": "6.26.3", "babel-runtime": "6.26.0", - "core-js": "2.5.1", + "core-js": "2.5.5", "home-or-tmp": "2.0.0", - "lodash": "4.17.4", + "lodash": "4.17.10", "mkdirp": "0.5.1", "source-map-support": "0.4.18" + }, + "dependencies": { + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + } } }, "babel-runtime": { @@ -2878,8 +2853,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.1", - "regenerator-runtime": "0.11.0" + "core-js": "2.5.5", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -2892,7 +2867,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "lodash": "4.17.4" + "lodash": "4.17.10" } }, "babel-traverse": { @@ -2908,19 +2883,8 @@ "babylon": "6.18.0", "debug": "2.6.9", "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "invariant": "2.2.4", + "lodash": "4.17.10" } }, "babel-types": { @@ -2931,7 +2895,7 @@ "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", - "lodash": "4.17.4", + "lodash": "4.17.10", "to-fast-properties": "1.0.3" } }, @@ -2968,10 +2932,31 @@ "is-descriptor": "1.0.2" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } } } }, @@ -2990,9 +2975,9 @@ } }, "binary-extensions": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz", - "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", "dev": true }, "bluebird": { @@ -3006,22 +2991,22 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "requires": { - "hoek": "4.2.0" + "hoek": "4.2.1" } }, "boxen": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.2.2.tgz", - "integrity": "sha1-Px1AMsMP/qnUsCwyLq8up0HcvOU=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "dev": true, "requires": { "ansi-align": "2.0.0", "camelcase": "4.1.0", - "chalk": "2.1.0", + "chalk": "2.4.1", "cli-boxes": "1.0.0", "string-width": "2.1.1", "term-size": "1.2.0", - "widest-line": "1.0.0" + "widest-line": "2.0.0" }, "dependencies": { "ansi-regex": { @@ -3064,25 +3049,47 @@ } }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, "buf-compare": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", @@ -3094,6 +3101,12 @@ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" }, + "buffer-from": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", + "dev": true + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -3106,6 +3119,13 @@ "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { "long": "3.2.0" + }, + "dependencies": { + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + } } }, "cache-base": { @@ -3122,13 +3142,6 @@ "to-object-path": "0.3.0", "union-value": "1.0.0", "unset-value": "1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "cacheable-request": { @@ -3144,6 +3157,14 @@ "lowercase-keys": "1.0.0", "normalize-url": "2.0.1", "responselike": "1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + } } }, "caching-transform": { @@ -3185,7 +3206,7 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.1", + "core-js": "2.5.5", "deep-equal": "1.0.1", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -3263,16 +3284,22 @@ } }, "chalk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", - "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "3.2.0", + "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "4.4.0" + "supports-color": "5.4.0" } }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, "chokidar": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", @@ -3281,19 +3308,45 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.1.2", + "fsevents": "1.2.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", "is-glob": "2.0.1", "path-is-absolute": "1.0.1", "readdirp": "2.1.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + } } }, "ci-info": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.1.tgz", - "integrity": "sha512-vHDDF/bP9RYpTWtUhpJRhCFdvvp3iDWvEbuDbWgvjUrNGV1MXJrE0MPcwGtEled04m61iwdBLUIHZtDgzWS4ZQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", + "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", "dev": true }, "circular-json": { @@ -3320,62 +3373,6 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -3407,9 +3404,9 @@ } }, "cli-spinners": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.1.0.tgz", - "integrity": "sha1-8YR7FohE2RemceudFH499JfJDQY=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz", + "integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==", "dev": true }, "cli-truncate": { @@ -3492,23 +3489,15 @@ "dev": true, "requires": { "pinkie-promise": "1.0.0" - }, - "dependencies": { - "pinkie": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", - "integrity": "sha1-Wkfyi6EBXQIBvae/DzWOR77Ix+Q=", - "dev": true - }, - "pinkie-promise": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", - "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", - "dev": true, - "requires": { - "pinkie": "1.0.0" - } - } + } + }, + "code-excerpt": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-2.1.1.tgz", + "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", + "dev": true, + "requires": { + "convert-to-spaces": "1.0.2" } }, "code-point-at": { @@ -3517,163 +3506,14 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codecov": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.0.tgz", - "integrity": "sha1-wnO4xPEpRXI+jcnSWAPYk0Pl8o4=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.1.tgz", + "integrity": "sha512-0TjnXrbvcPzAkRPv/Y5D8aZju/M5adkFxShRyMMgDReB8EV9nF4XMERXs6ajgLA1di9LUFW2tgePDQd2JPWy7g==", "dev": true, "requires": { "argv": "0.0.2", - "request": "2.81.0", + "request": "2.85.0", "urlgrey": "0.4.4" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "requires": { - "boom": "2.10.1" - } - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" - } - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - } } }, "collection-visit": { @@ -3686,9 +3526,9 @@ } }, "color-convert": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", - "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "dev": true, "requires": { "color-name": "1.1.3" @@ -3712,9 +3552,9 @@ "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" }, "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { "delayed-stream": "1.0.0" } @@ -3748,13 +3588,14 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { + "buffer-from": "1.0.0", "inherits": "2.0.3", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "typedarray": "0.0.6" } }, @@ -3771,30 +3612,41 @@ "js-string-escape": "1.0.1", "lodash.clonedeep": "4.5.0", "lodash.flattendeep": "4.4.0", - "lodash.merge": "4.6.0", + "lodash.merge": "4.6.1", "md5-hex": "2.0.0", - "semver": "5.4.1", + "semver": "5.5.0", "well-known-symbols": "1.0.0" + }, + "dependencies": { + "date-time": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", + "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", + "dev": true, + "requires": { + "time-zone": "1.0.0" + } + } } }, "configstore": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", - "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "dev": true, "requires": { "dot-prop": "4.2.0", "graceful-fs": "4.1.11", - "make-dir": "1.1.0", + "make-dir": "1.2.0", "unique-string": "1.0.0", "write-file-atomic": "2.3.0", "xdg-basedir": "3.0.0" } }, "convert-source-map": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, "convert-to-spaces": { @@ -3825,9 +3677,9 @@ } }, "core-js": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", - "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", + "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=" }, "core-util-is": { "version": "1.0.2", @@ -3849,7 +3701,7 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.1", + "lru-cache": "4.1.2", "shebang-command": "1.2.0", "which": "1.3.0" } @@ -3867,7 +3719,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", "requires": { - "hoek": "4.2.0" + "hoek": "4.2.1" } } } @@ -3893,7 +3745,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.31" + "es5-ext": "0.10.42" } }, "dashdash": { @@ -3905,18 +3757,15 @@ } }, "date-time": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", - "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", - "dev": true, - "requires": { - "time-zone": "1.0.0" - } + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-0.1.1.tgz", + "integrity": "sha1-7S9tk9l5DOL9ZtW1/z7dW7y/Owc=", + "dev": true }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } @@ -3947,9 +3796,9 @@ "dev": true }, "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", "dev": true }, "deep-is": { @@ -3976,10 +3825,31 @@ "isobject": "3.0.1" }, "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } } } }, @@ -3991,7 +3861,7 @@ "requires": { "globby": "5.0.0", "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", "object-assign": "4.1.1", "pify": "2.3.0", "pinkie-promise": "2.0.1", @@ -4011,6 +3881,27 @@ "pify": "2.3.0", "pinkie-promise": "2.0.1" } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } } } }, @@ -4029,9 +3920,9 @@ } }, "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, "diff-match-patch": { @@ -4046,31 +3937,15 @@ "requires": { "arrify": "1.0.1", "path-type": "3.0.0" - }, - "dependencies": { - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } } }, "doctrine": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", - "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "esutils": "2.0.2" } }, "dom-serializer": { @@ -4107,9 +3982,9 @@ } }, "domutils": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.6.2.tgz", - "integrity": "sha1-GVjMC0yUJuntNn+xyOhUiRsPo/8=", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { "dom-serializer": "0.1.0", @@ -4138,7 +4013,7 @@ "requires": { "end-of-stream": "1.4.1", "inherits": "2.0.3", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "stream-shift": "1.0.0" } }, @@ -4162,7 +4037,7 @@ "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", "requires": { "base64url": "2.0.0", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "empower": { @@ -4170,14 +4045,14 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", "requires": { - "core-js": "2.5.1", + "core-js": "2.5.5", "empower-core": "0.6.2" } }, "empower-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.0.1.tgz", - "integrity": "sha1-MeMQq8BluqfDoEh+a+W7zGXzwd4=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.1.0.tgz", + "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { "estraverse": "4.2.0" @@ -4189,7 +4064,7 @@ "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.1" + "core-js": "2.5.5" } }, "end-of-stream": { @@ -4222,29 +4097,30 @@ } }, "es5-ext": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.31.tgz", - "integrity": "sha1-e7k4yVp/G59ygJLcCcQe3MOY7v4=", + "version": "0.10.42", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", + "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", "dev": true, "requires": { - "es6-iterator": "2.0.1", - "es6-symbol": "3.1.1" + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" } }, "es6-error": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.0.2.tgz", - "integrity": "sha1-7sXHJurO9Rt/a3PCDbbhsTsGnJg=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, "es6-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", - "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.31", + "es5-ext": "0.10.42", "es6-symbol": "3.1.1" } }, @@ -4255,8 +4131,8 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.31", - "es6-iterator": "2.0.1", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", "es6-set": "0.1.5", "es6-symbol": "3.1.1", "event-emitter": "0.3.5" @@ -4269,8 +4145,8 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.31", - "es6-iterator": "2.0.1", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", "es6-symbol": "3.1.1", "event-emitter": "0.3.5" } @@ -4282,7 +4158,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.31" + "es5-ext": "0.10.42" } }, "es6-weak-map": { @@ -4292,8 +4168,8 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.31", - "es6-iterator": "2.0.1", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", "es6-symbol": "3.1.1" } }, @@ -4322,16 +4198,16 @@ "dev": true }, "escodegen": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", - "integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", + "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", "dev": true, "requires": { "esprima": "3.1.3", "estraverse": "4.2.0", "esutils": "2.0.2", "optionator": "0.8.2", - "source-map": "0.5.7" + "source-map": "0.6.1" }, "dependencies": { "esprima": { @@ -4339,6 +4215,13 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true } } }, @@ -4350,40 +4233,40 @@ "requires": { "es6-map": "0.1.5", "es6-weak-map": "2.0.2", - "esrecurse": "4.2.0", + "esrecurse": "4.2.1", "estraverse": "4.2.0" } }, "eslint": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.8.0.tgz", - "integrity": "sha1-Ip7w41Tg5h2DfHqA/fuoJeGZgV4=", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", + "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "dev": true, "requires": { - "ajv": "5.2.3", + "ajv": "5.5.2", "babel-code-frame": "6.26.0", - "chalk": "2.1.0", - "concat-stream": "1.6.0", + "chalk": "2.4.1", + "concat-stream": "1.6.2", "cross-spawn": "5.1.0", "debug": "3.1.0", - "doctrine": "2.0.0", + "doctrine": "2.1.0", "eslint-scope": "3.7.1", - "espree": "3.5.1", - "esquery": "1.0.0", - "estraverse": "4.2.0", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.4", + "esquery": "1.0.1", "esutils": "2.0.2", "file-entry-cache": "2.0.0", "functional-red-black-tree": "1.0.1", "glob": "7.1.2", - "globals": "9.18.0", - "ignore": "3.3.5", + "globals": "11.5.0", + "ignore": "3.3.8", "imurmurhash": "0.1.4", "inquirer": "3.3.0", - "is-resolvable": "1.0.0", - "js-yaml": "3.10.0", - "json-stable-stringify": "1.0.1", + "is-resolvable": "1.1.0", + "js-yaml": "3.11.0", + "json-stable-stringify-without-jsonify": "1.0.1", "levn": "0.3.0", - "lodash": "4.17.4", + "lodash": "4.17.10", "minimatch": "3.0.4", "mkdirp": "0.5.1", "natural-compare": "1.4.0", @@ -4391,8 +4274,9 @@ "path-is-inside": "1.0.2", "pluralize": "7.0.0", "progress": "2.0.0", + "regexpp": "1.1.0", "require-uncached": "1.0.3", - "semver": "5.4.1", + "semver": "5.5.0", "strip-ansi": "4.0.0", "strip-json-comments": "2.0.1", "table": "4.0.2", @@ -4414,6 +4298,12 @@ "ms": "2.0.0" } }, + "globals": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", + "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", + "dev": true + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -4426,9 +4316,9 @@ } }, "eslint-config-prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.6.0.tgz", - "integrity": "sha1-8h2w67Q4rWePuYlGCXxLsZi+/Mw=", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz", + "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", "dev": true, "requires": { "get-stdin": "5.0.1" @@ -4448,22 +4338,16 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "3.3.7", + "ignore": "3.3.8", "minimatch": "3.0.4", - "resolve": "1.5.0", - "semver": "5.4.1" + "resolve": "1.7.1", + "semver": "5.5.0" }, "dependencies": { - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", - "dev": true - }, "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { "path-parse": "1.0.5" @@ -4472,9 +4356,9 @@ } }, "eslint-plugin-prettier": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz", - "integrity": "sha512-AV8shBlGN9tRZffj5v/f4uiQWlP3qiQ+lh+BhTqRLuKSyczx+HRWVkVZaf7dOmguxghAH1wftnou/JUEEChhGg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz", + "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", "dev": true, "requires": { "fast-diff": "1.1.2", @@ -4487,10 +4371,16 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "4.2.0", + "esrecurse": "4.2.1", "estraverse": "4.2.0" } }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, "espower": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/espower/-/espower-2.1.0.tgz", @@ -4499,7 +4389,7 @@ "requires": { "array-find": "1.0.0", "escallmatch": "1.5.0", - "escodegen": "1.9.0", + "escodegen": "1.9.1", "escope": "3.6.0", "espower-location-detector": "1.0.0", "espurify": "1.7.0", @@ -4515,11 +4405,22 @@ "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", "dev": true, "requires": { - "convert-source-map": "1.5.0", + "convert-source-map": "1.5.1", "espower-source": "2.2.0", "minimatch": "3.0.4", "source-map-support": "0.4.18", "xtend": "4.0.1" + }, + "dependencies": { + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + } } }, "espower-location-detector": { @@ -4528,7 +4429,7 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "1.2.2", + "is-url": "1.2.4", "path-is-absolute": "1.0.1", "source-map": "0.5.7", "xtend": "4.0.1" @@ -4540,27 +4441,43 @@ "integrity": "sha1-fgBSVa5HtcE2RIZEs/PYAtUD91I=", "dev": true, "requires": { - "acorn": "5.1.2", + "acorn": "5.5.3", "acorn-es7-plugin": "1.1.7", - "convert-source-map": "1.5.0", - "empower-assert": "1.0.1", - "escodegen": "1.9.0", + "convert-source-map": "1.5.1", + "empower-assert": "1.1.0", + "escodegen": "1.9.1", "espower": "2.1.0", "estraverse": "4.2.0", "merge-estraverse-visitors": "1.0.0", "multi-stage-sourcemap": "0.2.1", "path-is-absolute": "1.0.1", "xtend": "4.0.1" + }, + "dependencies": { + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "dev": true + } } }, "espree": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.1.tgz", - "integrity": "sha1-DJiLirRttTEAoZVK5LqZXd0n2H4=", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "5.1.2", + "acorn": "5.5.3", "acorn-jsx": "3.0.1" + }, + "dependencies": { + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "dev": true + } } }, "esprima": { @@ -4574,26 +4491,25 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", "requires": { - "core-js": "2.5.1" + "core-js": "2.5.5" } }, "esquery": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", - "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { "estraverse": "4.2.0" } }, "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0", - "object-assign": "4.1.1" + "estraverse": "4.2.0" } }, "estraverse": { @@ -4614,7 +4530,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.31" + "es5-ext": "0.10.42" } }, "execa": { @@ -4633,12 +4549,35 @@ } }, "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "is-posix-bracket": "0.1.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, "expand-range": { @@ -4648,9 +4587,51 @@ "dev": true, "requires": { "fill-range": "2.2.3" - } - }, - "extend": { + }, + "dependencies": { + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" @@ -4675,23 +4656,73 @@ } }, "external-editor": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.5.tgz", - "integrity": "sha512-Msjo64WT5W+NhOpQXh0nOHm+n0RfU1QUwDnKYvJ8dEJ8zlwLrqXNTv5mSUTJpepf41PDJGyhueTw2vNZW+Fr/w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "iconv-lite": "0.4.19", - "jschardet": "1.5.1", + "chardet": "0.4.2", + "iconv-lite": "0.4.21", "tmp": "0.0.33" } }, "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "is-extglob": "1.0.0" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + } } }, "extsprintf": { @@ -4700,9 +4731,9 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" }, "fast-diff": { "version": "1.1.2", @@ -4711,391 +4742,140 @@ "dev": true }, "fast-glob": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.0.tgz", - "integrity": "sha512-4F75PTznkNtSKs2pbhtBwRkw8sRwa7LfXx5XaQJOe4IQ6yTjceLDTwM5gj1s80R2t/5WeDC1gVfm3jLE+l39Tw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.1.tgz", + "integrity": "sha512-wSyW1TBK3ia5V+te0rGPXudeMHoUQW6O5Y9oATiaGhpENmEifPDlOdhpsnlj5HoG6ttIvGiY1DdCmI9X2xGMhg==", "requires": { "@mrmlnc/readdir-enhanced": "2.2.1", "glob-parent": "3.1.0", "is-glob": "4.0.0", "merge2": "1.2.1", - "micromatch": "3.1.9" + "micromatch": "3.1.10" + } + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", + "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", + "dev": true, + "requires": { + "is-object": "1.0.1", + "merge-descriptors": "1.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "braces": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", - "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "define-property": "1.0.0", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "kind-of": "6.0.2", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } + "is-extendable": "0.1.1" } - }, + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "1.0.1", + "make-dir": "1.2.0", + "pkg-dir": "2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "fn-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz", + "integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=", + "dev": true + }, + "follow-redirects": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", + "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", + "requires": { + "debug": "3.1.0" + }, + "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { "ms": "2.0.0" } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "2.1.1" - } - } - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "requires": { - "is-extglob": "2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "micromatch": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", - "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", - "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.1", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - } } } }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "dev": true, - "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fill-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", - "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", - "dev": true, - "requires": { - "is-object": "1.0.1", - "merge-descriptors": "1.0.1" - } - }, - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "dev": true, - "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "1.0.1", - "make-dir": "1.1.0", - "pkg-dir": "2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", - "dev": true, - "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" - } - }, - "fn-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz", - "integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=", - "dev": true - }, - "follow-redirects": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", - "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", - "requires": { - "debug": "3.1.0" - } - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -5121,28 +4901,19 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "formatio": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", - "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", - "dev": true, - "requires": { - "samsam": "1.3.0" + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, "formidable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.1.1.tgz", - "integrity": "sha1-lriIb3w8NQi5Mta9cMTTqI818ak=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", + "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==", "dev": true }, "fragment-cache": { @@ -5160,7 +4931,18 @@ "dev": true, "requires": { "inherits": "2.0.3", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" + } + }, + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" } }, "fs.realpath": { @@ -5169,39 +4951,29 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", - "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz", + "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", "dev": true, "optional": true, "requires": { - "nan": "2.7.0", - "node-pre-gyp": "0.6.36" + "nan": "2.10.0", + "node-pre-gyp": "0.9.1" }, "dependencies": { "abbrev": { - "version": "1.1.0", + "version": "1.1.1", "bundled": true, "dev": true, "optional": true }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, "ansi-regex": { "version": "2.1.1", "bundled": true, "dev": true }, "aproba": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "dev": true, "optional": true @@ -5213,91 +4985,25 @@ "optional": true, "requires": { "delegates": "1.0.0", - "readable-stream": "2.2.9" + "readable-stream": "2.3.6" } }, - "asn1": { - "version": "0.2.3", + "balanced-match": { + "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true, - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", + "brace-expansion": { + "version": "1.1.11", "bundled": true, "dev": true, "requires": { - "balanced-match": "0.4.2", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true - }, - "co": { - "version": "4.6.0", + "chownr": { + "version": "1.0.1", "bundled": true, "dev": true, "optional": true @@ -5307,14 +5013,6 @@ "bundled": true, "dev": true }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, "concat-map": { "version": "0.0.1", "bundled": true, @@ -5328,36 +5026,11 @@ "core-util-is": { "version": "1.0.2", "bundled": true, - "dev": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } + "optional": true }, "debug": { - "version": "2.6.8", + "version": "2.6.9", "bundled": true, "dev": true, "optional": true, @@ -5371,80 +5044,32 @@ "dev": true, "optional": true }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "delegates": { "version": "1.0.0", "bundled": true, "dev": true, "optional": true }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "forever-agent": { - "version": "0.6.1", + "detect-libc": { + "version": "1.0.3", "bundled": true, "dev": true, "optional": true }, - "form-data": { - "version": "2.1.4", + "fs-minipass": { + "version": "1.2.5", "bundled": true, "dev": true, "optional": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" + "minipass": "2.2.4" } }, "fs.realpath": { "version": "1.0.0", "bundled": true, - "dev": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, "dev": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } + "optional": true }, "gauge": { "version": "2.7.4", @@ -5452,7 +5077,7 @@ "dev": true, "optional": true, "requires": { - "aproba": "1.1.1", + "aproba": "1.2.0", "console-control-strings": "1.1.0", "has-unicode": "2.0.1", "object-assign": "4.1.1", @@ -5462,27 +5087,11 @@ "wide-align": "1.1.2" } }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, "glob": { "version": "7.1.2", "bundled": true, "dev": true, + "optional": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -5492,65 +5101,35 @@ "path-is-absolute": "1.0.1" } }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, "has-unicode": { "version": "2.0.1", "bundled": true, "dev": true, "optional": true }, - "hawk": { - "version": "3.1.3", + "iconv-lite": { + "version": "0.4.21", "bundled": true, "dev": true, "optional": true, "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "safer-buffer": "2.1.2" } }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "dev": true - }, - "http-signature": { - "version": "1.1.1", + "ignore-walk": { + "version": "3.0.1", "bundled": true, "dev": true, "optional": true, "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" + "minimatch": "3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "dev": true, + "optional": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -5562,7 +5141,7 @@ "dev": true }, "ini": { - "version": "1.3.4", + "version": "1.3.5", "bundled": true, "dev": true, "optional": true @@ -5575,154 +5154,114 @@ "number-is-nan": "1.0.1" } }, - "is-typedarray": { + "isarray": { "version": "1.0.0", "bundled": true, "dev": true, "optional": true }, - "isarray": { - "version": "1.0.0", + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", "bundled": true, "dev": true }, - "isstream": { - "version": "0.1.2", + "minipass": { + "version": "2.2.4", "bundled": true, "dev": true, - "optional": true + "requires": { + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } }, - "jodid25519": { - "version": "1.0.2", + "minizlib": { + "version": "1.1.0", "bundled": true, "dev": true, "optional": true, "requires": { - "jsbn": "0.1.1" + "minipass": "2.2.4" } }, - "jsbn": { - "version": "0.1.1", + "mkdirp": { + "version": "0.5.1", "bundled": true, "dev": true, - "optional": true + "requires": { + "minimist": "0.0.8" + } }, - "json-schema": { - "version": "0.2.3", + "ms": { + "version": "2.0.0", "bundled": true, "dev": true, "optional": true }, - "json-stable-stringify": { - "version": "1.0.1", + "needle": { + "version": "2.2.0", "bundled": true, "dev": true, "optional": true, "requires": { - "jsonify": "0.0.0" + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" } }, - "json-stringify-safe": { - "version": "5.0.1", + "node-pre-gyp": { + "version": "0.9.1", "bundled": true, "dev": true, - "optional": true + "optional": true, + "requires": { + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.6", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.5" + } }, - "jsonify": { - "version": "0.0.0", + "npm-bundled": { + "version": "1.0.3", "bundled": true, "dev": true, "optional": true }, - "jsprim": { - "version": "1.4.0", + "npm-packlist": { + "version": "1.1.10", "bundled": true, "dev": true, "optional": true, "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true, - "dev": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.36", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" } }, "npmlog": { - "version": "4.1.0", + "version": "4.1.2", "bundled": true, "dev": true, "optional": true, @@ -5738,12 +5277,6 @@ "bundled": true, "dev": true }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "optional": true - }, "object-assign": { "version": "4.1.1", "bundled": true, @@ -5771,7 +5304,7 @@ "optional": true }, "osenv": { - "version": "0.1.4", + "version": "0.1.5", "bundled": true, "dev": true, "optional": true, @@ -5783,39 +5316,23 @@ "path-is-absolute": { "version": "1.0.1", "bundled": true, - "dev": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, "dev": true, "optional": true }, "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "dev": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", + "version": "2.0.0", "bundled": true, "dev": true, "optional": true }, "rc": { - "version": "1.2.1", + "version": "1.2.6", "bundled": true, "dev": true, "optional": true, "requires": { "deep-extend": "0.4.2", - "ini": "1.3.4", + "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" }, @@ -5829,113 +5346,63 @@ } }, "readable-stream": { - "version": "2.2.9", + "version": "2.3.6", "bundled": true, "dev": true, + "optional": true, "requires": { - "buffer-shims": "1.0.0", "core-util-is": "1.0.2", "inherits": "2.0.3", "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } }, - "request": { - "version": "2.81.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, "rimraf": { - "version": "2.6.1", + "version": "2.6.2", "bundled": true, "dev": true, + "optional": true, "requires": { "glob": "7.1.2" } }, "safe-buffer": { - "version": "5.0.1", + "version": "5.1.1", "bundled": true, "dev": true }, - "semver": { - "version": "5.3.0", + "safer-buffer": { + "version": "2.1.2", "bundled": true, "dev": true, "optional": true }, - "set-blocking": { - "version": "2.0.0", + "sax": { + "version": "1.2.4", "bundled": true, "dev": true, "optional": true }, - "signal-exit": { - "version": "3.0.2", + "semver": { + "version": "5.5.0", "bundled": true, "dev": true, "optional": true }, - "sntp": { - "version": "1.0.9", + "set-blocking": { + "version": "2.0.0", "bundled": true, "dev": true, - "optional": true, - "requires": { - "hoek": "2.16.3" - } + "optional": true }, - "sshpk": { - "version": "1.13.0", + "signal-exit": { + "version": "3.0.2", "bundled": true, "dev": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } + "optional": true }, "string-width": { "version": "1.0.2", @@ -5948,19 +5415,14 @@ } }, "string_decoder": { - "version": "1.0.1", + "version": "1.1.1", "bundled": true, "dev": true, + "optional": true, "requires": { - "safe-buffer": "5.0.1" + "safe-buffer": "5.1.1" } }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "dev": true, - "optional": true - }, "strip-ansi": { "version": "3.0.1", "bundled": true, @@ -5976,81 +5438,26 @@ "optional": true }, "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", + "version": "4.4.1", "bundled": true, "dev": true, "optional": true, "requires": { - "safe-buffer": "5.0.1" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true, - "optional": true - }, "util-deprecate": { "version": "1.0.2", "bundled": true, - "dev": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, "dev": true, "optional": true }, - "verror": { - "version": "1.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, "wide-align": { "version": "1.1.2", "bundled": true, @@ -6064,6 +5471,11 @@ "version": "1.0.2", "bundled": true, "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true } } }, @@ -6147,15 +5559,51 @@ "requires": { "glob-parent": "2.0.0", "is-glob": "2.0.1" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + } } }, "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "is-glob": "2.0.1" + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "2.1.1" + } + } } }, "glob-to-regexp": { @@ -6164,12 +5612,12 @@ "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" }, "global-dirs": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.0.tgz", - "integrity": "sha1-ENNAOeDfBCcuJizyQiT3IJQ0308=", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "dev": true, "requires": { - "ini": "1.3.4" + "ini": "1.3.5" } }, "globals": { @@ -6179,887 +5627,871 @@ "dev": true }, "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", + "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", "requires": { "array-union": "1.0.2", + "dir-glob": "2.0.0", + "fast-glob": "2.2.1", "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "ignore": "3.3.8", + "pify": "3.0.0", + "slash": "1.0.0" } }, - "google-gax": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.0.tgz", - "integrity": "sha512-sslPB7USGD8SrVUGlWFIGYVZrgZ6oj+fWUEW3f8Bk43+nxqeLyrNoI3iFBRpjLfwMCEYaXVziWNmatwLRP8azg==", + "google-auth-library": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.4.0.tgz", + "integrity": "sha512-vWRx6pJulK7Y5V/Xyr7MPMlx2mWfmrUVbcffZ7hpq8ElFg5S8WY6PvjMovdcr6JfuAwwpAX4R0I1XOcyWuBcUw==", + "requires": { + "axios": "0.18.0", + "gcp-metadata": "0.6.3", + "gtoken": "2.3.0", + "jws": "3.1.4", + "lodash.isstring": "4.0.1", + "lru-cache": "4.1.2", + "retry-axios": "0.3.2" + } + }, + "google-auto-auth": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", + "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", + "requires": { + "async": "2.6.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.4.0", + "request": "2.85.0" + } + }, + "google-gax": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", + "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", "requires": { "duplexify": "3.5.4", "extend": "3.0.1", "globby": "8.0.1", - "google-auto-auth": "0.9.7", + "google-auto-auth": "0.10.1", "google-proto-files": "0.15.1", - "grpc": "1.9.1", - "is-stream-ended": "0.1.3", - "lodash": "4.17.4", - "protobufjs": "6.8.0", + "grpc": "1.11.0", + "is-stream-ended": "0.1.4", + "lodash": "4.17.10", + "protobufjs": "6.8.6", "through2": "2.0.3" + } + }, + "google-p12-pem": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", + "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", + "requires": { + "node-forge": "0.7.5", + "pify": "3.0.0" + } + }, + "google-proto-files": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", + "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", + "requires": { + "globby": "7.1.1", + "power-assert": "1.5.0", + "protobufjs": "6.8.6" }, "dependencies": { "globby": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", - "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "requires": { "array-union": "1.0.2", "dir-glob": "2.0.0", - "fast-glob": "2.2.0", "glob": "7.1.2", - "ignore": "3.3.5", + "ignore": "3.3.8", "pify": "3.0.0", "slash": "1.0.0" } + } + } + }, + "got": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/got/-/got-8.2.0.tgz", + "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", + "dev": true, + "requires": { + "@sindresorhus/is": "0.7.0", + "cacheable-request": "2.1.4", + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "into-stream": "3.1.0", + "is-retry-allowed": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.1", + "mimic-response": "1.0.0", + "p-cancelable": "0.3.0", + "p-timeout": "2.0.1", + "pify": "3.0.0", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "url-parse-lax": "3.0.0", + "url-to-options": "1.0.1" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true }, - "google-auth-library": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.3.2.tgz", - "integrity": "sha512-aRz0om4Bs85uyR2Ousk3Gb8Nffx2Sr2RoKts1smg1MhRwrehE1aD1HC4RmprNt1HVJ88IDnQ8biJQ/aXjiIxlQ==", + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, "requires": { - "axios": "0.18.0", - "gcp-metadata": "0.6.3", - "gtoken": "2.2.0", - "jws": "3.1.4", - "lodash.isstring": "4.0.1", - "lru-cache": "4.1.2", - "retry-axios": "0.3.2" + "prepend-http": "2.0.0" } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "grpc": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.11.0.tgz", + "integrity": "sha512-pTJjV/eatBQ6Rhc/jWNmUW9jE8fPrhcMYSWDSyf4l7ah1U3sIe4eIjqI/a3sm0zKbM5CuovV0ESrc+b04kr4Ig==", + "requires": { + "lodash": "4.17.10", + "nan": "2.10.0", + "node-pre-gyp": "0.7.0", + "protobufjs": "5.0.2" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true }, - "google-auto-auth": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.9.7.tgz", - "integrity": "sha512-Nro7aIFrL2NP0G7PoGrJqXGMZj8AjdBOcbZXRRm/8T3w08NUHIiNN3dxpuUYzDsZizslH+c8e+7HXL8vh3JXTQ==", + "ajv": { + "version": "5.5.2", + "bundled": true, "requires": { - "async": "2.5.0", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.3.2", - "request": "2.83.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, - "google-p12-pem": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", - "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, "requires": { - "node-forge": "0.7.4", - "pify": "3.0.0" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, - "google-proto-files": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", - "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", + "asn1": { + "version": "0.2.3", + "bundled": true + }, + "assert-plus": { + "version": "1.0.0", + "bundled": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true + }, + "aws-sign2": { + "version": "0.7.0", + "bundled": true + }, + "aws4": { + "version": "1.7.0", + "bundled": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "optional": true, "requires": { - "globby": "7.1.1", - "power-assert": "1.4.4", - "protobufjs": "6.8.0" - }, - "dependencies": { - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "glob": "7.1.2", - "ignore": "3.3.5", - "pify": "3.0.0", - "slash": "1.0.0" - } - } + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "4.3.1", + "bundled": true, + "requires": { + "hoek": "4.2.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "bundled": true + }, + "co": { + "version": "4.6.0", + "bundled": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "combined-stream": { + "version": "1.0.6", + "bundled": true, + "requires": { + "delayed-stream": "1.0.0" } }, - "grpc": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.9.1.tgz", - "integrity": "sha512-WNW3MWMuAoo63AwIlzFE3T0KzzvNBSvOkg67Hm8WhvHNkXFBlIk1QyJRE3Ocm0O5eIwS7JU8Ssota53QR1zllg==", + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "cryptiles": { + "version": "3.1.2", + "bundled": true, "requires": { - "lodash": "4.17.4", - "nan": "2.7.0", - "node-pre-gyp": "0.6.39", - "protobufjs": "5.0.2" + "boom": "5.2.0" }, "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.3" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, "boom": { - "version": "2.10.1", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "caseless": { - "version": "0.12.0", - "bundled": true - }, - "co": { - "version": "4.6.0", - "bundled": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "cryptiles": { - "version": "2.0.5", + "version": "5.2.0", "bundled": true, "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" + "hoek": "4.2.1" } - }, - "extend": { - "version": "3.0.1", - "bundled": true - }, - "extsprintf": { - "version": "1.3.0", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.5", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true - }, - "jsprim": { - "version": "1.4.1", - "bundled": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } - } - }, - "mime-db": { - "version": "1.30.0", - "bundled": true - }, - "mime-types": { - "version": "2.1.17", - "bundled": true, - "requires": { - "mime-db": "1.30.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.8" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true - }, - "node-pre-gyp": { - "version": "0.6.39", - "bundled": true, - "requires": { - "detect-libc": "1.0.3", - "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.2", - "rc": "1.2.4", - "request": "2.81.0", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "2.2.1", - "tar-pack": "3.4.1" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true - }, - "protobufjs": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.2.tgz", - "integrity": "sha1-WXSNfc8D0tsiwT2p/rAk4Wq4DJE=", - "requires": { - "ascli": "1.0.1", - "bytebuffer": "5.0.1", - "glob": "7.1.2", - "yargs": "3.32.0" - } - }, - "punycode": { - "version": "1.4.1", - "bundled": true - }, - "qs": { - "version": "6.4.0", - "bundled": true - }, - "rc": { - "version": "1.2.4", - "bundled": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true - } - } - }, - "readable-stream": { - "version": "2.3.3", - "bundled": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true - }, - "semver": { - "version": "5.5.0", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.1", - "bundled": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.3", - "bundled": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.1", - "bundled": true, - "requires": { - "debug": "2.6.9", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.3.3", - "rimraf": "2.6.2", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.3", - "bundled": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "uuid": { - "version": "3.2.1", - "bundled": true - }, - "verror": { - "version": "1.10.0", - "bundled": true, - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", + } + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true + }, + "extsprintf": { + "version": "1.3.0", + "bundled": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "bundled": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "bundled": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true + }, + "form-data": { + "version": "2.3.2", + "bundled": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true + }, + "har-schema": { + "version": "2.0.0", + "bundled": true + }, + "har-validator": { + "version": "5.0.3", + "bundled": true, + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "hawk": { + "version": "6.0.2", + "bundled": true, + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.1", + "sntp": "2.1.0" + } + }, + "hoek": { + "version": "4.2.1", + "bundled": true + }, + "http-signature": { + "version": "1.2.0", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.1" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "bundled": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true + }, + "jsprim": { + "version": "1.4.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "mime-db": { + "version": "1.33.0", + "bundled": true + }, + "mime-types": { + "version": "2.1.18", + "bundled": true, + "requires": { + "mime-db": "1.33.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "1.2.0", + "bundled": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", "bundled": true } } }, - "gtoken": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.2.0.tgz", - "integrity": "sha512-tvQs8B1z5+I1FzMPZnq/OCuxTWFOkvy7cUJcpNdBOK2L7yEtPZTVCPtZU181sSDF+isUPebSqFTNTkIejFASAQ==", + "ms": { + "version": "2.0.0", + "bundled": true + }, + "node-pre-gyp": { + "version": "0.7.0", + "bundled": true, + "requires": { + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.2", + "rc": "1.2.6", + "request": "2.83.0", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "2.2.1", + "tar-pack": "3.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.5" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "performance-now": { + "version": "2.1.0", + "bundled": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true + }, + "protobufjs": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.2.tgz", + "integrity": "sha1-WXSNfc8D0tsiwT2p/rAk4Wq4DJE=", + "requires": { + "ascli": "1.0.1", + "bytebuffer": "5.0.1", + "glob": "7.1.2", + "yargs": "3.32.0" + } + }, + "punycode": { + "version": "1.4.1", + "bundled": true + }, + "qs": { + "version": "6.5.1", + "bundled": true + }, + "rc": { + "version": "1.2.6", + "bundled": true, "requires": { - "axios": "0.18.0", - "google-p12-pem": "1.0.2", - "jws": "3.1.4", - "mime": "2.2.0", - "pify": "3.0.0" + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" } }, - "lru-cache": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", - "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "readable-stream": { + "version": "2.3.6", + "bundled": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, - "mime": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", - "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + "request": { + "version": "2.83.0", + "bundled": true, + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.7.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + } }, - "node-forge": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.4.tgz", - "integrity": "sha512-8Df0906+tq/omxuCZD6PqhPaQDYuyJ1d+VITgxoIA8zvQd1ru+nMJcDChHH324MWitIgbVkAkQoGEEVJNpn/PA==" + "rimraf": { + "version": "2.6.2", + "bundled": true, + "requires": { + "glob": "7.1.2" + } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "safe-buffer": { + "version": "5.1.1", + "bundled": true + }, + "semver": { + "version": "5.5.0", + "bundled": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true + }, + "sntp": { + "version": "2.1.0", + "bundled": true, + "requires": { + "hoek": "4.2.1" + } + }, + "sshpk": { + "version": "1.14.1", + "bundled": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.1", + "bundled": true, + "requires": { + "debug": "2.6.9", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.3.6", + "rimraf": "2.6.2", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.4", + "bundled": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "uuid": { + "version": "3.2.1", + "bundled": true + }, + "verror": { + "version": "1.10.0", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true } } }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", - "dev": true + "gtoken": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", + "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", + "requires": { + "axios": "0.18.0", + "google-p12-pem": "1.0.2", + "jws": "3.1.4", + "mime": "2.3.1", + "pify": "3.0.0" + } }, "handlebars": { "version": "4.0.11", @@ -7100,7 +6532,7 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "5.2.3", + "ajv": "5.5.2", "har-schema": "2.0.0" } }, @@ -7126,9 +6558,9 @@ "dev": true }, "has-symbol-support-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.1.tgz", - "integrity": "sha512-JkaetveU7hFbqnAC1EV1sF4rlojU2D4Usc5CmS69l6NfmPDnpnFUegzFg33eDkkpNCxZ0mQp65HwUDrNFS/8MA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", "dev": true }, "has-to-string-tag-x": { @@ -7137,7 +6569,7 @@ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "has-symbol-support-x": "1.4.1" + "has-symbol-support-x": "1.4.2" } }, "has-value": { @@ -7148,13 +6580,6 @@ "get-value": "2.0.6", "has-values": "1.0.0", "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "has-values": { @@ -7166,24 +6591,6 @@ "kind-of": "4.0.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", @@ -7207,8 +6614,8 @@ "requires": { "boom": "4.3.1", "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.0.2" + "hoek": "4.2.1", + "sntp": "2.1.0" } }, "he": { @@ -7218,9 +6625,9 @@ "dev": true }, "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" }, "home-or-tmp": { "version": "2.0.0", @@ -7233,9 +6640,9 @@ } }, "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", "dev": true }, "htmlparser2": { @@ -7246,10 +6653,10 @@ "requires": { "domelementtype": "1.3.0", "domhandler": "2.4.1", - "domutils": "1.6.2", + "domutils": "1.7.0", "entities": "1.1.1", "inherits": "2.0.3", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "http-cache-semantics": { @@ -7265,7 +6672,7 @@ "requires": { "assert-plus": "1.0.0", "jsprim": "1.4.1", - "sshpk": "1.13.1" + "sshpk": "1.14.1" } }, "hullabaloo-config-manager": { @@ -7275,31 +6682,34 @@ "dev": true, "requires": { "dot-prop": "4.2.0", - "es6-error": "4.0.2", + "es6-error": "4.1.1", "graceful-fs": "4.1.11", "indent-string": "3.2.0", "json5": "0.5.1", "lodash.clonedeep": "4.5.0", "lodash.clonedeepwith": "4.5.0", "lodash.isequal": "4.5.0", - "lodash.merge": "4.6.0", + "lodash.merge": "4.6.1", "md5-hex": "2.0.0", "package-hash": "2.0.0", "pkg-dir": "2.0.0", "resolve-from": "3.0.0", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "dev": true, + "requires": { + "safer-buffer": "2.1.2" + } }, "ignore": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.5.tgz", - "integrity": "sha512-JLH93mL8amZQhh/p6mfQgVBH3M6epNq3DfsXsTSuSrInVjwyYlFE1nv2AgfRCC8PoOhM0jwQ5v8s9LgbK7yGDw==" + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", + "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==" }, "ignore-by-default": { "version": "1.0.1", @@ -7355,17 +6765,19 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, "ink-docstrap": { - "version": "git+https://github.com/docstrap/docstrap.git#f6585698b30598ce6dcb8fd2a7357f422a7d7094", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.2.tgz", + "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==", "dev": true, "requires": { - "moment": "2.19.1", - "sanitize-html": "1.14.1" + "moment": "2.22.1", + "sanitize-html": "1.18.2" } }, "inquirer": { @@ -7374,13 +6786,13 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "3.0.0", - "chalk": "2.1.0", + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", "cli-cursor": "2.1.0", "cli-width": "2.2.0", - "external-editor": "2.0.5", + "external-editor": "2.2.0", "figures": "2.0.0", - "lodash": "4.17.4", + "lodash": "4.17.10", "mute-stream": "0.0.7", "run-async": "2.3.0", "rx-lite": "4.0.8", @@ -7390,12 +6802,6 @@ "through": "2.3.8" }, "dependencies": { - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", - "dev": true - }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -7449,9 +6855,9 @@ } }, "invariant": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { "loose-envify": "1.3.1" @@ -7469,17 +6875,20 @@ "dev": true }, "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "6.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } } } }, @@ -7495,7 +6904,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.10.0" + "binary-extensions": "1.11.0" } }, "is-buffer": { @@ -7513,43 +6922,46 @@ } }, "is-ci": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", - "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "1.1.1" + "ci-info": "1.1.3" } }, "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "6.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } } } }, "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -7580,10 +6992,9 @@ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-finite": { "version": "1.0.2", @@ -7609,12 +7020,11 @@ "dev": true }, "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "1.0.0" + "is-extglob": "2.1.1" } }, "is-installed-globally": { @@ -7623,8 +7033,8 @@ "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, "requires": { - "global-dirs": "0.1.0", - "is-path-inside": "1.0.0" + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" } }, "is-npm": { @@ -7634,12 +7044,21 @@ "dev": true }, "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, "is-obj": { @@ -7655,12 +7074,12 @@ "dev": true }, "is-observable": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", - "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", + "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "symbol-observable": "0.2.4" + "symbol-observable": "1.2.0" } }, "is-odd": { @@ -7685,18 +7104,18 @@ "dev": true }, "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "1.0.0" + "is-path-inside": "1.0.1" } }, "is-path-inside": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", - "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { "path-is-inside": "1.0.2" @@ -7714,13 +7133,6 @@ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "is-posix-bracket": { @@ -7748,13 +7160,10 @@ "dev": true }, "is-resolvable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", - "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", - "dev": true, - "requires": { - "tryit": "1.0.3" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true }, "is-retry-allowed": { "version": "1.1.0", @@ -7769,9 +7178,9 @@ "dev": true }, "is-stream-ended": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.3.tgz", - "integrity": "sha1-oEc7Jnx1ZjVIa+7cfjNE5UnRUqw=" + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", + "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" }, "is-typedarray": { "version": "1.0.0", @@ -7779,9 +7188,9 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-url": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.2.tgz", - "integrity": "sha1-SYkFpZO/R8wtnn9zg3K792lsfyY=", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", "dev": true }, "is-utf8": { @@ -7807,13 +7216,9 @@ "dev": true }, "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "isstream": { "version": "0.1.2", @@ -7849,12 +7254,12 @@ "dev": true }, "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", "dev": true, "requires": { - "argparse": "1.0.9", + "argparse": "1.0.10", "esprima": "4.0.0" } }, @@ -7873,12 +7278,6 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, - "jschardet": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.1.tgz", - "integrity": "sha512-vE2hT1D0HLZCLLclfBSfkfTTedhVj0fubHpJBHKwwUWX0nSbhPAfk+SG9rTX95BYNmau8rGFfCeaT6T5OW1C2A==", - "dev": true - }, "jsdoc": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", @@ -7891,7 +7290,7 @@ "escape-string-regexp": "1.0.5", "js2xmlparser": "3.0.0", "klaw": "2.0.0", - "marked": "0.3.6", + "marked": "0.3.19", "mkdirp": "0.5.1", "requizzle": "0.2.1", "strip-json-comments": "2.0.1", @@ -7907,2211 +7306,3223 @@ } } }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-extend": { + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", + "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", + "dev": true + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "requires": { + "base64url": "2.0.0", + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.9", + "safe-buffer": "5.1.2" + } + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "requires": { + "base64url": "2.0.0", + "jwa": "1.1.5", + "safe-buffer": "5.1.2" + } + }, + "keyv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "klaw": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", + "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "last-line-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/last-line-stream/-/last-line-stream-1.0.0.tgz", + "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", + "dev": true, + "requires": { + "through2": "2.0.3" + } + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "4.0.1" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.clonedeepwith": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz", + "integrity": "sha1-buMFc6A6GmDWcKYu8zwQzxr9vdQ=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", "dev": true }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.merge": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", + "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==" + }, + "lodash.mergewith": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", + "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", "dev": true }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "lolex": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", + "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==", + "dev": true }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, - "json-stable-stringify": { + "longest": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, "requires": { - "jsonify": "0.0.0" + "js-tokens": "3.0.2" } }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "lru-cache": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "make-dir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", + "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "pify": "3.0.0" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" + "object-visit": "1.0.1" } }, - "just-extend": { - "version": "1.1.26", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.26.tgz", - "integrity": "sha512-IIG0FXHB/XpUZ7vGbktoc2EGsF+fLHJ1tU+vaqoKkVRBwH2FDxLTmkGkSp0XHRp6Y3KGZPIldH1YW8lOluGYrA==", + "marked": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", "dev": true }, - "jwa": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", - "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "matcher": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.0.tgz", + "integrity": "sha512-aZGv6JBTHqfqAd09jmAlbKnAICTfIvb5Z8gXVxPB5WZtFfHMaAMdACL7tQflD2V+6/8KNcY8s6DYtWLgpJP5lA==", + "dev": true, "requires": { - "base64url": "2.0.0", - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.9", - "safe-buffer": "5.1.1" + "escape-string-regexp": "1.0.5" } }, - "jws": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", - "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "md5-hex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", + "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", + "dev": true, "requires": { - "base64url": "2.0.0", - "jwa": "1.1.5", - "safe-buffer": "5.1.1" + "md5-o-matic": "0.1.1" } }, - "keyv": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", - "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "md5-o-matic": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", + "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "json-buffer": "3.0.0" + "mimic-fn": "1.2.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, "requires": { - "is-buffer": "1.1.6" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } } }, - "klaw": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", - "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge-estraverse-visitors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/merge-estraverse-visitors/-/merge-estraverse-visitors-1.0.0.tgz", + "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "estraverse": "4.2.0" } }, - "last-line-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/last-line-stream/-/last-line-stream-1.0.0.tgz", - "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", - "dev": true, + "merge2": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.1.tgz", + "integrity": "sha512-wUqcG5pxrAcaFI1lkqkMnk3Q7nUxV/NWfpAFSeWUwG9TRODnBDCUHa75mi3o3vLWQ5N4CQERWCauSlP0I3ZqUg==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "through2": "2.0.3" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "dev": true, + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "package-json": "4.0.1" + "mime-db": "1.33.0" } }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true }, - "lcid": { + "mimic-response": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "invert-kv": "1.0.0" + "brace-expansion": "1.1.11" } }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } } }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "minimist": "0.0.8" } }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "mocha": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.1.1.tgz", + "integrity": "sha512-kKKs/H1KrMMQIEsWNxGmb4/BGsmj0dkeyotEvbrAuQ01FcWRLssUNXCEUZk6SZtyJBi6EE7SL0zDDtItw1rGhw==", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "browser-stdout": "1.3.1", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } } }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.clonedeepwith": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz", - "integrity": "sha1-buMFc6A6GmDWcKYu8zwQzxr9vdQ=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "module-not-found-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", + "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", "dev": true }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "moment": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz", + "integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==", "dev": true }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true + "multi-stage-sourcemap": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/multi-stage-sourcemap/-/multi-stage-sourcemap-0.2.1.tgz", + "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", + "dev": true, + "requires": { + "source-map": "0.1.43" + }, + "dependencies": { + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" + } }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" }, - "lodash.merge": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz", - "integrity": "sha1-aYhLoUSsM/5plzemCG3v+t0PicU=" + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } }, - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "nise": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.3.tgz", + "integrity": "sha512-v1J/FLUB9PfGqZLGDBhQqODkbLotP0WtLo9R4EJY2PPu5f5Xg4o0rA8FDlmrjFSv9vBBKcfnOSpfYYuu5RTHqg==", "dev": true, "requires": { - "js-tokens": "3.0.2" + "@sinonjs/formatio": "2.0.0", + "just-extend": "1.1.27", + "lolex": "2.3.2", + "path-to-regexp": "1.7.0", + "text-encoding": "0.6.4" } }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "node-forge": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", + "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "prepend-http": "2.0.0", + "query-string": "5.1.1", + "sort-keys": "2.0.0" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + } } }, - "make-dir": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", - "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "pify": "3.0.0" + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "nyc": { + "version": "11.7.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.7.1.tgz", + "integrity": "sha512-EGePURSKUEpS1jWnEKAMhY+GWZzi7JC+f8iBDOATaOsLZW5hM/9eYx2dHGaEXa1ITvMm44CJugMksvP3NwMQMw==", + "dev": true, + "requires": { + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.1", + "debug-log": "1.0.1", + "default-require-extensions": "1.0.0", + "find-cache-dir": "0.1.1", + "find-up": "2.1.0", + "foreground-child": "1.5.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "1.10.1", + "istanbul-lib-report": "1.1.3", + "istanbul-lib-source-maps": "1.2.3", + "istanbul-reports": "1.4.0", + "md5-hex": "1.3.0", + "merge-source-map": "1.1.0", + "micromatch": "2.3.11", + "mkdirp": "0.5.1", + "resolve-from": "2.0.0", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "spawn-wrap": "1.4.2", + "test-exclude": "4.2.1", + "yargs": "11.1.0", + "yargs-parser": "8.1.0" }, "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "align-text": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "append-transform": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "requires": { + "default-require-extensions": "1.0.0" + } + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "arrify": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "async": { + "version": "1.5.2", + "bundled": true, + "dev": true + }, + "atob": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-generator": { + "version": "6.26.1", + "bundled": true, + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.5", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "core-js": "2.5.5", + "regenerator-runtime": "0.11.1" + } + }, + "babel-template": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.5" + } + }, + "babel-traverse": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.5" + } + }, + "babel-types": { + "version": "6.26.0", + "bundled": true, + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.5", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "bundled": true, + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, "dev": true - } - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "requires": { - "object-visit": "1.0.1" - } - }, - "marked": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", - "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=", - "dev": true - }, - "matcher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.0.0.tgz", - "integrity": "sha1-qvDEgW62m5IJRnQXViXzRmsOPhk=", - "dev": true, - "requires": { - "escape-string-regexp": "1.0.5" - } - }, - "md5-hex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", - "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", - "dev": true, - "requires": { - "md5-o-matic": "0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", - "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "1.1.0" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + }, + "base": { + "version": "0.11.2", + "bundled": true, + "dev": true, + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "bundled": true, + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "builtin-modules": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "caching-transform": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "md5-hex": "1.3.0", + "mkdirp": "0.5.1", + "write-file-atomic": "1.3.4" + } + }, + "camelcase": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true + }, + "center-align": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "class-utils": { + "version": "0.3.6", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "cliui": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "commondir": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "bundled": true, + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "core-js": { + "version": "2.5.5", + "bundled": true, + "dev": true + }, + "cross-spawn": { + "version": "4.0.2", + "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "lru-cache": "4.1.2", + "which": "1.3.0" } }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "debug": { + "version": "2.6.9", + "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "ms": "2.0.0" } }, - "minimist": { + "debug-log": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "decamelize": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "bundled": true, "dev": true }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "decode-uri-component": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "default-require-extensions": { + "version": "1.0.0", + "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "strip-bom": "2.0.0" } }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "define-property": { + "version": "2.0.2", + "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "detect-indent": { + "version": "4.0.0", + "bundled": true, "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "repeating": "2.0.1" } }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "error-ex": { + "version": "1.3.1", + "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "is-arrayish": "0.2.1" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "esutils": { + "version": "2.0.2", + "bundled": true, + "dev": true + }, + "execa": { + "version": "0.7.0", + "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + } } - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-estraverse-visitors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/merge-estraverse-visitors/-/merge-estraverse-visitors-1.0.0.tgz", - "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", - "dev": true, - "requires": { - "estraverse": "4.2.0" - } - }, - "merge2": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.1.tgz", - "integrity": "sha512-wUqcG5pxrAcaFI1lkqkMnk3Q7nUxV/NWfpAFSeWUwG9TRODnBDCUHa75mi3o3vLWQ5N4CQERWCauSlP0I3ZqUg==" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - } - }, - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" - }, - "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", - "requires": { - "mime-db": "1.30.0" - } - }, - "mimic-fn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", - "dev": true - }, - "mimic-response": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", - "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.8" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + }, + "expand-brackets": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "bundled": true, + "dev": true, "requires": { - "is-plain-object": "2.0.4" + "fill-range": "2.2.3" } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "mocha": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.4.tgz", - "integrity": "sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA==", - "dev": true, - "requires": { - "browser-stdout": "1.3.1", - "commander": "2.11.0", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.3", - "he": "1.1.1", - "mkdirp": "0.5.1", - "supports-color": "4.4.0" - }, - "dependencies": { - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - } - } - }, - "module-not-found-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", - "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", - "dev": true - }, - "moment": { - "version": "2.19.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.1.tgz", - "integrity": "sha1-VtoaLRy/AdOLfhr8McELz6GSkWc=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multi-stage-sourcemap": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/multi-stage-sourcemap/-/multi-stage-sourcemap-0.2.1.tgz", - "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", - "dev": true, - "requires": { - "source-map": "0.1.43" - }, - "dependencies": { - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "extend-shallow": { + "version": "3.0.2", + "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } } - } - } - }, - "multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", - "dev": true, - "requires": { - "array-differ": "1.0.0", - "array-union": "1.0.2", - "arrify": "1.0.1", - "minimatch": "3.0.4" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", - "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" - }, - "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", - "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, - "array-unique": { + "extglob": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + "bundled": true, + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "nise": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.2.0.tgz", - "integrity": "sha512-q9jXh3UNsMV28KeqI43ILz5+c3l+RiNW8mhurEwCKckuHQbL+hTJIKKTiUlCPKlgQ/OukFvSnKB/Jk3+sFbkGA==", - "dev": true, - "requires": { - "formatio": "1.2.0", - "just-extend": "1.1.26", - "lolex": "1.6.0", - "path-to-regexp": "1.7.0", - "text-encoding": "0.6.4" - }, - "dependencies": { - "lolex": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", - "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, - "normalize-url": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", - "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", - "dev": true, - "requires": { - "prepend-http": "2.0.0", - "query-string": "5.1.1", - "sort-keys": "2.0.0" - }, - "dependencies": { - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "filename-regex": { + "version": "2.0.1", + "bundled": true, "dev": true - } - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "2.0.1" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "nyc": { - "version": "11.2.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.2.1.tgz", - "integrity": "sha1-rYUK/p261/SXByi0suR/7Rw4chw=", - "dev": true, - "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.0", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.0.7", - "istanbul-lib-instrument": "1.8.0", - "istanbul-lib-report": "1.1.1", - "istanbul-lib-source-maps": "1.2.1", - "istanbul-reports": "1.1.2", - "md5-hex": "1.3.0", - "merge-source-map": "1.0.4", - "micromatch": "2.3.11", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.1", - "signal-exit": "3.0.2", - "spawn-wrap": "1.3.8", - "test-exclude": "4.1.1", - "yargs": "8.0.2", - "yargs-parser": "5.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", + }, + "fill-range": { + "version": "2.2.3", + "bundled": true, + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-cache-dir": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "requires": { + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "for-own": { + "version": "0.1.5", "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "for-in": "1.0.2" } }, - "amdefine": { - "version": "1.0.1", + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "4.0.2", + "signal-exit": "3.0.2" + } + }, + "fragment-cache": { + "version": "0.2.1", + "bundled": true, + "dev": true, + "requires": { + "map-cache": "0.2.2" + } + }, + "fs.realpath": { + "version": "1.0.0", "bundled": true, "dev": true }, - "ansi-regex": { - "version": "2.1.1", + "get-caller-file": { + "version": "1.0.2", "bundled": true, "dev": true }, - "ansi-styles": { - "version": "2.2.1", + "get-stream": { + "version": "3.0.0", "bundled": true, "dev": true }, - "append-transform": { - "version": "0.4.0", + "get-value": { + "version": "2.0.6", + "bundled": true, + "dev": true + }, + "glob": { + "version": "7.1.2", "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, - "archy": { - "version": "1.0.0", + "glob-base": { + "version": "0.3.0", "bundled": true, - "dev": true + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } }, - "arr-diff": { + "glob-parent": { "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0" + "is-glob": "2.0.1" } }, - "arr-flatten": { - "version": "1.1.0", + "globals": { + "version": "9.18.0", "bundled": true, "dev": true }, - "array-unique": { - "version": "0.2.1", + "graceful-fs": { + "version": "4.1.11", "bundled": true, "dev": true }, - "arrify": { - "version": "1.0.1", + "handlebars": { + "version": "4.0.11", + "bundled": true, + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "bundled": true, + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", "bundled": true, "dev": true }, - "async": { - "version": "1.5.2", + "has-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "hosted-git-info": { + "version": "2.6.0", "bundled": true, "dev": true }, - "babel-code-frame": { - "version": "6.26.0", + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", "bundled": true, "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "once": "1.4.0", + "wrappy": "1.0.2" } }, - "babel-generator": { - "version": "6.26.0", + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invariant": { + "version": "2.2.4", "bundled": true, "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "loose-envify": "1.3.1" } }, - "babel-messages": { - "version": "6.23.0", + "invert-kv": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0" + "kind-of": "3.2.2" } }, - "babel-runtime": { - "version": "6.26.0", + "is-arrayish": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "core-js": "2.5.1", - "regenerator-runtime": "0.11.0" + "builtin-modules": "1.1.1" } }, - "babel-template": { - "version": "6.26.0", + "is-data-descriptor": { + "version": "0.1.4", "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.4" + "kind-of": "3.2.2" } }, - "babel-traverse": { - "version": "6.26.0", + "is-descriptor": { + "version": "0.1.6", "bundled": true, "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.8", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } } }, - "babel-types": { - "version": "6.26.0", + "is-dotfile": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" + "is-primitive": "2.0.0" } }, - "babylon": { - "version": "6.18.0", + "is-extendable": { + "version": "0.1.1", "bundled": true, "dev": true }, - "balanced-match": { + "is-extglob": { "version": "1.0.0", "bundled": true, "dev": true }, - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", + "is-finite": { + "version": "1.0.2", "bundled": true, "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "number-is-nan": "1.0.1" } }, - "builtin-modules": { - "version": "1.1.1", + "is-fullwidth-code-point": { + "version": "2.0.0", "bundled": true, "dev": true }, - "caching-transform": { - "version": "1.0.1", + "is-glob": { + "version": "2.0.1", "bundled": true, "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "is-extglob": "1.0.0" } }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", + "is-number": { + "version": "2.1.0", "bundled": true, "dev": true, - "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "kind-of": "3.2.2" } }, - "chalk": { - "version": "1.1.3", + "is-odd": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "bundled": true, + "dev": true + } } }, - "cliui": { - "version": "2.1.0", + "is-plain-object": { + "version": "2.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" + "isobject": "3.0.1" }, "dependencies": { - "wordwrap": { - "version": "0.0.2", + "isobject": { + "version": "3.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, - "code-point-at": { - "version": "1.1.0", + "is-posix-bracket": { + "version": "0.1.1", "bundled": true, "dev": true }, - "commondir": { - "version": "1.0.1", + "is-primitive": { + "version": "2.0.0", "bundled": true, "dev": true }, - "concat-map": { - "version": "0.0.1", + "is-stream": { + "version": "1.1.0", "bundled": true, "dev": true }, - "convert-source-map": { - "version": "1.5.0", + "is-utf8": { + "version": "0.2.1", "bundled": true, "dev": true }, - "core-js": { - "version": "2.5.1", + "is-windows": { + "version": "1.0.2", "bundled": true, "dev": true }, - "cross-spawn": { - "version": "4.0.2", + "isarray": { + "version": "1.0.0", "bundled": true, - "dev": true, - "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" - } + "dev": true }, - "debug": { - "version": "2.6.8", + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "isobject": { + "version": "2.1.0", "bundled": true, "dev": true, "requires": { - "ms": "2.0.0" + "isarray": "1.0.0" } }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { + "istanbul-lib-coverage": { "version": "1.2.0", "bundled": true, "dev": true }, - "default-require-extensions": { - "version": "1.0.0", + "istanbul-lib-hook": { + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "append-transform": "0.4.0" } }, - "detect-indent": { - "version": "4.0.0", + "istanbul-lib-instrument": { + "version": "1.10.1", "bundled": true, "dev": true, "requires": { - "repeating": "2.0.1" + "babel-generator": "6.26.1", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.2.0", + "semver": "5.5.0" } }, - "error-ex": { - "version": "1.3.1", + "istanbul-lib-report": { + "version": "1.1.3", "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "esutils": { - "version": "2.0.2", - "bundled": true, - "dev": true - }, - "execa": { - "version": "0.7.0", + "istanbul-lib-source-maps": { + "version": "1.2.3", "bundled": true, "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "debug": "3.1.0", + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" }, "dependencies": { - "cross-spawn": { - "version": "5.1.0", + "debug": { + "version": "3.1.0", "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" + "ms": "2.0.0" } } } }, - "expand-brackets": { - "version": "0.1.5", + "istanbul-reports": { + "version": "1.4.0", "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "handlebars": "4.0.11" } }, - "expand-range": { - "version": "1.8.2", + "js-tokens": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "3.2.2", "bundled": true, "dev": true, "requires": { - "fill-range": "2.2.3" + "is-buffer": "1.1.6" } }, - "extglob": { - "version": "0.3.2", + "lazy-cache": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "invert-kv": "1.0.0" } }, - "filename-regex": { - "version": "2.0.1", + "load-json-file": { + "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } }, - "fill-range": { - "version": "2.2.3", + "locate-path": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + } } }, - "find-cache-dir": { - "version": "0.1.1", + "lodash": { + "version": "4.17.5", + "bundled": true, + "dev": true + }, + "longest": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "loose-envify": { + "version": "1.3.1", "bundled": true, "dev": true, "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" + "js-tokens": "3.0.2" } }, - "find-up": { - "version": "2.1.0", + "lru-cache": { + "version": "4.1.2", "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, - "for-in": { - "version": "1.0.2", + "map-cache": { + "version": "0.2.2", "bundled": true, "dev": true }, - "for-own": { - "version": "0.1.5", + "map-visit": { + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2" + "object-visit": "1.0.1" } }, - "foreground-child": { - "version": "1.5.6", + "md5-hex": { + "version": "1.3.0", "bundled": true, "dev": true, "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" + "md5-o-matic": "0.1.1" } }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", + "md5-o-matic": { + "version": "0.1.1", "bundled": true, "dev": true }, - "glob": { - "version": "7.1.2", + "mem": { + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "mimic-fn": "1.2.0" } }, - "glob-base": { - "version": "0.3.0", + "merge-source-map": { + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } } }, - "glob-parent": { - "version": "2.0.0", + "micromatch": { + "version": "2.3.11", "bundled": true, "dev": true, "requires": { - "is-glob": "2.0.1" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } }, - "globals": { - "version": "9.18.0", + "mimic-fn": { + "version": "1.2.0", "bundled": true, "dev": true }, - "graceful-fs": { - "version": "4.1.11", + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", "bundled": true, "dev": true }, - "handlebars": { - "version": "4.0.10", + "mixin-deep": { + "version": "1.3.1", "bundled": true, "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "for-in": "1.0.2", + "is-extendable": "1.0.1" }, "dependencies": { - "source-map": { - "version": "0.4.4", + "is-extendable": { + "version": "1.0.1", "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "is-plain-object": "2.0.4" } } } }, - "has-ansi": { - "version": "2.0.0", + "mkdirp": { + "version": "0.5.1", "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "minimist": "0.0.8" } }, - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "hosted-git-info": { - "version": "2.5.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", + "ms": { + "version": "2.0.0", "bundled": true, "dev": true }, - "inflight": { - "version": "1.0.6", + "nanomatch": { + "version": "1.2.9", "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, - "inherits": { - "version": "2.0.3", + "normalize-package-data": { + "version": "2.4.0", "bundled": true, - "dev": true + "dev": true, + "requires": { + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" + } }, - "invariant": { - "version": "2.2.2", + "normalize-path": { + "version": "2.1.1", "bundled": true, "dev": true, "requires": { - "loose-envify": "1.3.1" + "remove-trailing-separator": "1.1.0" } }, - "invert-kv": { - "version": "1.0.0", + "npm-run-path": { + "version": "2.0.2", "bundled": true, - "dev": true + "dev": true, + "requires": { + "path-key": "2.0.1" + } }, - "is-arrayish": { - "version": "0.2.1", + "number-is-nan": { + "version": "1.0.1", "bundled": true, "dev": true }, - "is-buffer": { - "version": "1.1.5", + "object-assign": { + "version": "4.1.1", "bundled": true, "dev": true }, - "is-builtin-module": { - "version": "1.0.0", + "object-copy": { + "version": "0.1.0", "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } } }, - "is-dotfile": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", + "object-visit": { + "version": "1.0.1", "bundled": true, "dev": true, "requires": { - "is-primitive": "2.0.0" + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } } }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-extglob": { - "version": "1.0.0", + "object.omit": { + "version": "2.0.1", "bundled": true, - "dev": true + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } }, - "is-finite": { - "version": "1.0.2", + "object.pick": { + "version": "1.3.0", "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } } }, - "is-fullwidth-code-point": { - "version": "1.0.0", + "once": { + "version": "1.4.0", "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "wrappy": "1.0.2" } }, - "is-glob": { - "version": "2.0.1", + "optimist": { + "version": "0.6.1", "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "minimist": "0.0.8", + "wordwrap": "0.0.3" } }, - "is-number": { + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-locale": { "version": "2.1.0", "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, - "is-posix-bracket": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "isarray": { + "p-finally": { "version": "1.0.0", "bundled": true, "dev": true }, - "isexe": { - "version": "2.0.0", + "p-limit": { + "version": "1.2.0", "bundled": true, - "dev": true + "dev": true, + "requires": { + "p-try": "1.0.0" + } }, - "isobject": { - "version": "2.1.0", + "p-locate": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "isarray": "1.0.0" + "p-limit": "1.2.0" } }, - "istanbul-lib-coverage": { - "version": "1.1.1", + "p-try": { + "version": "1.0.0", "bundled": true, "dev": true }, - "istanbul-lib-hook": { - "version": "1.0.7", + "parse-glob": { + "version": "3.0.4", "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" } }, - "istanbul-lib-instrument": { - "version": "1.8.0", + "parse-json": { + "version": "2.2.0", "bundled": true, "dev": true, "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" + "error-ex": "1.3.1" } }, - "istanbul-lib-report": { - "version": "1.1.1", + "pascalcase": { + "version": "0.1.1", "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" - }, - "dependencies": { - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "1.0.0" - } - } - } + "dev": true }, - "istanbul-lib-source-maps": { - "version": "1.2.1", + "path-exists": { + "version": "2.1.0", "bundled": true, "dev": true, "requires": { - "debug": "2.6.8", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.1", - "source-map": "0.5.7" + "pinkie-promise": "2.0.1" } }, - "istanbul-reports": { - "version": "1.1.2", + "path-is-absolute": { + "version": "1.0.1", "bundled": true, - "dev": true, - "requires": { - "handlebars": "4.0.10" - } + "dev": true }, - "js-tokens": { - "version": "3.0.2", + "path-key": { + "version": "2.0.1", "bundled": true, "dev": true }, - "jsesc": { - "version": "1.3.0", + "path-parse": { + "version": "1.0.5", "bundled": true, "dev": true }, - "kind-of": { - "version": "3.2.2", + "path-type": { + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.5" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, - "lazy-cache": { - "version": "1.0.4", + "pify": { + "version": "2.3.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "lcid": { - "version": "1.0.0", + "pinkie": { + "version": "2.0.4", "bundled": true, - "dev": true, - "requires": { - "invert-kv": "1.0.0" - } + "dev": true }, - "load-json-file": { - "version": "1.1.0", + "pinkie-promise": { + "version": "2.0.1", "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "pinkie": "2.0.4" } }, - "locate-path": { - "version": "2.0.0", + "pkg-dir": { + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "find-up": "1.1.2" }, "dependencies": { - "path-exists": { - "version": "3.0.0", + "find-up": { + "version": "1.1.2", "bundled": true, - "dev": true + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } } } }, - "lodash": { - "version": "4.17.4", + "posix-character-classes": { + "version": "0.1.1", "bundled": true, "dev": true }, - "longest": { - "version": "1.0.1", + "preserve": { + "version": "0.2.0", "bundled": true, "dev": true }, - "loose-envify": { - "version": "1.3.1", + "pseudomap": { + "version": "1.0.2", "bundled": true, - "dev": true, - "requires": { - "js-tokens": "3.0.2" - } + "dev": true }, - "lru-cache": { - "version": "4.1.1", + "randomatic": { + "version": "1.1.7", "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } } }, - "md5-hex": { - "version": "1.3.0", + "read-pkg": { + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", + "read-pkg-up": { + "version": "1.0.1", "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.1.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + } } }, - "merge-source-map": { - "version": "1.0.4", + "regenerator-runtime": { + "version": "0.11.1", + "bundled": true, + "dev": true + }, + "regex-cache": { + "version": "0.4.4", "bundled": true, "dev": true, "requires": { - "source-map": "0.5.7" + "is-equal-shallow": "0.1.3" } }, - "micromatch": { - "version": "2.3.11", + "regex-not": { + "version": "1.0.2", "bundled": true, "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, - "mimic-fn": { + "remove-trailing-separator": { "version": "1.1.0", "bundled": true, "dev": true }, - "minimatch": { - "version": "3.0.4", + "repeat-element": { + "version": "1.1.2", "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "1.1.8" - } + "dev": true }, - "minimist": { - "version": "0.0.8", + "repeat-string": { + "version": "1.6.1", "bundled": true, "dev": true }, - "mkdirp": { - "version": "0.5.1", + "repeating": { + "version": "2.0.1", "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8" + "is-finite": "1.0.2" } }, - "ms": { + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "resolve-from": { "version": "2.0.0", "bundled": true, "dev": true }, - "normalize-package-data": { - "version": "2.4.0", + "resolve-url": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "ret": { + "version": "0.1.15", + "bundled": true, + "dev": true + }, + "right-align": { + "version": "0.1.3", "bundled": true, "dev": true, + "optional": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "align-text": "0.1.4" } }, - "normalize-path": { - "version": "2.1.1", + "rimraf": { + "version": "2.6.2", "bundled": true, "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "glob": "7.1.2" } }, - "npm-run-path": { - "version": "2.0.2", + "safe-regex": { + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "ret": "0.1.15" } }, - "number-is-nan": { - "version": "1.0.1", + "semver": { + "version": "5.5.0", "bundled": true, "dev": true }, - "object-assign": { - "version": "4.1.1", + "set-blocking": { + "version": "2.0.0", "bundled": true, "dev": true }, - "object.omit": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" - } - }, - "once": { - "version": "1.4.0", + "set-value": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } } }, - "optimist": { - "version": "0.6.1", + "shebang-command": { + "version": "1.2.0", "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "shebang-regex": "1.0.0" } }, - "os-homedir": { - "version": "1.0.2", + "shebang-regex": { + "version": "1.0.0", "bundled": true, "dev": true }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", + "signal-exit": { + "version": "3.0.2", "bundled": true, "dev": true }, - "p-limit": { - "version": "1.1.0", + "slide": { + "version": "1.1.6", "bundled": true, "dev": true }, - "p-locate": { - "version": "2.0.0", + "snapdragon": { + "version": "0.8.2", "bundled": true, "dev": true, "requires": { - "p-limit": "1.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } } }, - "parse-glob": { - "version": "3.0.4", + "snapdragon-node": { + "version": "2.1.1", "bundled": true, "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, - "parse-json": { - "version": "2.2.0", + "snapdragon-util": { + "version": "3.0.1", "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "kind-of": "3.2.2" } }, - "path-exists": { - "version": "2.1.0", + "source-map": { + "version": "0.5.7", + "bundled": true, + "dev": true + }, + "source-map-resolve": { + "version": "0.5.1", "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "atob": "2.1.0", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, - "path-is-absolute": { - "version": "1.0.1", + "source-map-url": { + "version": "0.4.0", "bundled": true, "dev": true }, - "path-key": { - "version": "2.0.1", + "spawn-wrap": { + "version": "1.4.2", "bundled": true, - "dev": true + "dev": true, + "requires": { + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "which": "1.3.0" + } }, - "path-parse": { - "version": "1.0.5", + "spdx-correct": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", "bundled": true, "dev": true }, - "path-type": { - "version": "1.1.0", + "spdx-expression-parse": { + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, - "pify": { - "version": "2.3.0", + "spdx-license-ids": { + "version": "3.0.0", "bundled": true, "dev": true }, - "pinkie": { - "version": "2.0.4", + "split-string": { + "version": "3.1.0", "bundled": true, - "dev": true + "dev": true, + "requires": { + "extend-shallow": "3.0.2" + } }, - "pinkie-promise": { - "version": "2.0.1", + "static-extend": { + "version": "0.1.2", "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } } }, - "pkg-dir": { - "version": "1.0.0", + "string-width": { + "version": "2.1.1", "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" }, "dependencies": { - "find-up": { - "version": "1.1.2", + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "ansi-regex": "3.0.0" } } } }, - "preserve": { - "version": "0.2.0", + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", "bundled": true, "dev": true }, - "pseudomap": { - "version": "1.0.2", + "supports-color": { + "version": "2.0.0", "bundled": true, "dev": true }, - "randomatic": { - "version": "1.1.7", + "test-exclude": { + "version": "4.2.1", "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "arrify": "1.0.1", + "micromatch": "3.1.10", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" }, "dependencies": { - "is-number": { - "version": "3.0.0", + "arr-diff": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "braces": { + "version": "2.3.2", "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, "kind-of": { - "version": "3.2.2", + "version": "5.1.0", + "bundled": true, + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.5" + "is-extendable": "0.1.1" } } } }, - "kind-of": { + "fill-range": { "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.5" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" } - } - } - }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + }, + "micromatch": { + "version": "3.1.10", "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } } } }, - "regenerator-runtime": { - "version": "0.11.0", - "bundled": true, - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "is-equal-shallow": "0.1.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-finite": "1.0.2" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "0.1.4" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "dev": true, - "requires": { - "glob": "7.1.2" - } - }, - "semver": { - "version": "5.4.1", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", + "to-fast-properties": { + "version": "1.0.3", "bundled": true, "dev": true }, - "shebang-command": { - "version": "1.2.0", + "to-object-path": { + "version": "0.3.0", "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "kind-of": "3.2.2" } }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { + "to-regex": { "version": "3.0.2", "bundled": true, - "dev": true - }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.3.8", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.1", - "signal-exit": "3.0.2", - "which": "1.3.0" - } - }, - "spdx-correct": { - "version": "1.0.2", - "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, - "spdx-expression-parse": { - "version": "1.0.4", - "bundled": true, - "dev": true - }, - "spdx-license-ids": { - "version": "1.2.2", - "bundled": true, - "dev": true - }, - "string-width": { + "to-regex-range": { "version": "2.1.1", "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-number": "3.0.0", + "repeat-string": "1.6.1" }, "dependencies": { - "ansi-regex": { + "is-number": { "version": "3.0.0", "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "kind-of": "3.2.2" } } } }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-bom": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-utf8": "0.2.1" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, "trim-right": { "version": "1.0.1", "bundled": true, @@ -10146,15 +10557,108 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true + "optional": true + }, + "union-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unset-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "bundled": true, + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "bundled": true, + "dev": true + }, + "use": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } }, "validate-npm-package-license": { - "version": "3.0.1", + "version": "3.0.3", "bundled": true, "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "which": { @@ -10190,6 +10694,14 @@ "strip-ansi": "3.0.1" }, "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, "string-width": { "version": "1.0.2", "bundled": true, @@ -10228,97 +10740,54 @@ "dev": true }, "yargs": { - "version": "8.0.2", + "version": "11.1.0", "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", + "cliui": "4.0.0", "decamelize": "1.2.0", + "find-up": "2.1.0", "get-caller-file": "1.0.2", "os-locale": "2.1.0", - "read-pkg-up": "2.0.0", "require-directory": "2.1.1", "require-main-filename": "1.0.1", "set-blocking": "2.0.0", "string-width": "2.1.1", "which-module": "2.0.0", "y18n": "3.2.1", - "yargs-parser": "7.0.0" + "yargs-parser": "9.0.2" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, "camelcase": { "version": "4.1.0", "bundled": true, "dev": true }, "cliui": { - "version": "3.2.0", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", "wrap-ansi": "2.1.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "load-json-file": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" - } - }, - "path-type": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "pify": "2.3.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" } }, - "read-pkg-up": { - "version": "2.0.0", + "strip-ansi": { + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "ansi-regex": "3.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, "yargs-parser": { - "version": "7.0.0", + "version": "9.0.2", "bundled": true, "dev": true, "requires": { @@ -10328,15 +10797,15 @@ } }, "yargs-parser": { - "version": "5.0.0", + "version": "8.1.0", "bundled": true, "dev": true, "requires": { - "camelcase": "3.0.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { - "version": "3.0.0", + "version": "4.1.0", "bundled": true, "dev": true } @@ -10373,37 +10842,12 @@ "is-descriptor": "0.1.6" } }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } + "is-buffer": "1.1.6" } } } @@ -10419,13 +10863,6 @@ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "object.omit": { @@ -10444,13 +10881,6 @@ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "observable-to-promise": { @@ -10460,14 +10890,25 @@ "dev": true, "requires": { "is-observable": "0.2.0", - "symbol-observable": "1.0.4" + "symbol-observable": "1.2.0" }, "dependencies": { - "symbol-observable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", - "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=", - "dev": true + "is-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", + "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", + "dev": true, + "requires": { + "symbol-observable": "0.2.4" + }, + "dependencies": { + "symbol-observable": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", + "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", + "dev": true + } + } } } }, @@ -10485,7 +10926,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "1.2.0" } }, "optimist": { @@ -10570,10 +11011,13 @@ "dev": true }, "p-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", - "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", - "dev": true + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } }, "p-locate": { "version": "2.0.0", @@ -10581,9 +11025,24 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.1.0" + "p-limit": "1.2.0" + } + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "dev": true, + "requires": { + "p-finally": "1.0.0" } }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, "package-hash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-2.0.0.tgz", @@ -10603,9 +11062,9 @@ "dev": true, "requires": { "got": "6.7.1", - "registry-auth-token": "3.3.1", + "registry-auth-token": "3.3.2", "registry-url": "3.1.0", - "semver": "5.4.1" + "semver": "5.5.0" }, "dependencies": { "got": { @@ -10620,8 +11079,8 @@ "is-redirect": "1.0.0", "is-retry-allowed": "1.1.0", "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "safe-buffer": "5.1.1", + "lowercase-keys": "1.0.1", + "safe-buffer": "5.1.2", "timed-out": "4.0.1", "unzip-response": "2.0.1", "url-parse-lax": "1.0.0" @@ -10639,6 +11098,23 @@ "is-dotfile": "1.0.3", "is-extglob": "1.0.0", "is-glob": "2.0.1" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + } } }, "parse-json": { @@ -10651,9 +11127,9 @@ } }, "parse-ms": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", - "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-0.1.2.tgz", + "integrity": "sha1-3T+iXtbC78e93hKtm0bBY6opIk4=", "dev": true }, "pascalcase": { @@ -10713,12 +11189,11 @@ } }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "2.3.0" + "pify": "3.0.0" } }, "performance-now": { @@ -10727,34 +11202,57 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", + "integrity": "sha1-Wkfyi6EBXQIBvae/DzWOR77Ix+Q=", "dev": true }, "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", + "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "1.0.0" } }, "pkg-conf": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.0.0.tgz", - "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { "find-up": "2.1.0", - "load-json-file": "2.0.0" + "load-json-file": "4.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "1.3.1", + "json-parse-better-errors": "1.0.2" + } + } } }, "pkg-dir": { @@ -10786,10 +11284,29 @@ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, + "postcss": { + "version": "6.0.22", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", + "dev": true, + "requires": { + "chalk": "2.4.1", + "source-map": "0.6.1", + "supports-color": "5.4.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "power-assert": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.4.4.tgz", - "integrity": "sha1-kpXqdDcZb1pgH95CDwQmMRhtdRc=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.5.0.tgz", + "integrity": "sha512-WaWSw+Ts283o6dzxW1BxIxoaHok7aSSGx4SaR6dW62Pk31ynv9DERDieuZpPYv5XaJ+H+zdcOaJQ+PvlasAOVw==", "requires": { "define-properties": "1.1.2", "empower": "1.2.3", @@ -10803,7 +11320,7 @@ "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.1.1.tgz", "integrity": "sha1-7bo1LT7YpgMRTWZyZazOYNaJzN8=", "requires": { - "core-js": "2.5.1", + "core-js": "2.5.5", "power-assert-context-traversal": "1.1.1" } }, @@ -10814,16 +11331,9 @@ "requires": { "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.1", + "core-js": "2.5.5", "espurify": "1.7.0", "estraverse": "4.2.0" - }, - "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" - } } }, "power-assert-context-traversal": { @@ -10831,7 +11341,7 @@ "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.1.1.tgz", "integrity": "sha1-iMq8oNE7Y1nwfT0+ivppkmRXftk=", "requires": { - "core-js": "2.5.1", + "core-js": "2.5.5", "estraverse": "4.2.0" } }, @@ -10840,7 +11350,7 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.1", + "core-js": "2.5.5", "power-assert-context-formatter": "1.1.1", "power-assert-context-reducer-ast": "1.1.2", "power-assert-renderer-assertion": "1.1.1", @@ -10868,7 +11378,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.1.1.tgz", "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", "requires": { - "core-js": "2.5.1", + "core-js": "2.5.5", "diff-match-patch": "1.0.0", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", @@ -10880,7 +11390,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.1.2.tgz", "integrity": "sha1-ZV+PcRk1qbbVQbhjJ2VHF8Y3qYY=", "requires": { - "core-js": "2.5.1", + "core-js": "2.5.5", "power-assert-renderer-base": "1.1.1", "power-assert-util-string-width": "1.1.1", "stringifier": "1.3.0" @@ -10921,19 +11431,27 @@ "dev": true }, "prettier": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.7.4.tgz", - "integrity": "sha1-XoYkrpNjyA+V7GRFhOzfVddPk/o=", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.12.1.tgz", + "integrity": "sha1-wa0g6APndJ+vkFpAnSNn4Gu+cyU=", "dev": true }, "pretty-ms": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.0.1.tgz", - "integrity": "sha1-fBi3PCKKm49u3Cg1oSy49+2F+fQ=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", + "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", "dev": true, "requires": { "parse-ms": "1.0.1", "plur": "2.1.2" + }, + "dependencies": { + "parse-ms": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", + "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", + "dev": true + } } }, "private": { @@ -10943,9 +11461,9 @@ "dev": true }, "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, "progress": { "version": "2.0.0", @@ -10954,9 +11472,9 @@ "dev": true }, "protobufjs": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.0.tgz", - "integrity": "sha512-47Y49f5JN5Qsbxas2TyI2zFO8j9GpQAQm5thf54fr2O8qcP/jkIXYxmYx1hN2WQFAhESU1xpVn5NWVDBB8WFnw==", + "version": "6.8.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", + "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", "requires": { "@protobufjs/aspromise": "1.1.2", "@protobufjs/base64": "1.1.2", @@ -10969,8 +11487,8 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "7.0.43", - "long": "3.2.0" + "@types/node": "8.10.11", + "long": "4.0.0" } }, "proxyquire": { @@ -11020,26 +11538,6 @@ "kind-of": "4.0.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", @@ -11052,13 +11550,13 @@ } }, "rc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", - "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", + "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "dev": true, "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", + "deep-extend": "0.5.1", + "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" }, @@ -11080,6 +11578,23 @@ "load-json-file": "2.0.0", "normalize-package-data": "2.4.0", "path-type": "2.0.0" + }, + "dependencies": { + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "read-pkg-up": { @@ -11093,16 +11608,16 @@ } }, "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } }, @@ -11114,7 +11629,7 @@ "requires": { "graceful-fs": "4.1.11", "minimatch": "3.0.4", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "set-immediate-shim": "1.0.1" } }, @@ -11146,9 +11661,9 @@ "dev": true }, "regenerator-runtime": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", "dev": true }, "regex-cache": { @@ -11169,10 +11684,10 @@ "safe-regex": "1.1.0" } }, - "regexp-quote": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/regexp-quote/-/regexp-quote-0.0.0.tgz", - "integrity": "sha1-Hg9GUMhi3L/tVP1CsUjpuxch/PI=", + "regexpp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", "dev": true }, "regexpu-core": { @@ -11187,13 +11702,13 @@ } }, "registry-auth-token": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", - "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "1.2.2", - "safe-buffer": "5.1.1" + "rc": "1.2.7", + "safe-buffer": "5.1.2" } }, "registry-url": { @@ -11202,7 +11717,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.2" + "rc": "1.2.7" } }, "regjsgen": { @@ -11226,7 +11741,7 @@ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { - "es6-error": "4.0.2" + "es6-error": "4.1.1" } }, "remove-trailing-separator": { @@ -11255,32 +11770,32 @@ } }, "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "version": "2.85.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", + "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", "requires": { "aws-sign2": "0.7.0", - "aws4": "1.6.0", + "aws4": "1.7.0", "caseless": "0.12.0", - "combined-stream": "1.0.5", + "combined-stream": "1.0.6", "extend": "3.0.1", "forever-agent": "0.6.1", - "form-data": "2.3.1", + "form-data": "2.3.2", "har-validator": "5.0.3", "hawk": "6.0.2", "http-signature": "1.2.0", "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", + "mime-types": "2.1.18", "oauth-sign": "0.8.2", "performance-now": "2.1.0", "qs": "6.5.1", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "stringstream": "0.0.5", - "tough-cookie": "2.3.3", + "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", - "uuid": "3.1.0" + "uuid": "3.2.1" } }, "require-directory": { @@ -11368,7 +11883,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "1.0.0" + "lowercase-keys": "1.0.1" } }, "restore-cursor": { @@ -11435,9 +11950,9 @@ } }, "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex": { "version": "1.1.0", @@ -11447,6 +11962,12 @@ "ret": "0.1.15" } }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "samsam": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", @@ -11454,20 +11975,27 @@ "dev": true }, "sanitize-html": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.14.1.tgz", - "integrity": "sha1-cw/6Ikm98YMz7/5FsoYXPJxa0Lg=", + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.2.tgz", + "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", "dev": true, "requires": { + "chalk": "2.4.1", "htmlparser2": "3.9.2", - "regexp-quote": "0.0.0", + "lodash.clonedeep": "4.5.0", + "lodash.escaperegexp": "4.1.2", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", + "lodash.mergewith": "4.6.1", + "postcss": "6.0.22", + "srcset": "1.0.0", "xtend": "4.0.1" } }, "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, "semver-diff": { @@ -11476,7 +12004,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "5.4.1" + "semver": "5.5.0" } }, "serialize-error": { @@ -11539,6 +12067,21 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "sinon": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.3.0.tgz", + "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", + "dev": true, + "requires": { + "@sinonjs/formatio": "2.0.0", + "diff": "3.5.0", + "lodash.get": "4.4.2", + "lolex": "2.3.2", + "nise": "1.3.3", + "supports-color": "5.4.0", + "type-detect": "4.0.8" + } + }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -11582,14 +12125,6 @@ "use": "3.1.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -11605,57 +12140,6 @@ "requires": { "is-extendable": "0.1.1" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -11677,10 +12161,31 @@ "is-descriptor": "1.0.2" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } } } }, @@ -11690,14 +12195,24 @@ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, "sntp": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.0.2.tgz", - "integrity": "sha1-UGQRDwr4X3z9t9a2ekACjOUrSys=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", "requires": { - "hoek": "4.2.0" + "hoek": "4.2.1" } }, "sort-keys": { @@ -11719,7 +12234,7 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "requires": { - "atob": "2.0.3", + "atob": "2.1.1", "decode-uri-component": "0.2.0", "resolve-url": "0.2.1", "source-map-url": "0.4.0", @@ -11727,12 +12242,21 @@ } }, "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", + "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", "dev": true, "requires": { - "source-map": "0.5.7" + "buffer-from": "1.0.0", + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "source-map-url": { @@ -11741,24 +12265,35 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", "dev": true }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", "dev": true }, "split-string": { @@ -11775,10 +12310,20 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "srcset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/srcset/-/srcset-1.0.0.tgz", + "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", + "dev": true, + "requires": { + "array-uniq": "1.0.3", + "number-is-nan": "1.0.1" + } + }, "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", + "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", "requires": { "asn1": "0.2.3", "assert-plus": "1.0.0", @@ -11812,57 +12357,6 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -11894,11 +12388,11 @@ } }, "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "stringifier": { @@ -11906,7 +12400,7 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.1", + "core-js": "2.5.5", "traverse": "0.6.6", "type-name": "2.0.2" } @@ -11961,21 +12455,38 @@ "dev": true }, "superagent": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.0.tgz", - "integrity": "sha512-71XGWgtn70TNwgmgYa69dPOYg55aU9FCahjUNY03rOrKvaTCaU3b9MeZmqonmf9Od96SCxr3vGfEAnhM7dtxCw==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", + "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "dev": true, "requires": { "component-emitter": "1.2.1", "cookiejar": "2.1.1", "debug": "3.1.0", "extend": "3.0.1", - "form-data": "2.3.1", - "formidable": "1.1.1", + "form-data": "2.3.2", + "formidable": "1.2.1", "methods": "1.1.2", - "mime": "1.4.1", + "mime": "1.6.0", "qs": "6.5.1", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + } } }, "supertap": { @@ -11986,7 +12497,7 @@ "requires": { "arrify": "1.0.1", "indent-string": "3.2.0", - "js-yaml": "3.10.0", + "js-yaml": "3.11.0", "serialize-error": "2.1.0", "strip-ansi": "4.0.0" }, @@ -12015,22 +12526,30 @@ "dev": true, "requires": { "methods": "1.1.2", - "superagent": "3.8.0" + "superagent": "3.8.3" } }, "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "2.0.0" + "has-flag": "3.0.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + } } }, "symbol-observable": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", - "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", "dev": true }, "table": { @@ -12039,10 +12558,10 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "5.2.3", - "ajv-keywords": "2.1.0", - "chalk": "2.1.0", - "lodash": "4.17.4", + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.4.1", + "lodash": "4.17.10", "slice-ansi": "1.0.0", "string-width": "2.1.1" }, @@ -12118,7 +12637,7 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "xtend": "4.0.1" } }, @@ -12155,6 +12674,16 @@ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, "to-regex": { @@ -12175,22 +12704,12 @@ "requires": { "is-number": "3.0.0", "repeat-string": "1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - } - } } }, "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { "punycode": "1.4.1" } @@ -12218,18 +12737,12 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, - "tryit": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", - "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", - "dev": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "tweetnacl": { @@ -12247,6 +12760,12 @@ "prelude-ls": "1.1.2" } }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, "type-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/type-name/-/type-name-2.0.2.tgz", @@ -12455,11 +12974,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" } } }, @@ -12470,15 +12984,16 @@ "dev": true }, "update-notifier": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", - "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { - "boxen": "1.2.2", - "chalk": "2.1.0", - "configstore": "3.1.1", + "boxen": "1.3.0", + "chalk": "2.4.1", + "configstore": "3.1.2", "import-lazy": "2.1.0", + "is-ci": "1.1.0", "is-installed-globally": "0.1.0", "is-npm": "1.0.0", "latest-version": "3.1.0", @@ -12518,13 +13033,6 @@ "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } } }, "util-deprecate": { @@ -12533,18 +13041,18 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" }, "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "verror": { @@ -12579,12 +13087,45 @@ "dev": true }, "widest-line": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", - "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", + "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "dev": true, "requires": { - "string-width": "1.0.2" + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } } }, "window-size": { @@ -12640,7 +13181,7 @@ "requires": { "detect-indent": "5.0.0", "graceful-fs": "4.1.11", - "make-dir": "1.1.0", + "make-dir": "1.2.0", "pify": "3.0.0", "sort-keys": "2.0.0", "write-file-atomic": "2.3.0" @@ -12651,12 +13192,6 @@ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true } } }, @@ -12710,6 +13245,23 @@ "window-size": "0.1.4", "y18n": "3.2.1" } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } } } } From f2843e6b7382bb83f695fe9ba905d13662da0010 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 2 May 2018 15:10:08 -0700 Subject: [PATCH 130/488] chore: test on node10 (#49) --- .../.circleci/config.yml | 65 ++++++------------- 1 file changed, 20 insertions(+), 45 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 74c3b1aa3d9..80db1b5e3a1 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -19,12 +19,17 @@ workflows: filters: tags: only: /.*/ + - node10: + filters: + tags: + only: /.*/ - lint: requires: - node4 - node6 - node8 - node9 + - node10 filters: tags: only: /.*/ @@ -34,6 +39,7 @@ workflows: - node6 - node8 - node9 + - node10 filters: tags: only: /.*/ @@ -89,14 +95,15 @@ jobs: else echo "Not a nightly build, skipping this step." fi - - run: - name: Install modules and dependencies. - command: |- + - run: &npm_install_and_link + name: Install and link the module. + command: | npm install repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" if ! test -x "$repo_tools"; then chmod +x "$repo_tools" fi + npm link - run: name: Run unit tests. command: npm test @@ -116,22 +123,18 @@ jobs: docker: - image: 'node:9' steps: *unit_tests_steps + node10: + docker: + - image: 'node:10' + steps: *unit_tests_steps lint: docker: - image: 'node:8' steps: - checkout - run: *remove_package_lock - - run: - name: Install modules and dependencies. - command: | - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi - npm link - - run: + - run: *npm_install_and_link + - run: &samples_npm_install_and_link name: Link the module being tested to the samples. command: | cd samples/ @@ -147,14 +150,7 @@ jobs: steps: - checkout - run: *remove_package_lock - - run: - name: Install modules and dependencies. - command: |- - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi + - run: *npm_install_and_link - run: name: Build documentation. command: npm run docs @@ -170,22 +166,8 @@ jobs: openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - - run: - name: Install and link the module. - command: | - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi - npm link - - run: - name: Link the module being tested to the samples. - command: | - cd samples/ - npm link @google-cloud/language - npm install - cd .. + - run: *npm_install_and_link + - run: *samples_npm_install_and_link - run: name: Run sample tests. command: npm run samples-test @@ -209,14 +191,7 @@ jobs: openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - - run: - name: Install modules and dependencies. - command: |- - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi + - run: *npm_install_and_link - run: name: Run system tests. command: npm run system-test From ca05bb34255aa5713d78e5ce1dbb29b4cfab70e3 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 8 May 2018 14:27:07 -0700 Subject: [PATCH 131/488] chore: lock files maintenance (#50) * chore: lock files maintenance * chore: lock files maintenance --- .../google-cloud-language/package-lock.json | 517 ++++-------------- 1 file changed, 116 insertions(+), 401 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index f40820272cb..5285b087048 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -1907,9 +1907,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.10.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.11.tgz", - "integrity": "sha512-FM7tvbjbn2BUzM/Qsdk9LUGq3zeh7li8NcHoS398dBzqLzfmSqSP1+yKbMRTCcZzLcu2JAR5lq3IKIEYkto7iQ==" + "version": "8.10.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.12.tgz", + "integrity": "sha512-aRFUGj/f9JVA0qSQiCK9ebaa778mmqMIcy1eKnPktgfm9O6VsnIzzB5wJnjp9/jVrfm7fX1rr3OR1nndppGZUg==" }, "acorn": { "version": "4.0.13", @@ -2682,7 +2682,7 @@ "babel-generator": "6.26.1", "babylon": "6.18.0", "call-matcher": "1.0.1", - "core-js": "2.5.5", + "core-js": "2.5.6", "espower-location-detector": "1.0.0", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -2829,7 +2829,7 @@ "requires": { "babel-core": "6.26.3", "babel-runtime": "6.26.0", - "core-js": "2.5.5", + "core-js": "2.5.6", "home-or-tmp": "2.0.0", "lodash": "4.17.10", "mkdirp": "0.5.1", @@ -2853,7 +2853,7 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "regenerator-runtime": "0.11.1" } }, @@ -3206,7 +3206,7 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "deep-equal": "1.0.1", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -3677,9 +3677,9 @@ } }, "core-js": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", - "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=" + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", + "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==" }, "core-util-is": { "version": "1.0.2", @@ -4007,9 +4007,9 @@ "dev": true }, "duplexify": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", - "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "requires": { "end-of-stream": "1.4.1", "inherits": "2.0.3", @@ -4045,7 +4045,7 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "empower-core": "0.6.2" } }, @@ -4064,7 +4064,7 @@ "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.5" + "core-js": "2.5.6" } }, "end-of-stream": { @@ -4491,7 +4491,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", "requires": { - "core-js": "2.5.5" + "core-js": "2.5.6" } }, "esquery": { @@ -4662,7 +4662,7 @@ "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.21", + "iconv-lite": "0.4.22", "tmp": "0.0.33" } }, @@ -4749,7 +4749,7 @@ "@mrmlnc/readdir-enhanced": "2.2.1", "glob-parent": "3.1.0", "is-glob": "4.0.0", - "merge2": "1.2.1", + "merge2": "1.2.2", "micromatch": "3.1.10" } }, @@ -5670,12 +5670,12 @@ "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", "requires": { - "duplexify": "3.5.4", + "duplexify": "3.6.0", "extend": "3.0.1", "globby": "8.0.1", "google-auto-auth": "0.10.1", "google-proto-files": "0.15.1", - "grpc": "1.11.0", + "grpc": "1.11.3", "is-stream-ended": "0.1.4", "lodash": "4.17.10", "protobufjs": "6.8.6", @@ -5771,13 +5771,13 @@ "dev": true }, "grpc": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.11.0.tgz", - "integrity": "sha512-pTJjV/eatBQ6Rhc/jWNmUW9jE8fPrhcMYSWDSyf4l7ah1U3sIe4eIjqI/a3sm0zKbM5CuovV0ESrc+b04kr4Ig==", + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.11.3.tgz", + "integrity": "sha512-7fJ40USpnP7hxGK0uRoEhJz6unA5VUdwInfwAY2rK2+OVxdDJSdTZQ/8/M+1tW68pHZYgHvg2ohvJ+clhW3ANg==", "requires": { "lodash": "4.17.10", "nan": "2.10.0", - "node-pre-gyp": "0.7.0", + "node-pre-gyp": "0.10.0", "protobufjs": "5.0.2" }, "dependencies": { @@ -5785,16 +5785,6 @@ "version": "1.1.1", "bundled": true }, - "ajv": { - "version": "5.5.2", - "bundled": true, - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, "ansi-regex": { "version": "2.1.1", "bundled": true @@ -5811,52 +5801,10 @@ "readable-stream": "2.3.6" } }, - "asn1": { - "version": "0.2.3", - "bundled": true - }, - "assert-plus": { - "version": "1.0.0", - "bundled": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true - }, - "aws-sign2": { - "version": "0.7.0", - "bundled": true - }, - "aws4": { - "version": "1.7.0", - "bundled": true - }, "balanced-match": { "version": "1.0.0", "bundled": true }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "4.3.1", - "bundled": true, - "requires": { - "hoek": "4.2.1" - } - }, "brace-expansion": { "version": "1.1.11", "bundled": true, @@ -5865,25 +5813,14 @@ "concat-map": "0.0.1" } }, - "caseless": { - "version": "0.12.0", - "bundled": true - }, - "co": { - "version": "4.6.0", + "chownr": { + "version": "1.0.1", "bundled": true }, "code-point-at": { "version": "1.1.0", "bundled": true }, - "combined-stream": { - "version": "1.0.6", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, "concat-map": { "version": "0.0.1", "bundled": true @@ -5896,29 +5833,6 @@ "version": "1.0.2", "bundled": true }, - "cryptiles": { - "version": "3.1.2", - "bundled": true, - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "bundled": true, - "requires": { - "hoek": "4.2.1" - } - } - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - } - }, "debug": { "version": "2.6.9", "bundled": true, @@ -5927,11 +5841,7 @@ } }, "deep-extend": { - "version": "0.4.2", - "bundled": true - }, - "delayed-stream": { - "version": "1.0.0", + "version": "0.5.1", "bundled": true }, "delegates": { @@ -5942,66 +5852,17 @@ "version": "1.0.3", "bundled": true }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true - }, - "extsprintf": { - "version": "1.3.0", - "bundled": true - }, - "fast-deep-equal": { - "version": "1.1.0", - "bundled": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true - }, - "form-data": { - "version": "2.3.2", + "fs-minipass": { + "version": "1.2.5", "bundled": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "minipass": "2.2.4" } }, "fs.realpath": { "version": "1.0.0", "bundled": true }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, "gauge": { "version": "2.7.4", "bundled": true, @@ -6016,13 +5877,6 @@ "wide-align": "1.1.2" } }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - } - }, "glob": { "version": "7.1.2", "bundled": true, @@ -6035,47 +5889,19 @@ "path-is-absolute": "1.0.1" } }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "har-schema": { - "version": "2.0.0", - "bundled": true - }, - "har-validator": { - "version": "5.0.3", - "bundled": true, - "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" - } - }, "has-unicode": { "version": "2.0.1", "bundled": true }, - "hawk": { - "version": "6.0.2", - "bundled": true, - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.1", - "sntp": "2.1.0" - } - }, - "hoek": { - "version": "4.2.1", + "iconv-lite": { + "version": "0.4.19", "bundled": true }, - "http-signature": { - "version": "1.2.0", + "ignore-walk": { + "version": "3.0.1", "bundled": true, "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.14.1" + "minimatch": "3.0.4" } }, "inflight": { @@ -6101,67 +5927,36 @@ "number-is-nan": "1.0.1" } }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true - }, "isarray": { "version": "1.0.0", "bundled": true }, - "isstream": { - "version": "0.1.2", - "bundled": true - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "bundled": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true - }, - "jsprim": { - "version": "1.4.1", + "minimatch": { + "version": "3.0.4", "bundled": true, "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" + "brace-expansion": "1.1.11" } }, - "mime-db": { - "version": "1.33.0", + "minimist": { + "version": "1.2.0", "bundled": true }, - "mime-types": { - "version": "2.1.18", + "minipass": { + "version": "2.2.4", "bundled": true, "requires": { - "mime-db": "1.33.0" + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, - "minimatch": { - "version": "3.0.4", + "minizlib": { + "version": "1.1.0", "bundled": true, "requires": { - "brace-expansion": "1.1.11" + "minipass": "2.2.4" } }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, "mkdirp": { "version": "0.5.1", "bundled": true, @@ -6179,20 +5974,29 @@ "version": "2.0.0", "bundled": true }, + "needle": { + "version": "2.2.1", + "bundled": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.19", + "sax": "1.2.4" + } + }, "node-pre-gyp": { - "version": "0.7.0", + "version": "0.10.0", "bundled": true, "requires": { "detect-libc": "1.0.3", "mkdirp": "0.5.1", + "needle": "2.2.1", "nopt": "4.0.1", + "npm-packlist": "1.1.10", "npmlog": "4.1.2", - "rc": "1.2.6", - "request": "2.83.0", + "rc": "1.2.7", "rimraf": "2.6.2", "semver": "5.5.0", - "tar": "2.2.1", - "tar-pack": "3.4.1" + "tar": "4.4.2" } }, "nopt": { @@ -6203,6 +6007,18 @@ "osenv": "0.1.5" } }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" + } + }, "npmlog": { "version": "4.1.2", "bundled": true, @@ -6217,10 +6033,6 @@ "version": "1.0.1", "bundled": true }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true - }, "object-assign": { "version": "4.1.1", "bundled": true @@ -6252,10 +6064,6 @@ "version": "1.0.1", "bundled": true }, - "performance-now": { - "version": "2.1.0", - "bundled": true - }, "process-nextick-args": { "version": "2.0.0", "bundled": true @@ -6271,19 +6079,11 @@ "yargs": "3.32.0" } }, - "punycode": { - "version": "1.4.1", - "bundled": true - }, - "qs": { - "version": "6.5.1", - "bundled": true - }, "rc": { - "version": "1.2.6", + "version": "1.2.7", "bundled": true, "requires": { - "deep-extend": "0.4.2", + "deep-extend": "0.5.1", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" @@ -6302,34 +6102,6 @@ "util-deprecate": "1.0.2" } }, - "request": { - "version": "2.83.0", - "bundled": true, - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.7.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" - } - }, "rimraf": { "version": "2.6.2", "bundled": true, @@ -6341,6 +6113,10 @@ "version": "5.1.1", "bundled": true }, + "sax": { + "version": "1.2.4", + "bundled": true + }, "semver": { "version": "5.5.0", "bundled": true @@ -6353,27 +6129,6 @@ "version": "3.0.2", "bundled": true }, - "sntp": { - "version": "2.1.0", - "bundled": true, - "requires": { - "hoek": "4.2.1" - } - }, - "sshpk": { - "version": "1.14.1", - "bundled": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - } - }, "string-width": { "version": "1.0.2", "bundled": true, @@ -6390,10 +6145,6 @@ "safe-buffer": "5.1.1" } }, - "stringstream": { - "version": "0.0.5", - "bundled": true - }, "strip-ansi": { "version": "3.0.1", "bundled": true, @@ -6406,68 +6157,28 @@ "bundled": true }, "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.1", - "bundled": true, - "requires": { - "debug": "2.6.9", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.3.6", - "rimraf": "2.6.2", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.4", - "bundled": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", + "version": "4.4.2", "bundled": true, "requires": { - "safe-buffer": "5.1.1" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.2", + "yallist": "3.0.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "bundled": true + } } }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true - }, "util-deprecate": { "version": "1.0.2", "bundled": true }, - "uuid": { - "version": "3.2.1", - "bundled": true - }, - "verror": { - "version": "1.10.0", - "bundled": true, - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" - } - }, "wide-align": { "version": "1.1.2", "bundled": true, @@ -6478,6 +6189,10 @@ "wrappy": { "version": "1.0.2", "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true } } }, @@ -6698,9 +6413,9 @@ } }, "iconv-lite": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", - "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "version": "0.4.22", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.22.tgz", + "integrity": "sha512-1AinFBeDTnsvVEP+V1QBlHpM1UZZl7gWB6fcz7B1Ho+LI1dUh2sSrxoCfVt2PinRHzXAziSniEV3P7JbTDHcXA==", "dev": true, "requires": { "safer-buffer": "2.1.2" @@ -7829,9 +7544,9 @@ } }, "merge2": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.1.tgz", - "integrity": "sha512-wUqcG5pxrAcaFI1lkqkMnk3Q7nUxV/NWfpAFSeWUwG9TRODnBDCUHa75mi3o3vLWQ5N4CQERWCauSlP0I3ZqUg==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", + "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==" }, "methods": { "version": "1.1.2", @@ -11320,7 +11035,7 @@ "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.1.1.tgz", "integrity": "sha1-7bo1LT7YpgMRTWZyZazOYNaJzN8=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "power-assert-context-traversal": "1.1.1" } }, @@ -11331,7 +11046,7 @@ "requires": { "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.5", + "core-js": "2.5.6", "espurify": "1.7.0", "estraverse": "4.2.0" } @@ -11341,7 +11056,7 @@ "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.1.1.tgz", "integrity": "sha1-iMq8oNE7Y1nwfT0+ivppkmRXftk=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "estraverse": "4.2.0" } }, @@ -11350,7 +11065,7 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "power-assert-context-formatter": "1.1.1", "power-assert-context-reducer-ast": "1.1.2", "power-assert-renderer-assertion": "1.1.1", @@ -11378,7 +11093,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.1.1.tgz", "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "diff-match-patch": "1.0.0", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", @@ -11390,7 +11105,7 @@ "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.1.2.tgz", "integrity": "sha1-ZV+PcRk1qbbVQbhjJ2VHF8Y3qYY=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "power-assert-renderer-base": "1.1.1", "power-assert-util-string-width": "1.1.1", "stringifier": "1.3.0" @@ -11487,7 +11202,7 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "8.10.11", + "@types/node": "8.10.12", "long": "4.0.0" } }, @@ -11513,9 +11228,9 @@ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "query-string": { "version": "5.1.1", @@ -11790,7 +11505,7 @@ "mime-types": "2.1.18", "oauth-sign": "0.8.2", "performance-now": "2.1.0", - "qs": "6.5.1", + "qs": "6.5.2", "safe-buffer": "5.1.2", "stringstream": "0.0.5", "tough-cookie": "2.3.4", @@ -12400,7 +12115,7 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "traverse": "0.6.6", "type-name": "2.0.2" } @@ -12468,7 +12183,7 @@ "formidable": "1.2.1", "methods": "1.1.2", "mime": "1.6.0", - "qs": "6.5.1", + "qs": "6.5.2", "readable-stream": "2.3.6" }, "dependencies": { From 2623c9d130f7d48101352d00877546f4878ca055 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 16 May 2018 16:52:16 -0700 Subject: [PATCH 132/488] chore: timeout for system test (#51) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 2f4c7bfae88..7d3d2cfaa1c 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -55,7 +55,7 @@ "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/", "prettier": "repo-tools exec -- prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", "samples-test": "cd samples/ && npm test && cd ../", - "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --timeout 5000", + "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --timeout 600000", "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", "test": "repo-tools test run --cmd npm -- run cover" }, From 90447d65c406992e02a0d850be2a68233704dad0 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 22 May 2018 11:32:04 -0700 Subject: [PATCH 133/488] chore: lock files maintenance (#53) * chore: lock files maintenance * chore: lock files maintenance --- .../google-cloud-language/package-lock.json | 738 ++++++++---------- 1 file changed, 312 insertions(+), 426 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index 5285b087048..11104f34a3b 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -1832,6 +1832,11 @@ "glob-to-regexp": "0.3.0" } }, + "@nodelib/fs.stat": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.0.2.tgz", + "integrity": "sha512-vCpf75JDcdomXvUd7Rn6DfYAVqPAFI66FVjxiWGwh85OLdvfo3paBoPJaam5keIYRyUolnS7SleS/ZPCidCvzw==" + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -1894,7 +1899,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -1907,9 +1912,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.10.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.12.tgz", - "integrity": "sha512-aRFUGj/f9JVA0qSQiCK9ebaa778mmqMIcy1eKnPktgfm9O6VsnIzzB5wJnjp9/jVrfm7fX1rr3OR1nndppGZUg==" + "version": "8.10.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.17.tgz", + "integrity": "sha512-3N3FRd/rA1v5glXjb90YdYUa+sOB7WrkU2rAhKZnF4TKD86Cym9swtulGuH0p9nxo7fP5woRNa8b0oFTpCO1bg==" }, "acorn": { "version": "4.0.13", @@ -2253,9 +2258,9 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "requires": { "lodash": "4.17.10" } @@ -2345,7 +2350,7 @@ "lodash.difference": "4.5.0", "lodash.flatten": "4.4.0", "loud-rejection": "1.6.0", - "make-dir": "1.2.0", + "make-dir": "1.3.0", "matcher": "1.1.0", "md5-hex": "2.0.0", "meow": "3.7.0", @@ -2362,7 +2367,7 @@ "safe-buffer": "5.1.2", "semver": "5.5.0", "slash": "1.0.0", - "source-map-support": "0.5.5", + "source-map-support": "0.5.6", "stack-utils": "1.0.1", "strip-ansi": "4.0.0", "strip-bom-buf": "1.0.0", @@ -2461,7 +2466,7 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "1.4.1", + "follow-redirects": "1.5.0", "is-buffer": "1.1.6" } }, @@ -2684,7 +2689,7 @@ "call-matcher": "1.0.1", "core-js": "2.5.6", "espower-location-detector": "1.0.0", - "espurify": "1.7.0", + "espurify": "1.8.0", "estraverse": "4.2.0" } }, @@ -2960,11 +2965,6 @@ } } }, - "base64url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", - "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" - }, "bcrypt-pbkdf": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", @@ -2986,14 +2986,6 @@ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", "dev": true }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.2.1" - } - }, "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", @@ -3208,7 +3200,7 @@ "requires": { "core-js": "2.5.6", "deep-equal": "1.0.1", - "espurify": "1.7.0", + "espurify": "1.8.0", "estraverse": "4.2.0" } }, @@ -3308,7 +3300,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.2.3", + "fsevents": "1.2.4", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -3506,13 +3498,13 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codecov": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.1.tgz", - "integrity": "sha512-0TjnXrbvcPzAkRPv/Y5D8aZju/M5adkFxShRyMMgDReB8EV9nF4XMERXs6ajgLA1di9LUFW2tgePDQd2JPWy7g==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.2.tgz", + "integrity": "sha512-9ljtIROIjPIUmMRqO+XuDITDoV8xRrZmA0jcEq6p2hg2+wY9wGmLfreAZGIL72IzUfdEDZaU8+Vjidg1fBQ8GQ==", "dev": true, "requires": { "argv": "0.0.2", - "request": "2.85.0", + "request": "2.87.0", "urlgrey": "0.4.4" } }, @@ -3560,9 +3552,9 @@ } }, "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, "common-path-prefix": { @@ -3637,7 +3629,7 @@ "requires": { "dot-prop": "4.2.0", "graceful-fs": "4.1.11", - "make-dir": "1.2.0", + "make-dir": "1.3.0", "unique-string": "1.0.0", "write-file-atomic": "2.3.0", "xdg-basedir": "3.0.0" @@ -3701,29 +3693,11 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "shebang-command": "1.2.0", "which": "1.3.0" } }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "requires": { - "hoek": "4.2.1" - } - } - } - }, "crypto-random-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", @@ -3926,9 +3900,9 @@ "dev": true }, "diff-match-patch": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.0.tgz", - "integrity": "sha1-HMPIOkkNZ/ldkeOfatHy4Ia2MEg=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.1.tgz", + "integrity": "sha512-A0QEhr4PxGUMEtKxd6X+JLnOTFd3BfIPSDpsc4dMvj+CbSaErDwTpoTo/nFJDMSrjxLW4BiNq+FbNisAAHhWeQ==" }, "dir-glob": { "version": "2.0.0", @@ -3973,9 +3947,9 @@ "dev": true }, "domhandler": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", - "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { "domelementtype": "1.3.0" @@ -4032,11 +4006,10 @@ } }, "ecdsa-sig-formatter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", - "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", + "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", "requires": { - "base64url": "2.0.0", "safe-buffer": "5.1.2" } }, @@ -4382,9 +4355,9 @@ "dev": true }, "espower": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/espower/-/espower-2.1.0.tgz", - "integrity": "sha1-zh7bPZhwKEH99ZbRy46FvcSujkg=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/espower/-/espower-2.1.1.tgz", + "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", "dev": true, "requires": { "array-find": "1.0.0", @@ -4392,7 +4365,7 @@ "escodegen": "1.9.1", "escope": "3.6.0", "espower-location-detector": "1.0.0", - "espurify": "1.7.0", + "espurify": "1.8.0", "estraverse": "4.2.0", "source-map": "0.5.7", "type-name": "2.0.2", @@ -4446,7 +4419,7 @@ "convert-source-map": "1.5.1", "empower-assert": "1.1.0", "escodegen": "1.9.1", - "espower": "2.1.0", + "espower": "2.1.1", "estraverse": "4.2.0", "merge-estraverse-visitors": "1.0.0", "multi-stage-sourcemap": "0.2.1", @@ -4487,9 +4460,9 @@ "dev": true }, "espurify": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", - "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", + "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", "requires": { "core-js": "2.5.6" } @@ -4586,18 +4559,18 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.3" + "fill-range": "2.2.4" }, "dependencies": { "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { "is-number": "2.1.0", "isobject": "2.1.0", - "randomatic": "1.1.7", + "randomatic": "3.0.0", "repeat-element": "1.1.2", "repeat-string": "1.6.1" } @@ -4662,7 +4635,7 @@ "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.22", + "iconv-lite": "0.4.23", "tmp": "0.0.33" } }, @@ -4742,11 +4715,12 @@ "dev": true }, "fast-glob": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.1.tgz", - "integrity": "sha512-wSyW1TBK3ia5V+te0rGPXudeMHoUQW6O5Y9oATiaGhpENmEifPDlOdhpsnlj5HoG6ttIvGiY1DdCmI9X2xGMhg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", + "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "requires": { "@mrmlnc/readdir-enhanced": "2.2.1", + "@nodelib/fs.stat": "1.0.2", "glob-parent": "3.1.0", "is-glob": "4.0.0", "merge2": "1.2.2", @@ -4827,7 +4801,7 @@ "dev": true, "requires": { "commondir": "1.0.1", - "make-dir": "1.2.0", + "make-dir": "1.3.0", "pkg-dir": "2.0.0" } }, @@ -4859,9 +4833,9 @@ "dev": true }, "follow-redirects": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", - "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", + "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", "requires": { "debug": "3.1.0" }, @@ -4951,14 +4925,14 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz", - "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", "dev": true, "optional": true, "requires": { "nan": "2.10.0", - "node-pre-gyp": "0.9.1" + "node-pre-gyp": "0.10.0" }, "dependencies": { "abbrev": { @@ -5039,7 +5013,7 @@ } }, "deep-extend": { - "version": "0.4.2", + "version": "0.5.1", "bundled": true, "dev": true, "optional": true @@ -5217,7 +5191,7 @@ } }, "node-pre-gyp": { - "version": "0.9.1", + "version": "0.10.0", "bundled": true, "dev": true, "optional": true, @@ -5228,7 +5202,7 @@ "nopt": "4.0.1", "npm-packlist": "1.1.10", "npmlog": "4.1.2", - "rc": "1.2.6", + "rc": "1.2.7", "rimraf": "2.6.2", "semver": "5.5.0", "tar": "4.4.1" @@ -5326,12 +5300,12 @@ "optional": true }, "rc": { - "version": "1.2.6", + "version": "1.2.7", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "0.4.2", + "deep-extend": "0.5.1", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" @@ -5633,7 +5607,7 @@ "requires": { "array-union": "1.0.2", "dir-glob": "2.0.0", - "fast-glob": "2.2.1", + "fast-glob": "2.2.2", "glob": "7.1.2", "ignore": "3.3.8", "pify": "3.0.0", @@ -5641,16 +5615,16 @@ } }, "google-auth-library": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.4.0.tgz", - "integrity": "sha512-vWRx6pJulK7Y5V/Xyr7MPMlx2mWfmrUVbcffZ7hpq8ElFg5S8WY6PvjMovdcr6JfuAwwpAX4R0I1XOcyWuBcUw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.5.0.tgz", + "integrity": "sha512-xpibA/hkq4waBcpIkSJg4GiDAqcBWjJee3c47zj7xP3RQ0A9mc8MP3Vc9sc8SGRoDYA0OszZxTjW7SbcC4pJIA==", "requires": { "axios": "0.18.0", "gcp-metadata": "0.6.3", "gtoken": "2.3.0", - "jws": "3.1.4", + "jws": "3.1.5", "lodash.isstring": "4.0.1", - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "retry-axios": "0.3.2" } }, @@ -5659,10 +5633,10 @@ "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "requires": { - "async": "2.6.0", + "async": "2.6.1", "gcp-metadata": "0.6.3", - "google-auth-library": "1.4.0", - "request": "2.85.0" + "google-auth-library": "1.5.0", + "request": "2.87.0" } }, "google-gax": { @@ -5765,9 +5739,9 @@ "dev": true }, "growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, "grpc": { @@ -5778,7 +5752,7 @@ "lodash": "4.17.10", "nan": "2.10.0", "node-pre-gyp": "0.10.0", - "protobufjs": "5.0.2" + "protobufjs": "5.0.3" }, "dependencies": { "abbrev": { @@ -6069,9 +6043,9 @@ "bundled": true }, "protobufjs": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.2.tgz", - "integrity": "sha1-WXSNfc8D0tsiwT2p/rAk4Wq4DJE=", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", + "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", "requires": { "ascli": "1.0.1", "bytebuffer": "5.0.1", @@ -6203,7 +6177,7 @@ "requires": { "axios": "0.18.0", "google-p12-pem": "1.0.2", - "jws": "3.1.4", + "jws": "3.1.5", "mime": "2.3.1", "pify": "3.0.0" } @@ -6322,28 +6296,12 @@ "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=", "dev": true }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.1", - "sntp": "2.1.0" - } - }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, - "hoek": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", - "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -6367,7 +6325,7 @@ "dev": true, "requires": { "domelementtype": "1.3.0", - "domhandler": "2.4.1", + "domhandler": "2.4.2", "domutils": "1.7.0", "entities": "1.1.1", "inherits": "2.0.3", @@ -6413,9 +6371,9 @@ } }, "iconv-lite": { - "version": "0.4.22", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.22.tgz", - "integrity": "sha512-1AinFBeDTnsvVEP+V1QBlHpM1UZZl7gWB6fcz7B1Ho+LI1dUh2sSrxoCfVt2PinRHzXAziSniEV3P7JbTDHcXA==", + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { "safer-buffer": "2.1.2" @@ -7093,23 +7051,21 @@ "dev": true }, "jwa": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", - "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz", + "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==", "requires": { - "base64url": "2.0.0", "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.9", + "ecdsa-sig-formatter": "1.0.10", "safe-buffer": "5.1.2" } }, "jws": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", - "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", + "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", "requires": { - "base64url": "2.0.0", - "jwa": "1.1.5", + "jwa": "1.1.6", "safe-buffer": "5.1.2" } }, @@ -7291,9 +7247,9 @@ "dev": true }, "lolex": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", - "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.6.0.tgz", + "integrity": "sha512-e1UtIo1pbrIqEXib/yMjHciyqkng5lc0rrIbytgjmRgDR9+2ceNIAcwOWSgylRjoEP9VdVguCSRwnNmlbnOUwA==", "dev": true }, "long": { @@ -7333,18 +7289,18 @@ "dev": true }, "lru-cache": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", - "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { "pseudomap": "1.0.2", "yallist": "2.1.2" } }, "make-dir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", - "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { "pify": "3.0.0" @@ -7384,6 +7340,12 @@ "escape-string-regexp": "1.0.5" } }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, "md5-hex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", @@ -7647,22 +7609,22 @@ } }, "mocha": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.1.1.tgz", - "integrity": "sha512-kKKs/H1KrMMQIEsWNxGmb4/BGsmj0dkeyotEvbrAuQ01FcWRLssUNXCEUZk6SZtyJBi6EE7SL0zDDtItw1rGhw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", "dev": true, "requires": { "browser-stdout": "1.3.1", - "commander": "2.11.0", + "commander": "2.15.1", "debug": "3.1.0", "diff": "3.5.0", "escape-string-regexp": "1.0.5", "glob": "7.1.2", - "growl": "1.10.3", + "growl": "1.10.5", "he": "1.1.1", "minimatch": "3.0.4", "mkdirp": "0.5.1", - "supports-color": "4.4.0" + "supports-color": "5.4.0" }, "dependencies": { "debug": { @@ -7673,15 +7635,6 @@ "requires": { "ms": "2.0.0" } - }, - "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } } } }, @@ -7784,7 +7737,7 @@ "requires": { "@sinonjs/formatio": "2.0.0", "just-extend": "1.1.27", - "lolex": "2.3.2", + "lolex": "2.6.0", "path-to-regexp": "1.7.0", "text-encoding": "0.6.4" } @@ -7849,9 +7802,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { - "version": "11.7.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.7.1.tgz", - "integrity": "sha512-EGePURSKUEpS1jWnEKAMhY+GWZzi7JC+f8iBDOATaOsLZW5hM/9eYx2dHGaEXa1ITvMm44CJugMksvP3NwMQMw==", + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.8.0.tgz", + "integrity": "sha512-PUFq1PSsx5OinSk5g5aaZygcDdI3QQT5XUlbR9QRMihtMS6w0Gm8xj4BxmKeeAlpQXC5M2DIhH16Y+KejceivQ==", "dev": true, "requires": { "archy": "1.0.0", @@ -7872,7 +7825,7 @@ "istanbul-reports": "1.4.0", "md5-hex": "1.3.0", "merge-source-map": "1.1.0", - "micromatch": "2.3.11", + "micromatch": "3.1.10", "mkdirp": "0.5.1", "resolve-from": "2.0.0", "rimraf": "2.6.2", @@ -7922,12 +7875,9 @@ "dev": true }, "arr-diff": { - "version": "2.0.0", + "version": "4.0.0", "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "1.1.0" - } + "dev": true }, "arr-flatten": { "version": "1.1.0", @@ -7940,7 +7890,7 @@ "dev": true }, "array-unique": { - "version": "0.2.1", + "version": "0.3.2", "bundled": true, "dev": true }, @@ -7960,7 +7910,7 @@ "dev": true }, "atob": { - "version": "2.1.0", + "version": "2.1.1", "bundled": true, "dev": true }, @@ -7984,7 +7934,7 @@ "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", - "lodash": "4.17.5", + "lodash": "4.17.10", "source-map": "0.5.7", "trim-right": "1.0.1" } @@ -8002,7 +7952,7 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "regenerator-runtime": "0.11.1" } }, @@ -8015,7 +7965,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "lodash": "4.17.5" + "lodash": "4.17.10" } }, "babel-traverse": { @@ -8031,7 +7981,7 @@ "debug": "2.6.9", "globals": "9.18.0", "invariant": "2.2.4", - "lodash": "4.17.5" + "lodash": "4.17.10" } }, "babel-types": { @@ -8041,7 +7991,7 @@ "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", - "lodash": "4.17.5", + "lodash": "4.17.10", "to-fast-properties": "1.0.3" } }, @@ -8125,13 +8075,30 @@ } }, "braces": { - "version": "1.8.5", + "version": "2.3.2", "bundled": true, "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } } }, "builtin-modules": { @@ -8285,7 +8252,7 @@ "dev": true }, "core-js": { - "version": "2.5.5", + "version": "2.5.6", "bundled": true, "dev": true }, @@ -8294,7 +8261,7 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "which": "1.3.0" } }, @@ -8421,7 +8388,7 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "shebang-command": "1.2.0", "which": "1.3.0" } @@ -8429,19 +8396,35 @@ } }, "expand-brackets": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", + "version": "2.1.4", "bundled": true, "dev": true, "requires": { - "fill-range": "2.2.3" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } } }, "extend-shallow": { @@ -8464,28 +8447,88 @@ } }, "extglob": { - "version": "0.3.2", + "version": "2.0.4", "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, - "filename-regex": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, "fill-range": { - "version": "2.2.3", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } } }, "find-cache-dir": { @@ -8511,14 +8554,6 @@ "bundled": true, "dev": true }, - "for-own": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "for-in": "1.0.2" - } - }, "foreground-child": { "version": "1.5.6", "bundled": true, @@ -8569,23 +8604,6 @@ "path-is-absolute": "1.0.1" } }, - "glob-base": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-glob": "2.0.1" - } - }, "globals": { "version": "9.18.0", "bundled": true, @@ -8772,29 +8790,11 @@ } } }, - "is-dotfile": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "requires": { - "is-primitive": "2.0.0" - } - }, "is-extendable": { "version": "0.1.1", "bundled": true, "dev": true }, - "is-extglob": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "is-finite": { "version": "1.0.2", "bundled": true, @@ -8808,16 +8808,8 @@ "bundled": true, "dev": true }, - "is-glob": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - }, "is-number": { - "version": "2.1.0", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { @@ -8854,16 +8846,6 @@ } } }, - "is-posix-bracket": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, "is-stream": { "version": "1.1.0", "bundled": true, @@ -8890,12 +8872,9 @@ "dev": true }, "isobject": { - "version": "2.1.0", + "version": "3.0.1", "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } + "dev": true }, "istanbul-lib-coverage": { "version": "1.2.0", @@ -9036,7 +9015,7 @@ } }, "lodash": { - "version": "4.17.5", + "version": "4.17.10", "bundled": true, "dev": true }, @@ -9054,7 +9033,7 @@ } }, "lru-cache": { - "version": "4.1.2", + "version": "4.1.3", "bundled": true, "dev": true, "requires": { @@ -9112,23 +9091,30 @@ } }, "micromatch": { - "version": "2.3.11", + "version": "3.1.10", "bundled": true, "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, "mimic-fn": { @@ -9228,14 +9214,6 @@ "validate-npm-package-license": "3.0.3" } }, - "normalize-path": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, "npm-run-path": { "version": "2.0.2", "bundled": true, @@ -9289,15 +9267,6 @@ } } }, - "object.omit": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" - } - }, "object.pick": { "version": "1.3.0", "bundled": true, @@ -9371,17 +9340,6 @@ "bundled": true, "dev": true }, - "parse-glob": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" - } - }, "parse-json": { "version": "2.2.0", "bundled": true, @@ -9470,53 +9428,11 @@ "bundled": true, "dev": true }, - "preserve": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, "pseudomap": { "version": "1.0.2", "bundled": true, "dev": true }, - "randomatic": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, "read-pkg": { "version": "1.1.0", "bundled": true, @@ -9552,14 +9468,6 @@ "bundled": true, "dev": true }, - "regex-cache": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "is-equal-shallow": "0.1.3" - } - }, "regex-not": { "version": "1.0.2", "bundled": true, @@ -9569,11 +9477,6 @@ "safe-regex": "1.1.0" } }, - "remove-trailing-separator": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, "repeat-element": { "version": "1.1.2", "bundled": true, @@ -9803,7 +9706,7 @@ "bundled": true, "dev": true, "requires": { - "atob": "2.1.0", + "atob": "2.1.1", "decode-uri-component": "0.2.0", "resolve-url": "0.2.1", "source-map-url": "0.4.0", @@ -10459,7 +10362,7 @@ "bundled": true, "dev": true, "requires": { - "cliui": "4.0.0", + "cliui": "4.1.0", "decamelize": "1.2.0", "find-up": "2.1.0", "get-caller-file": "1.0.2", @@ -10484,7 +10387,7 @@ "dev": true }, "cliui": { - "version": "4.0.0", + "version": "4.1.0", "bundled": true, "dev": true, "requires": { @@ -11047,7 +10950,7 @@ "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", "core-js": "2.5.6", - "espurify": "1.7.0", + "espurify": "1.8.0", "estraverse": "4.2.0" } }, @@ -11094,7 +10997,7 @@ "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", "requires": { "core-js": "2.5.6", - "diff-match-patch": "1.0.0", + "diff-match-patch": "1.0.1", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", "type-name": "2.0.2" @@ -11202,7 +11105,7 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "8.10.12", + "@types/node": "8.10.17", "long": "4.0.0" } }, @@ -11244,23 +11147,21 @@ } }, "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", + "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" }, "dependencies": { - "kind-of": { + "is-number": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true } } }, @@ -11370,9 +11271,9 @@ } }, "regenerate": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", - "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", "dev": true }, "regenerator-runtime": { @@ -11411,7 +11312,7 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "1.3.3", + "regenerate": "1.4.0", "regjsgen": "0.2.0", "regjsparser": "0.1.5" } @@ -11485,9 +11386,9 @@ } }, "request": { - "version": "2.85.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", - "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { "aws-sign2": "0.7.0", "aws4": "1.7.0", @@ -11497,7 +11398,6 @@ "forever-agent": "0.6.1", "form-data": "2.3.2", "har-validator": "5.0.3", - "hawk": "6.0.2", "http-signature": "1.2.0", "is-typedarray": "1.0.0", "isstream": "0.1.2", @@ -11507,7 +11407,6 @@ "performance-now": "2.1.0", "qs": "6.5.2", "safe-buffer": "5.1.2", - "stringstream": "0.0.5", "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", "uuid": "3.2.1" @@ -11791,7 +11690,7 @@ "@sinonjs/formatio": "2.0.0", "diff": "3.5.0", "lodash.get": "4.4.2", - "lolex": "2.3.2", + "lolex": "2.6.0", "nise": "1.3.3", "supports-color": "5.4.0", "type-detect": "4.0.8" @@ -11836,7 +11735,7 @@ "extend-shallow": "2.0.1", "map-cache": "0.2.2", "source-map": "0.5.7", - "source-map-resolve": "0.5.1", + "source-map-resolve": "0.5.2", "use": "3.1.0" }, "dependencies": { @@ -11922,14 +11821,6 @@ } } }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", - "requires": { - "hoek": "4.2.1" - } - }, "sort-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", @@ -11945,9 +11836,9 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-resolve": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", - "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "requires": { "atob": "2.1.1", "decode-uri-component": "0.2.0", @@ -11957,9 +11848,9 @@ } }, "source-map-support": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", - "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { "buffer-from": "1.0.0", @@ -12120,11 +12011,6 @@ "type-name": "2.0.2" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -12896,7 +12782,7 @@ "requires": { "detect-indent": "5.0.0", "graceful-fs": "4.1.11", - "make-dir": "1.2.0", + "make-dir": "1.3.0", "pify": "3.0.0", "sort-keys": "2.0.0", "write-file-atomic": "2.3.0" From 1bcc84bc10410884590b0c0a0f71ea514fa674a6 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sun, 3 Jun 2018 17:49:46 -0700 Subject: [PATCH 134/488] chore(package): update nyc to version 12.0.2 (#55) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 7d3d2cfaa1c..a81c48171e6 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -76,7 +76,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.0.0", - "nyc": "^11.2.1", + "nyc": "^12.0.2", "power-assert": "^1.4.4", "prettier": "^1.7.4" } From f5d6356a396d70ebfb1ccc063028cca7cda07500 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 22 Jun 2018 07:43:19 -0700 Subject: [PATCH 135/488] fix: update dependencies (#57) --- .../.circleci/config.yml | 3 +- .../google-cloud-language/package-lock.json | 5552 ++++++++--------- packages/google-cloud-language/package.json | 24 +- .../samples/package.json | 14 +- 4 files changed, 2586 insertions(+), 3007 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 80db1b5e3a1..8053f1e2c36 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -103,7 +103,6 @@ jobs: if ! test -x "$repo_tools"; then chmod +x "$repo_tools" fi - npm link - run: name: Run unit tests. command: npm test @@ -138,7 +137,7 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm link @google-cloud/language + npm link ../ npm install cd .. - run: diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index 11104f34a3b..f3cbfe3b1ca 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -16,18 +16,18 @@ "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "6.22.0", - "babel-plugin-syntax-trailing-function-commas": "6.22.0", - "babel-plugin-transform-async-to-generator": "6.24.1", - "babel-plugin-transform-es2015-destructuring": "6.23.0", - "babel-plugin-transform-es2015-function-name": "6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", - "babel-plugin-transform-es2015-parameters": "6.24.1", - "babel-plugin-transform-es2015-spread": "6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "6.24.1", - "babel-plugin-transform-es2015-unicode-regex": "6.24.1", - "babel-plugin-transform-exponentiation-operator": "6.24.1", - "package-hash": "1.2.0" + "babel-plugin-check-es2015-constants": "^6.8.0", + "babel-plugin-syntax-trailing-function-commas": "^6.20.0", + "babel-plugin-transform-async-to-generator": "^6.16.0", + "babel-plugin-transform-es2015-destructuring": "^6.19.0", + "babel-plugin-transform-es2015-function-name": "^6.9.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", + "babel-plugin-transform-es2015-parameters": "^6.21.0", + "babel-plugin-transform-es2015-spread": "^6.8.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.8.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.11.0", + "babel-plugin-transform-exponentiation-operator": "^6.8.0", + "package-hash": "^1.2.0" }, "dependencies": { "md5-hex": { @@ -36,7 +36,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "package-hash": { @@ -45,7 +45,7 @@ "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", "dev": true, "requires": { - "md5-hex": "1.3.0" + "md5-hex": "^1.3.0" } } } @@ -56,8 +56,8 @@ "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", "dev": true, "requires": { - "@ava/babel-plugin-throws-helper": "2.0.0", - "babel-plugin-espower": "2.4.0" + "@ava/babel-plugin-throws-helper": "^2.0.0", + "babel-plugin-espower": "^2.3.2" } }, "@ava/write-file-atomic": { @@ -66,9 +66,151 @@ "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + }, + "@babel/code-frame": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz", + "integrity": "sha1-vs2AVIJzREDJ0TfkbXc0DmTX9Rs=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.49" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.49.tgz", + "integrity": "sha1-6c/9qROZaszseTu8JauRvBnQv3o=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.49", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + } + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.49.tgz", + "integrity": "sha1-olwRGbnwNSeGcBJuAiXAMEHI3jI=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.49", + "@babel/template": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.49" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.49.tgz", + "integrity": "sha1-z1Aj8y0q2S0Ic3STnOwJUby1FEE=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.49" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.49.tgz", + "integrity": "sha1-QNeO2glo0BGxxShm5XRs+yPldUg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.49" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.49.tgz", + "integrity": "sha1-lr3GtD4TSCASumaRsQGEktOWIsw=", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + } + }, + "@babel/parser": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.49.tgz", + "integrity": "sha1-lE0MW6KBK7FZ7b0iZ0Ov0mUXm9w=", + "dev": true + }, + "@babel/template": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.49.tgz", + "integrity": "sha1-44q+ghfLl5P0YaUwbXrXRdg+HSc=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.49", + "@babel/parser": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.49", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.49.tgz", + "integrity": "sha1-TypzaCoYM07WYl0QCo0nMZ98LWg=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.49", + "@babel/generator": "7.0.0-beta.49", + "@babel/helper-function-name": "7.0.0-beta.49", + "@babel/helper-split-export-declaration": "7.0.0-beta.49", + "@babel/parser": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.49", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.49.tgz", + "integrity": "sha1-t+Oxw/TUz+Eb34yJ8e/V4WF7h6Y=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } } }, "@concordance/react": { @@ -77,7 +219,7 @@ "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", "dev": true, "requires": { - "arrify": "1.0.1" + "arrify": "^1.0.1" } }, "@google-cloud/nodejs-repo-tools": { @@ -94,7 +236,7 @@ "lodash": "4.17.5", "nyc": "11.4.1", "proxyquire": "1.8.0", - "semver": "5.5.0", + "semver": "^5.5.0", "sinon": "4.3.0", "string": "3.3.3", "supertest": "3.0.0", @@ -114,9 +256,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "is-fullwidth-code-point": { @@ -137,33 +279,33 @@ "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", "dev": true, "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "md5-hex": "1.3.0", - "merge-source-map": "1.0.4", - "micromatch": "2.3.11", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.1.1", - "yargs": "10.0.3", - "yargs-parser": "8.0.0" + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.3.0", + "debug-log": "^1.0.1", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^2.1.0", + "foreground-child": "^1.5.3", + "glob": "^7.0.6", + "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^1.9.1", + "istanbul-lib-report": "^1.1.2", + "istanbul-lib-source-maps": "^1.2.2", + "istanbul-reports": "^1.1.3", + "md5-hex": "^1.2.0", + "merge-source-map": "^1.0.2", + "micromatch": "^2.3.11", + "mkdirp": "^0.5.0", + "resolve-from": "^2.0.0", + "rimraf": "^2.5.4", + "signal-exit": "^3.0.1", + "spawn-wrap": "^1.4.2", + "test-exclude": "^4.1.1", + "yargs": "^10.0.3", + "yargs-parser": "^8.0.0" }, "dependencies": { "align-text": { @@ -171,9 +313,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -196,7 +338,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -209,7 +351,7 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -237,9 +379,9 @@ "bundled": true, "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" } }, "babel-generator": { @@ -247,14 +389,14 @@ "bundled": true, "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.6", + "trim-right": "^1.0.1" } }, "babel-messages": { @@ -262,7 +404,7 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-runtime": { @@ -270,8 +412,8 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -279,11 +421,11 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.4" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -291,15 +433,15 @@ "bundled": true, "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" } }, "babel-types": { @@ -307,10 +449,10 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -328,7 +470,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -337,9 +479,9 @@ "bundled": true, "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "builtin-modules": { @@ -352,9 +494,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" } }, "camelcase": { @@ -369,8 +511,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -378,11 +520,11 @@ "bundled": true, "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "cliui": { @@ -391,8 +533,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -434,8 +576,8 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, "debug": { @@ -461,7 +603,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "detect-indent": { @@ -469,7 +611,7 @@ "bundled": true, "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "error-ex": { @@ -477,7 +619,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "escape-string-regexp": { @@ -495,13 +637,13 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -509,9 +651,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -521,7 +663,7 @@ "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -529,7 +671,7 @@ "bundled": true, "dev": true, "requires": { - "fill-range": "2.2.3" + "fill-range": "^2.1.0" } }, "extglob": { @@ -537,7 +679,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "filename-regex": { @@ -550,11 +692,11 @@ "bundled": true, "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "find-cache-dir": { @@ -562,9 +704,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" } }, "find-up": { @@ -572,7 +714,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -585,7 +727,7 @@ "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreground-child": { @@ -593,8 +735,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, "fs.realpath": { @@ -617,12 +759,12 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -630,8 +772,8 @@ "bundled": true, "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" } }, "glob-parent": { @@ -639,7 +781,7 @@ "bundled": true, "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "globals": { @@ -657,10 +799,10 @@ "bundled": true, "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -668,7 +810,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -678,7 +820,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-flag": { @@ -701,8 +843,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -715,7 +857,7 @@ "bundled": true, "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -738,7 +880,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-dotfile": { @@ -751,7 +893,7 @@ "bundled": true, "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -769,7 +911,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -777,7 +919,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-glob": { @@ -785,7 +927,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-number": { @@ -793,7 +935,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-posix-bracket": { @@ -844,7 +986,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { @@ -852,13 +994,13 @@ "bundled": true, "dev": true, "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.1.1", + "semver": "^5.3.0" } }, "istanbul-lib-report": { @@ -866,10 +1008,10 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "supports-color": { @@ -877,7 +1019,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -887,11 +1029,11 @@ "bundled": true, "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" }, "dependencies": { "debug": { @@ -909,7 +1051,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "js-tokens": { @@ -927,7 +1069,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -941,7 +1083,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -949,11 +1091,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "locate-path": { @@ -961,8 +1103,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -987,7 +1129,7 @@ "bundled": true, "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "lru-cache": { @@ -995,8 +1137,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "md5-hex": { @@ -1004,7 +1146,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -1017,7 +1159,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -1025,7 +1167,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } }, "micromatch": { @@ -1033,19 +1175,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, "mimic-fn": { @@ -1058,7 +1200,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -1084,10 +1226,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -1095,7 +1237,7 @@ "bundled": true, "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "npm-run-path": { @@ -1103,7 +1245,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -1121,8 +1263,8 @@ "bundled": true, "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "once": { @@ -1130,7 +1272,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -1138,8 +1280,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -1152,9 +1294,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "p-finally": { @@ -1172,7 +1314,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.1.0" + "p-limit": "^1.1.0" } }, "parse-glob": { @@ -1180,10 +1322,10 @@ "bundled": true, "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, "parse-json": { @@ -1191,7 +1333,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "path-exists": { @@ -1199,7 +1341,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -1222,9 +1364,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -1242,7 +1384,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -1250,7 +1392,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -1258,8 +1400,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -1279,8 +1421,8 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "is-number": { @@ -1288,7 +1430,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -1296,7 +1438,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1306,7 +1448,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1316,9 +1458,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -1326,8 +1468,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { @@ -1335,8 +1477,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -1351,7 +1493,7 @@ "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "remove-trailing-separator": { @@ -1374,7 +1516,7 @@ "bundled": true, "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "require-directory": { @@ -1398,7 +1540,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -1406,7 +1548,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "semver": { @@ -1424,7 +1566,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -1452,12 +1594,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.0" + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" } }, "spdx-correct": { @@ -1465,7 +1607,7 @@ "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-license-ids": "^1.0.2" } }, "spdx-expression-parse": { @@ -1483,8 +1625,8 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -1502,7 +1644,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -1512,7 +1654,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -1520,7 +1662,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -1538,11 +1680,11 @@ "bundled": true, "dev": true, "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" + "arrify": "^1.0.1", + "micromatch": "^2.3.11", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" } }, "to-fast-properties": { @@ -1561,9 +1703,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "yargs": { @@ -1572,9 +1714,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -1591,8 +1733,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" } }, "which": { @@ -1600,7 +1742,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -1624,8 +1766,8 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { "string-width": { @@ -1633,9 +1775,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -1650,9 +1792,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "y18n": { @@ -1670,18 +1812,18 @@ "bundled": true, "dev": true, "requires": { - "cliui": "3.2.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "8.0.0" + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.0.0" }, "dependencies": { "cliui": { @@ -1689,9 +1831,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" }, "dependencies": { "string-width": { @@ -1699,9 +1841,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -1713,7 +1855,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -1731,9 +1873,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "string-width": { @@ -1742,8 +1884,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -1752,7 +1894,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "yargs": { @@ -1761,18 +1903,18 @@ "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" } } } @@ -1783,10 +1925,10 @@ "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", "dev": true, "requires": { - "chalk": "0.4.0", - "date-time": "0.1.1", - "pretty-ms": "0.2.2", - "text-table": "0.2.0" + "chalk": "^0.4.0", + "date-time": "^0.1.1", + "pretty-ms": "^0.2.1", + "text-table": "^0.2.0" }, "dependencies": { "ansi-styles": { @@ -1801,9 +1943,9 @@ "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "dev": true, "requires": { - "ansi-styles": "1.0.0", - "has-color": "0.1.7", - "strip-ansi": "0.1.1" + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" } }, "pretty-ms": { @@ -1812,7 +1954,7 @@ "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", "dev": true, "requires": { - "parse-ms": "0.1.2" + "parse-ms": "^0.1.0" } }, "strip-ansi": { @@ -1828,14 +1970,14 @@ "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", "requires": { - "call-me-maybe": "1.0.1", - "glob-to-regexp": "0.3.0" + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" } }, "@nodelib/fs.stat": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.0.2.tgz", - "integrity": "sha512-vCpf75JDcdomXvUd7Rn6DfYAVqPAFI66FVjxiWGwh85OLdvfo3paBoPJaam5keIYRyUolnS7SleS/ZPCidCvzw==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz", + "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==" }, "@protobufjs/aspromise": { "version": "1.1.2", @@ -1862,8 +2004,8 @@ "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/inquire": "1.1.0" + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" } }, "@protobufjs/float": { @@ -1912,14 +2054,14 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.10.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.17.tgz", - "integrity": "sha512-3N3FRd/rA1v5glXjb90YdYUa+sOB7WrkU2rAhKZnF4TKD86Cym9swtulGuH0p9nxo7fP5woRNa8b0oFTpCO1bg==" + "version": "8.10.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz", + "integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==" }, "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" }, "acorn-es7-plugin": { "version": "1.1.7", @@ -1932,7 +2074,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "3.3.0" + "acorn": "^3.0.4" }, "dependencies": { "acorn": { @@ -1948,10 +2090,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { @@ -1966,9 +2108,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" }, "dependencies": { "kind-of": { @@ -1977,7 +2119,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1994,7 +2136,7 @@ "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -2015,8 +2157,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -2025,7 +2167,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2047,7 +2189,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.1" + "color-convert": "^1.9.0" } }, "anymatch": { @@ -2056,8 +2198,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" }, "dependencies": { "arr-diff": { @@ -2066,7 +2208,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "array-unique": { @@ -2081,9 +2223,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "expand-brackets": { @@ -2092,7 +2234,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "extglob": { @@ -2101,7 +2243,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-extglob": { @@ -2116,7 +2258,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "kind-of": { @@ -2125,7 +2267,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "micromatch": { @@ -2134,19 +2276,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } } } @@ -2157,7 +2299,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "argv": { @@ -2215,7 +2357,7 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -2238,8 +2380,8 @@ "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", "requires": { - "colour": "0.7.1", - "optjs": "3.2.2" + "colour": "~0.7.1", + "optjs": "~3.2.2" } }, "asn1": { @@ -2262,7 +2404,7 @@ "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "requires": { - "lodash": "4.17.10" + "lodash": "^4.17.10" } }, "async-each": { @@ -2282,9 +2424,9 @@ "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, "auto-bind": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.0.tgz", - "integrity": "sha512-Zw7pZp7tztvKnWWtoII4AmqH5a2PV3ZN5F0BPRTGcc1kpRm4b6QXQnPU7Znbl6BfPfqOVOV29g4JeMqZQaqqOA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.1.tgz", + "integrity": "sha512-/W9yj1yKmBLwpexwAujeD9YHwYmRuWFGV8HWE7smQab797VeHa4/cnE2NFeDhA+E+5e/OGBI8763EhLjfZ/MXA==", "dev": true }, "ava": { @@ -2293,89 +2435,89 @@ "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", "dev": true, "requires": { - "@ava/babel-preset-stage-4": "1.1.0", - "@ava/babel-preset-transform-test-files": "3.0.0", - "@ava/write-file-atomic": "2.2.0", - "@concordance/react": "1.0.0", - "@ladjs/time-require": "0.1.4", - "ansi-escapes": "3.1.0", - "ansi-styles": "3.2.1", - "arr-flatten": "1.1.0", - "array-union": "1.0.2", - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "auto-bind": "1.2.0", - "ava-init": "0.2.1", - "babel-core": "6.26.3", - "babel-generator": "6.26.1", - "babel-plugin-syntax-object-rest-spread": "6.13.0", - "bluebird": "3.5.1", - "caching-transform": "1.0.1", - "chalk": "2.4.1", - "chokidar": "1.7.0", - "clean-stack": "1.3.0", - "clean-yaml-object": "0.1.0", - "cli-cursor": "2.1.0", - "cli-spinners": "1.3.1", - "cli-truncate": "1.1.0", - "co-with-promise": "4.6.0", - "code-excerpt": "2.1.1", - "common-path-prefix": "1.0.0", - "concordance": "3.0.0", - "convert-source-map": "1.5.1", - "core-assert": "0.2.1", - "currently-unhandled": "0.4.1", - "debug": "3.1.0", - "dot-prop": "4.2.0", - "empower-core": "0.6.2", - "equal-length": "1.0.1", - "figures": "2.0.0", - "find-cache-dir": "1.0.0", - "fn-name": "2.0.1", - "get-port": "3.2.0", - "globby": "6.1.0", - "has-flag": "2.0.0", - "hullabaloo-config-manager": "1.1.1", - "ignore-by-default": "1.0.1", - "import-local": "0.1.1", - "indent-string": "3.2.0", - "is-ci": "1.1.0", - "is-generator-fn": "1.0.0", - "is-obj": "1.0.1", - "is-observable": "1.1.0", - "is-promise": "2.1.0", - "last-line-stream": "1.0.0", - "lodash.clonedeepwith": "4.5.0", - "lodash.debounce": "4.0.8", - "lodash.difference": "4.5.0", - "lodash.flatten": "4.4.0", - "loud-rejection": "1.6.0", - "make-dir": "1.3.0", - "matcher": "1.1.0", - "md5-hex": "2.0.0", - "meow": "3.7.0", - "ms": "2.0.0", - "multimatch": "2.1.0", - "observable-to-promise": "0.5.0", - "option-chain": "1.0.0", - "package-hash": "2.0.0", - "pkg-conf": "2.1.0", - "plur": "2.1.2", - "pretty-ms": "3.1.0", - "require-precompiled": "0.1.0", - "resolve-cwd": "2.0.0", - "safe-buffer": "5.1.2", - "semver": "5.5.0", - "slash": "1.0.0", - "source-map-support": "0.5.6", - "stack-utils": "1.0.1", - "strip-ansi": "4.0.0", - "strip-bom-buf": "1.0.0", - "supertap": "1.0.0", - "supports-color": "5.4.0", - "trim-off-newlines": "1.0.1", - "unique-temp-dir": "1.0.0", - "update-notifier": "2.5.0" + "@ava/babel-preset-stage-4": "^1.1.0", + "@ava/babel-preset-transform-test-files": "^3.0.0", + "@ava/write-file-atomic": "^2.2.0", + "@concordance/react": "^1.0.0", + "@ladjs/time-require": "^0.1.4", + "ansi-escapes": "^3.0.0", + "ansi-styles": "^3.1.0", + "arr-flatten": "^1.0.1", + "array-union": "^1.0.1", + "array-uniq": "^1.0.2", + "arrify": "^1.0.0", + "auto-bind": "^1.1.0", + "ava-init": "^0.2.0", + "babel-core": "^6.17.0", + "babel-generator": "^6.26.0", + "babel-plugin-syntax-object-rest-spread": "^6.13.0", + "bluebird": "^3.0.0", + "caching-transform": "^1.0.0", + "chalk": "^2.0.1", + "chokidar": "^1.4.2", + "clean-stack": "^1.1.1", + "clean-yaml-object": "^0.1.0", + "cli-cursor": "^2.1.0", + "cli-spinners": "^1.0.0", + "cli-truncate": "^1.0.0", + "co-with-promise": "^4.6.0", + "code-excerpt": "^2.1.1", + "common-path-prefix": "^1.0.0", + "concordance": "^3.0.0", + "convert-source-map": "^1.5.1", + "core-assert": "^0.2.0", + "currently-unhandled": "^0.4.1", + "debug": "^3.0.1", + "dot-prop": "^4.1.0", + "empower-core": "^0.6.1", + "equal-length": "^1.0.0", + "figures": "^2.0.0", + "find-cache-dir": "^1.0.0", + "fn-name": "^2.0.0", + "get-port": "^3.0.0", + "globby": "^6.0.0", + "has-flag": "^2.0.0", + "hullabaloo-config-manager": "^1.1.0", + "ignore-by-default": "^1.0.0", + "import-local": "^0.1.1", + "indent-string": "^3.0.0", + "is-ci": "^1.0.7", + "is-generator-fn": "^1.0.0", + "is-obj": "^1.0.0", + "is-observable": "^1.0.0", + "is-promise": "^2.1.0", + "last-line-stream": "^1.0.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.debounce": "^4.0.3", + "lodash.difference": "^4.3.0", + "lodash.flatten": "^4.2.0", + "loud-rejection": "^1.2.0", + "make-dir": "^1.0.0", + "matcher": "^1.0.0", + "md5-hex": "^2.0.0", + "meow": "^3.7.0", + "ms": "^2.0.0", + "multimatch": "^2.1.0", + "observable-to-promise": "^0.5.0", + "option-chain": "^1.0.0", + "package-hash": "^2.0.0", + "pkg-conf": "^2.0.0", + "plur": "^2.0.0", + "pretty-ms": "^3.0.0", + "require-precompiled": "^0.1.0", + "resolve-cwd": "^2.0.0", + "safe-buffer": "^5.1.1", + "semver": "^5.4.1", + "slash": "^1.0.0", + "source-map-support": "^0.5.0", + "stack-utils": "^1.0.1", + "strip-ansi": "^4.0.0", + "strip-bom-buf": "^1.0.0", + "supertap": "^1.0.0", + "supports-color": "^5.0.0", + "trim-off-newlines": "^1.0.1", + "unique-temp-dir": "^1.0.0", + "update-notifier": "^2.3.0" }, "dependencies": { "ansi-regex": { @@ -2393,17 +2535,27 @@ "ms": "2.0.0" } }, + "empower-core": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-0.6.2.tgz", + "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", + "dev": true, + "requires": { + "call-signature": "0.0.2", + "core-js": "^2.0.0" + } + }, "globby": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { - "array-union": "1.0.2", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -2424,7 +2576,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "strip-ansi": { @@ -2433,7 +2585,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2444,11 +2596,11 @@ "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", "dev": true, "requires": { - "arr-exclude": "1.0.0", - "execa": "0.7.0", - "has-yarn": "1.0.0", - "read-pkg-up": "2.0.0", - "write-pkg": "3.1.0" + "arr-exclude": "^1.0.0", + "execa": "^0.7.0", + "has-yarn": "^1.0.0", + "read-pkg-up": "^2.0.0", + "write-pkg": "^3.1.0" } }, "aws-sign2": { @@ -2466,8 +2618,8 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "1.5.0", - "is-buffer": "1.1.6" + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" } }, "babel-code-frame": { @@ -2476,9 +2628,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" }, "dependencies": { "ansi-styles": { @@ -2493,11 +2645,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "supports-color": { @@ -2514,25 +2666,25 @@ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-generator": "6.26.1", - "babel-helpers": "6.24.1", - "babel-messages": "6.23.0", - "babel-register": "6.26.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "convert-source-map": "1.5.1", - "debug": "2.6.9", - "json5": "0.5.1", - "lodash": "4.17.10", - "minimatch": "3.0.4", - "path-is-absolute": "1.0.1", - "private": "0.1.8", - "slash": "1.0.0", - "source-map": "0.5.7" + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" } }, "babel-generator": { @@ -2541,14 +2693,14 @@ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" }, "dependencies": { "jsesc": { @@ -2565,9 +2717,9 @@ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "dev": true, "requires": { - "babel-helper-explode-assignable-expression": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-call-delegate": { @@ -2576,10 +2728,10 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "dev": true, "requires": { - "babel-helper-hoist-variables": "6.24.1", - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-explode-assignable-expression": { @@ -2588,9 +2740,9 @@ "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-function-name": { @@ -2599,11 +2751,11 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "dev": true, "requires": { - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helper-get-function-arity": { @@ -2612,8 +2764,8 @@ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-hoist-variables": { @@ -2622,8 +2774,8 @@ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-helper-regex": { @@ -2632,9 +2784,9 @@ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "lodash": "4.17.10" + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, "babel-helper-remap-async-to-generator": { @@ -2643,11 +2795,11 @@ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "dev": true, "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-helpers": { @@ -2656,8 +2808,8 @@ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-template": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, "babel-messages": { @@ -2666,7 +2818,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-check-es2015-constants": { @@ -2675,7 +2827,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-espower": { @@ -2684,13 +2836,13 @@ "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", "dev": true, "requires": { - "babel-generator": "6.26.1", - "babylon": "6.18.0", - "call-matcher": "1.0.1", - "core-js": "2.5.6", - "espower-location-detector": "1.0.0", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "babel-generator": "^6.1.0", + "babylon": "^6.1.0", + "call-matcher": "^1.0.0", + "core-js": "^2.0.0", + "espower-location-detector": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.1.1" } }, "babel-plugin-syntax-async-functions": { @@ -2723,9 +2875,9 @@ "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "dev": true, "requires": { - "babel-helper-remap-async-to-generator": "6.24.1", - "babel-plugin-syntax-async-functions": "6.13.0", - "babel-runtime": "6.26.0" + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -2734,7 +2886,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -2743,9 +2895,9 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "dev": true, "requires": { - "babel-helper-function-name": "6.24.1", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-modules-commonjs": { @@ -2754,10 +2906,10 @@ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-types": "6.26.0" + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -2766,12 +2918,12 @@ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "babel-helper-call-delegate": "6.24.1", - "babel-helper-get-function-arity": "6.24.1", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-spread": { @@ -2780,7 +2932,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -2789,9 +2941,9 @@ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "dev": true, "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -2800,9 +2952,9 @@ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "babel-helper-regex": "6.26.0", - "babel-runtime": "6.26.0", - "regexpu-core": "2.0.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" } }, "babel-plugin-transform-exponentiation-operator": { @@ -2811,9 +2963,9 @@ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "dev": true, "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", - "babel-plugin-syntax-exponentiation-operator": "6.13.0", - "babel-runtime": "6.26.0" + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-strict-mode": { @@ -2822,8 +2974,8 @@ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-types": "6.26.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, "babel-register": { @@ -2832,13 +2984,13 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "6.26.3", - "babel-runtime": "6.26.0", - "core-js": "2.5.6", - "home-or-tmp": "2.0.0", - "lodash": "4.17.10", - "mkdirp": "0.5.1", - "source-map-support": "0.4.18" + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" }, "dependencies": { "source-map-support": { @@ -2847,7 +2999,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -2858,8 +3010,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -2868,11 +3020,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.10" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -2881,15 +3033,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.4", - "lodash": "4.17.10" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" } }, "babel-types": { @@ -2898,10 +3050,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -2920,13 +3072,13 @@ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -2934,7 +3086,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -2942,7 +3094,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -2950,7 +3102,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -2958,9 +3110,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -2971,7 +3123,7 @@ "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "binary-extensions": { @@ -2992,13 +3144,13 @@ "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "dev": true, "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.4.1", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "2.0.0" + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -3025,8 +3177,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -3035,7 +3187,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3045,7 +3197,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -3054,16 +3206,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -3071,7 +3223,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -3094,9 +3246,9 @@ "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" }, "buffer-from": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", "dev": true }, "builtin-modules": { @@ -3110,7 +3262,7 @@ "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { - "long": "3.2.0" + "long": "~3" }, "dependencies": { "long": { @@ -3125,15 +3277,15 @@ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "cacheable-request": { @@ -3165,9 +3317,9 @@ "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" }, "dependencies": { "md5-hex": { @@ -3176,7 +3328,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "write-file-atomic": { @@ -3185,9 +3337,9 @@ "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } } } @@ -3198,10 +3350,10 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.6", - "deep-equal": "1.0.1", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "core-js": "^2.0.0", + "deep-equal": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.0.0" } }, "call-me-maybe": { @@ -3220,7 +3372,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -3240,8 +3392,8 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" } }, "capture-stack-trace": { @@ -3261,7 +3413,7 @@ "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", "dev": true, "requires": { - "underscore-contrib": "0.3.0" + "underscore-contrib": "~0.3.0" } }, "center-align": { @@ -3271,8 +3423,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -3281,9 +3433,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "chardet": { @@ -3298,15 +3450,15 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "fsevents": "1.2.4", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" }, "dependencies": { "glob-parent": { @@ -3315,7 +3467,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -3330,7 +3482,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -3352,10 +3504,10 @@ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -3363,7 +3515,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -3392,7 +3544,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "^2.0.0" } }, "cli-spinners": { @@ -3407,8 +3559,8 @@ "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", "dev": true, "requires": { - "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "slice-ansi": "^1.0.0", + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -3429,8 +3581,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -3439,7 +3591,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3455,9 +3607,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, "clone-response": { @@ -3466,7 +3618,7 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "co": { @@ -3480,7 +3632,7 @@ "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", "dev": true, "requires": { - "pinkie-promise": "1.0.0" + "pinkie-promise": "^1.0.0" } }, "code-excerpt": { @@ -3489,7 +3641,7 @@ "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", "dev": true, "requires": { - "convert-to-spaces": "1.0.2" + "convert-to-spaces": "^1.0.1" } }, "code-point-at": { @@ -3504,7 +3656,7 @@ "dev": true, "requires": { "argv": "0.0.2", - "request": "2.87.0", + "request": "^2.81.0", "urlgrey": "0.4.4" } }, @@ -3513,23 +3665,23 @@ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "1.1.1" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", "dev": true }, "colors": { @@ -3548,7 +3700,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "commander": { @@ -3585,10 +3737,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "1.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "concordance": { @@ -3597,17 +3749,17 @@ "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", "dev": true, "requires": { - "date-time": "2.1.0", - "esutils": "2.0.2", - "fast-diff": "1.1.2", - "function-name-support": "0.2.0", - "js-string-escape": "1.0.1", - "lodash.clonedeep": "4.5.0", - "lodash.flattendeep": "4.4.0", - "lodash.merge": "4.6.1", - "md5-hex": "2.0.0", - "semver": "5.5.0", - "well-known-symbols": "1.0.0" + "date-time": "^2.1.0", + "esutils": "^2.0.2", + "fast-diff": "^1.1.1", + "function-name-support": "^0.2.0", + "js-string-escape": "^1.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.flattendeep": "^4.4.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "semver": "^5.3.0", + "well-known-symbols": "^1.0.0" }, "dependencies": { "date-time": { @@ -3616,7 +3768,7 @@ "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "dev": true, "requires": { - "time-zone": "1.0.0" + "time-zone": "^1.0.0" } } } @@ -3627,12 +3779,12 @@ "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "dev": true, "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.3.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "convert-source-map": { @@ -3648,9 +3800,9 @@ "dev": true }, "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", "dev": true }, "copy-descriptor": { @@ -3664,14 +3816,14 @@ "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", "dev": true, "requires": { - "buf-compare": "1.0.1", - "is-error": "2.2.1" + "buf-compare": "^1.0.0", + "is-error": "^2.2.0" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==" + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" }, "core-util-is": { "version": "1.0.2", @@ -3684,7 +3836,7 @@ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "dev": true, "requires": { - "capture-stack-trace": "1.0.0" + "capture-stack-trace": "^1.0.0" } }, "cross-spawn": { @@ -3693,9 +3845,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "crypto-random-string": { @@ -3710,7 +3862,7 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "1.0.2" + "array-find-index": "^1.0.1" } }, "d": { @@ -3719,7 +3871,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.42" + "es5-ext": "^0.10.9" } }, "dashdash": { @@ -3727,7 +3879,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "date-time": { @@ -3760,7 +3912,7 @@ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "deep-equal": { @@ -3770,9 +3922,9 @@ "dev": true }, "deep-extend": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, "deep-is": { @@ -3786,8 +3938,8 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" } }, "define-property": { @@ -3795,8 +3947,8 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -3804,7 +3956,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -3812,7 +3964,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -3820,9 +3972,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -3833,13 +3985,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.1", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" }, "dependencies": { "globby": { @@ -3848,12 +4000,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -3874,7 +4026,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } } } @@ -3890,7 +4042,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "diff": { @@ -3909,8 +4061,8 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "requires": { - "arrify": "1.0.1", - "path-type": "3.0.0" + "arrify": "^1.0.1", + "path-type": "^3.0.0" } }, "doctrine": { @@ -3919,7 +4071,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "dom-serializer": { @@ -3928,8 +4080,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" + "domelementtype": "~1.1.1", + "entities": "~1.1.1" }, "dependencies": { "domelementtype": { @@ -3952,7 +4104,7 @@ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "domutils": { @@ -3961,8 +4113,8 @@ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" + "dom-serializer": "0", + "domelementtype": "1" } }, "dot-prop": { @@ -3971,7 +4123,7 @@ "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "dev": true, "requires": { - "is-obj": "1.0.1" + "is-obj": "^1.0.0" } }, "duplexer3": { @@ -3985,16 +4137,16 @@ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "requires": { - "end-of-stream": "1.4.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "stream-shift": "1.0.0" + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" } }, "eastasianwidth": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", - "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "ecc-jsbn": { "version": "0.1.1", @@ -4002,7 +4154,7 @@ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "ecdsa-sig-formatter": { @@ -4010,16 +4162,16 @@ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "empower": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", - "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/empower/-/empower-1.3.0.tgz", + "integrity": "sha512-tP2WqM7QzrPguCCQEQfFFDF+6Pw6YWLQal3+GHQaV+0uIr0S+jyREQPWljE02zFCYPFYLZ3LosiRV+OzTrxPpQ==", "requires": { - "core-js": "2.5.6", - "empower-core": "0.6.2" + "core-js": "^2.0.0", + "empower-core": "^1.2.0" } }, "empower-assert": { @@ -4028,16 +4180,16 @@ "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.2.0" } }, "empower-core": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-0.6.2.tgz", - "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-1.2.0.tgz", + "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.6" + "core-js": "^2.0.0" } }, "end-of-stream": { @@ -4045,7 +4197,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { - "once": "1.4.0" + "once": "^1.4.0" } }, "entities": { @@ -4061,23 +4213,23 @@ "dev": true }, "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es5-ext": { - "version": "0.10.42", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", - "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", + "version": "0.10.45", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", + "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", "dev": true, "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "next-tick": "1.0.0" + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" } }, "es6-error": { @@ -4092,9 +4244,9 @@ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, "es6-map": { @@ -4103,12 +4255,12 @@ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" } }, "es6-set": { @@ -4117,11 +4269,11 @@ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42", - "es6-iterator": "2.0.3", + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "event-emitter": "~0.3.5" } }, "es6-symbol": { @@ -4130,8 +4282,8 @@ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42" + "d": "1", + "es5-ext": "~0.10.14" } }, "es6-weak-map": { @@ -4140,10 +4292,10 @@ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" } }, "escallmatch": { @@ -4152,8 +4304,8 @@ "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", "dev": true, "requires": { - "call-matcher": "1.0.1", - "esprima": "2.7.3" + "call-matcher": "^1.0.0", + "esprima": "^2.0.0" }, "dependencies": { "esprima": { @@ -4171,16 +4323,16 @@ "dev": true }, "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz", + "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", "dev": true, "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" }, "dependencies": { "esprima": { @@ -4204,10 +4356,10 @@ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "dev": true, "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint": { @@ -4216,44 +4368,44 @@ "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "dev": true, "requires": { - "ajv": "5.5.2", - "babel-code-frame": "6.26.0", - "chalk": "2.4.1", - "concat-stream": "1.6.2", - "cross-spawn": "5.1.0", - "debug": "3.1.0", - "doctrine": "2.1.0", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "1.0.0", - "espree": "3.5.4", - "esquery": "1.0.1", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.2", - "globals": "11.5.0", - "ignore": "3.3.8", - "imurmurhash": "0.1.4", - "inquirer": "3.3.0", - "is-resolvable": "1.1.0", - "js-yaml": "3.11.0", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.10", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.0", - "regexpp": "1.1.0", - "require-uncached": "1.0.3", - "semver": "5.5.0", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.4", + "esquery": "^1.0.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^3.0.6", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^1.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "~2.0.1", "table": "4.0.2", - "text-table": "0.2.0" + "text-table": "~0.2.0" }, "dependencies": { "ansi-regex": { @@ -4272,9 +4424,9 @@ } }, "globals": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", - "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true }, "strip-ansi": { @@ -4283,7 +4435,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -4294,7 +4446,7 @@ "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", "dev": true, "requires": { - "get-stdin": "5.0.1" + "get-stdin": "^5.0.1" }, "dependencies": { "get-stdin": { @@ -4311,19 +4463,19 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "3.3.8", - "minimatch": "3.0.4", - "resolve": "1.7.1", - "semver": "5.5.0" + "ignore": "^3.3.6", + "minimatch": "^3.0.4", + "resolve": "^1.3.3", + "semver": "^5.4.1" }, "dependencies": { "resolve": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", - "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } } } @@ -4334,8 +4486,8 @@ "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", "dev": true, "requires": { - "fast-diff": "1.1.2", - "jest-docblock": "21.2.0" + "fast-diff": "^1.1.1", + "jest-docblock": "^21.0.0" } }, "eslint-scope": { @@ -4344,8 +4496,8 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint-visitor-keys": { @@ -4360,16 +4512,16 @@ "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", "dev": true, "requires": { - "array-find": "1.0.0", - "escallmatch": "1.5.0", - "escodegen": "1.9.1", - "escope": "3.6.0", - "espower-location-detector": "1.0.0", - "espurify": "1.8.0", - "estraverse": "4.2.0", - "source-map": "0.5.7", - "type-name": "2.0.2", - "xtend": "4.0.1" + "array-find": "^1.0.0", + "escallmatch": "^1.5.0", + "escodegen": "^1.7.0", + "escope": "^3.3.0", + "espower-location-detector": "^1.0.0", + "espurify": "^1.3.0", + "estraverse": "^4.1.0", + "source-map": "^0.5.0", + "type-name": "^2.0.0", + "xtend": "^4.0.0" } }, "espower-loader": { @@ -4378,11 +4530,11 @@ "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", "dev": true, "requires": { - "convert-source-map": "1.5.1", - "espower-source": "2.2.0", - "minimatch": "3.0.4", - "source-map-support": "0.4.18", - "xtend": "4.0.1" + "convert-source-map": "^1.1.0", + "espower-source": "^2.0.0", + "minimatch": "^3.0.0", + "source-map-support": "^0.4.0", + "xtend": "^4.0.0" }, "dependencies": { "source-map-support": { @@ -4391,7 +4543,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -4402,37 +4554,29 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "1.2.4", - "path-is-absolute": "1.0.1", - "source-map": "0.5.7", - "xtend": "4.0.1" + "is-url": "^1.2.1", + "path-is-absolute": "^1.0.0", + "source-map": "^0.5.0", + "xtend": "^4.0.0" } }, "espower-source": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/espower-source/-/espower-source-2.2.0.tgz", - "integrity": "sha1-fgBSVa5HtcE2RIZEs/PYAtUD91I=", - "dev": true, - "requires": { - "acorn": "5.5.3", - "acorn-es7-plugin": "1.1.7", - "convert-source-map": "1.5.1", - "empower-assert": "1.1.0", - "escodegen": "1.9.1", - "espower": "2.1.1", - "estraverse": "4.2.0", - "merge-estraverse-visitors": "1.0.0", - "multi-stage-sourcemap": "0.2.1", - "path-is-absolute": "1.0.1", - "xtend": "4.0.1" - }, - "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", - "dev": true - } + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/espower-source/-/espower-source-2.3.0.tgz", + "integrity": "sha512-Wc4kC4zUAEV7Qt31JRPoBUc5jjowHRylml2L2VaDQ1XEbnqQofGWx+gPR03TZAPokAMl5dqyL36h3ITyMXy3iA==", + "dev": true, + "requires": { + "acorn": "^5.0.0", + "acorn-es7-plugin": "^1.0.10", + "convert-source-map": "^1.1.1", + "empower-assert": "^1.0.0", + "escodegen": "^1.10.0", + "espower": "^2.1.1", + "estraverse": "^4.0.0", + "merge-estraverse-visitors": "^1.0.0", + "multi-stage-sourcemap": "^0.2.1", + "path-is-absolute": "^1.0.0", + "xtend": "^4.0.0" } }, "espree": { @@ -4441,16 +4585,8 @@ "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "5.5.3", - "acorn-jsx": "3.0.1" - }, - "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", - "dev": true - } + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" } }, "esprima": { @@ -4464,7 +4600,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", "requires": { - "core-js": "2.5.6" + "core-js": "^2.0.0" } }, "esquery": { @@ -4473,7 +4609,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -4482,7 +4618,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -4502,8 +4638,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42" + "d": "1", + "es5-ext": "~0.10.14" } }, "execa": { @@ -4512,13 +4648,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, "expand-brackets": { @@ -4526,13 +4662,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -4540,7 +4676,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -4548,7 +4684,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -4559,7 +4695,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.4" + "fill-range": "^2.1.0" }, "dependencies": { "fill-range": { @@ -4568,11 +4704,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "3.0.0", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "is-number": { @@ -4581,7 +4717,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "isobject": { @@ -4599,7 +4735,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -4614,8 +4750,8 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -4623,7 +4759,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -4634,9 +4770,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.23", - "tmp": "0.0.33" + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" } }, "extglob": { @@ -4644,14 +4780,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -4659,7 +4795,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -4667,7 +4803,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -4675,7 +4811,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -4683,7 +4819,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -4691,9 +4827,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -4719,12 +4855,12 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "requires": { - "@mrmlnc/readdir-enhanced": "2.2.1", - "@nodelib/fs.stat": "1.0.2", - "glob-parent": "3.1.0", - "is-glob": "4.0.0", - "merge2": "1.2.2", - "micromatch": "3.1.10" + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.0.1", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.1", + "micromatch": "^3.1.10" } }, "fast-json-stable-stringify": { @@ -4744,7 +4880,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -4753,8 +4889,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "filename-regex": { @@ -4769,8 +4905,8 @@ "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", "dev": true, "requires": { - "is-object": "1.0.1", - "merge-descriptors": "1.0.1" + "is-object": "~1.0.1", + "merge-descriptors": "~1.0.0" } }, "fill-range": { @@ -4778,10 +4914,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -4789,7 +4925,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -4800,9 +4936,9 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "dev": true, "requires": { - "commondir": "1.0.1", - "make-dir": "1.3.0", - "pkg-dir": "2.0.0" + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" } }, "find-up": { @@ -4811,7 +4947,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -4820,10 +4956,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" } }, "fn-name": { @@ -4837,7 +4973,7 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", "requires": { - "debug": "3.1.0" + "debug": "^3.1.0" }, "dependencies": { "debug": { @@ -4861,7 +4997,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreach": { @@ -4879,9 +5015,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "0.4.0", + "asynckit": "^0.4.0", "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "mime-types": "^2.1.12" } }, "formidable": { @@ -4895,7 +5031,7 @@ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "from2": { @@ -4904,8 +5040,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" } }, "fs-extra": { @@ -4914,9 +5050,9 @@ "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "fs.realpath": { @@ -4931,8 +5067,8 @@ "dev": true, "optional": true, "requires": { - "nan": "2.10.0", - "node-pre-gyp": "0.10.0" + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" }, "dependencies": { "abbrev": { @@ -4958,8 +5094,8 @@ "dev": true, "optional": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "balanced-match": { @@ -4972,7 +5108,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -5036,7 +5172,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -5051,14 +5187,14 @@ "dev": true, "optional": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "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" } }, "glob": { @@ -5067,12 +5203,12 @@ "dev": true, "optional": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-unicode": { @@ -5087,7 +5223,7 @@ "dev": true, "optional": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": "^2.1.0" } }, "ignore-walk": { @@ -5096,7 +5232,7 @@ "dev": true, "optional": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { @@ -5105,8 +5241,8 @@ "dev": true, "optional": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -5125,7 +5261,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -5139,7 +5275,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -5152,8 +5288,8 @@ "bundled": true, "dev": true, "requires": { - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" } }, "minizlib": { @@ -5162,7 +5298,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "mkdirp": { @@ -5185,9 +5321,9 @@ "dev": true, "optional": true, "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.21", - "sax": "1.2.4" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, "node-pre-gyp": { @@ -5196,16 +5332,16 @@ "dev": true, "optional": true, "requires": { - "detect-libc": "1.0.3", - "mkdirp": "0.5.1", - "needle": "2.2.0", - "nopt": "4.0.1", - "npm-packlist": "1.1.10", - "npmlog": "4.1.2", - "rc": "1.2.7", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "4.4.1" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, "nopt": { @@ -5214,8 +5350,8 @@ "dev": true, "optional": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { @@ -5230,8 +5366,8 @@ "dev": true, "optional": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, "npmlog": { @@ -5240,10 +5376,10 @@ "dev": true, "optional": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { @@ -5262,7 +5398,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -5283,8 +5419,8 @@ "dev": true, "optional": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -5305,10 +5441,10 @@ "dev": true, "optional": true, "requires": { - "deep-extend": "0.5.1", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -5325,13 +5461,13 @@ "dev": true, "optional": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rimraf": { @@ -5340,7 +5476,7 @@ "dev": true, "optional": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { @@ -5383,9 +5519,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { @@ -5394,7 +5530,7 @@ "dev": true, "optional": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { @@ -5402,7 +5538,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -5417,13 +5553,13 @@ "dev": true, "optional": true, "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" } }, "util-deprecate": { @@ -5438,7 +5574,7 @@ "dev": true, "optional": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "wrappy": { @@ -5470,8 +5606,8 @@ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", "requires": { - "axios": "0.18.0", - "extend": "3.0.1", + "axios": "^0.18.0", + "extend": "^3.0.1", "retry-axios": "0.3.2" } }, @@ -5509,7 +5645,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "glob": { @@ -5517,12 +5653,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -5531,8 +5667,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" }, "dependencies": { "glob-parent": { @@ -5541,7 +5677,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -5556,7 +5692,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -5566,8 +5702,8 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { "is-glob": { @@ -5575,7 +5711,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.0" } } } @@ -5591,7 +5727,7 @@ "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "dev": true, "requires": { - "ini": "1.3.5" + "ini": "^1.3.4" } }, "globals": { @@ -5605,27 +5741,27 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "fast-glob": "2.2.2", - "glob": "7.1.2", - "ignore": "3.3.8", - "pify": "3.0.0", - "slash": "1.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } }, "google-auth-library": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.5.0.tgz", - "integrity": "sha512-xpibA/hkq4waBcpIkSJg4GiDAqcBWjJee3c47zj7xP3RQ0A9mc8MP3Vc9sc8SGRoDYA0OszZxTjW7SbcC4pJIA==", - "requires": { - "axios": "0.18.0", - "gcp-metadata": "0.6.3", - "gtoken": "2.3.0", - "jws": "3.1.5", - "lodash.isstring": "4.0.1", - "lru-cache": "4.1.3", - "retry-axios": "0.3.2" + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz", + "integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==", + "requires": { + "axios": "^0.18.0", + "gcp-metadata": "^0.6.3", + "gtoken": "^2.3.0", + "jws": "^3.1.5", + "lodash.isstring": "^4.0.1", + "lru-cache": "^4.1.3", + "retry-axios": "^0.3.2" } }, "google-auto-auth": { @@ -5633,10 +5769,10 @@ "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.5.0", - "request": "2.87.0" + "async": "^2.3.0", + "gcp-metadata": "^0.6.1", + "google-auth-library": "^1.3.1", + "request": "^2.79.0" } }, "google-gax": { @@ -5644,16 +5780,16 @@ "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", "requires": { - "duplexify": "3.6.0", - "extend": "3.0.1", - "globby": "8.0.1", - "google-auto-auth": "0.10.1", - "google-proto-files": "0.15.1", - "grpc": "1.11.3", - "is-stream-ended": "0.1.4", - "lodash": "4.17.10", - "protobufjs": "6.8.6", - "through2": "2.0.3" + "duplexify": "^3.5.4", + "extend": "^3.0.0", + "globby": "^8.0.0", + "google-auto-auth": "^0.10.0", + "google-proto-files": "^0.15.0", + "grpc": "^1.10.0", + "is-stream-ended": "^0.1.0", + "lodash": "^4.17.2", + "protobufjs": "^6.8.0", + "through2": "^2.0.3" } }, "google-p12-pem": { @@ -5661,8 +5797,8 @@ "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", "requires": { - "node-forge": "0.7.5", - "pify": "3.0.0" + "node-forge": "^0.7.4", + "pify": "^3.0.0" } }, "google-proto-files": { @@ -5670,9 +5806,9 @@ "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", "requires": { - "globby": "7.1.1", - "power-assert": "1.5.0", - "protobufjs": "6.8.6" + "globby": "^7.1.1", + "power-assert": "^1.4.4", + "protobufjs": "^6.8.0" }, "dependencies": { "globby": { @@ -5680,12 +5816,12 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "glob": "7.1.2", - "ignore": "3.3.8", - "pify": "3.0.0", - "slash": "1.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } } } @@ -5696,23 +5832,23 @@ "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", "dev": true, "requires": { - "@sindresorhus/is": "0.7.0", - "cacheable-request": "2.1.4", - "decompress-response": "3.3.0", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "into-stream": "3.1.0", - "is-retry-allowed": "1.1.0", - "isurl": "1.0.0", - "lowercase-keys": "1.0.1", - "mimic-response": "1.0.0", - "p-cancelable": "0.3.0", - "p-timeout": "2.0.1", - "pify": "3.0.0", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "url-parse-lax": "3.0.0", - "url-to-options": "1.0.1" + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" }, "dependencies": { "prepend-http": { @@ -5727,7 +5863,7 @@ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "2.0.0" + "prepend-http": "^2.0.0" } } } @@ -5745,14 +5881,14 @@ "dev": true }, "grpc": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.11.3.tgz", - "integrity": "sha512-7fJ40USpnP7hxGK0uRoEhJz6unA5VUdwInfwAY2rK2+OVxdDJSdTZQ/8/M+1tW68pHZYgHvg2ohvJ+clhW3ANg==", - "requires": { - "lodash": "4.17.10", - "nan": "2.10.0", - "node-pre-gyp": "0.10.0", - "protobufjs": "5.0.3" + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.4.tgz", + "integrity": "sha512-t0Hy4yoHHYLkK0b+ULTHw5ZuSFmWokCABY0C4bKQbE4jnm1hpjA23cQVD0xAqDcRHN5CkvFzlqb34ngV22dqoQ==", + "requires": { + "lodash": "^4.17.5", + "nan": "^2.0.0", + "node-pre-gyp": "^0.10.0", + "protobufjs": "^5.0.3" }, "dependencies": { "abbrev": { @@ -5768,11 +5904,11 @@ "bundled": true }, "are-we-there-yet": { - "version": "1.1.4", + "version": "1.1.5", "bundled": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "balanced-match": { @@ -5783,7 +5919,7 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -5815,7 +5951,7 @@ } }, "deep-extend": { - "version": "0.5.1", + "version": "0.6.0", "bundled": true }, "delegates": { @@ -5830,7 +5966,7 @@ "version": "1.2.5", "bundled": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -5841,26 +5977,26 @@ "version": "2.7.4", "bundled": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "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" } }, "glob": { "version": "7.1.2", "bundled": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-unicode": { @@ -5868,22 +6004,25 @@ "bundled": true }, "iconv-lite": { - "version": "0.4.19", - "bundled": true + "version": "0.4.23", + "bundled": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } }, "ignore-walk": { "version": "3.0.1", "bundled": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -5898,7 +6037,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -5909,7 +6048,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -5917,18 +6056,18 @@ "bundled": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.3", "bundled": true, "requires": { - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" } }, "minizlib": { "version": "1.1.0", "bundled": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "mkdirp": { @@ -5952,33 +6091,33 @@ "version": "2.2.1", "bundled": true, "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.19", - "sax": "1.2.4" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, "node-pre-gyp": { "version": "0.10.0", "bundled": true, "requires": { - "detect-libc": "1.0.3", - "mkdirp": "0.5.1", - "needle": "2.2.1", - "nopt": "4.0.1", - "npm-packlist": "1.1.10", - "npmlog": "4.1.2", - "rc": "1.2.7", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "4.4.2" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, "nopt": { "version": "4.0.1", "bundled": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { @@ -5989,18 +6128,18 @@ "version": "1.1.10", "bundled": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, "npmlog": { "version": "4.1.2", "bundled": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { @@ -6015,7 +6154,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -6030,8 +6169,8 @@ "version": "0.1.5", "bundled": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -6047,44 +6186,48 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", "requires": { - "ascli": "1.0.1", - "bytebuffer": "5.0.1", - "glob": "7.1.2", - "yargs": "3.32.0" + "ascli": "~1", + "bytebuffer": "~5", + "glob": "^7.0.5", + "yargs": "^3.10.0" } }, "rc": { - "version": "1.2.7", + "version": "1.2.8", "bundled": true, "requires": { - "deep-extend": "0.5.1", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" } }, "readable-stream": { "version": "2.3.6", "bundled": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rimraf": { "version": "2.6.2", "bundled": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", "bundled": true }, "sax": { @@ -6107,23 +6250,23 @@ "version": "1.0.2", "bundled": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { "version": "1.1.1", "bundled": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -6131,22 +6274,16 @@ "bundled": true }, "tar": { - "version": "4.4.2", + "version": "4.4.4", "bundled": true, "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.2", - "yallist": "3.0.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "bundled": true - } + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.3", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" } }, "util-deprecate": { @@ -6154,10 +6291,10 @@ "bundled": true }, "wide-align": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -6175,11 +6312,11 @@ "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", "requires": { - "axios": "0.18.0", - "google-p12-pem": "1.0.2", - "jws": "3.1.5", - "mime": "2.3.1", - "pify": "3.0.0" + "axios": "^0.18.0", + "google-p12-pem": "^1.0.0", + "jws": "^3.1.4", + "mime": "^2.2.0", + "pify": "^3.0.0" } }, "handlebars": { @@ -6188,10 +6325,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "async": { @@ -6206,7 +6343,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -6221,8 +6358,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" + "ajv": "^5.1.0", + "har-schema": "^2.0.0" } }, "has-ansi": { @@ -6231,7 +6368,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-color": { @@ -6258,7 +6395,7 @@ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "has-symbol-support-x": "1.4.2" + "has-symbol-support-x": "^1.4.1" } }, "has-value": { @@ -6266,9 +6403,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -6276,8 +6413,8 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { @@ -6285,7 +6422,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6308,8 +6445,8 @@ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" } }, "hosted-git-info": { @@ -6324,12 +6461,12 @@ "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", "dev": true, "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.4.2", - "domutils": "1.7.0", - "entities": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" } }, "http-cache-semantics": { @@ -6343,9 +6480,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.14.1" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "hullabaloo-config-manager": { @@ -6354,20 +6491,20 @@ "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", "dev": true, "requires": { - "dot-prop": "4.2.0", - "es6-error": "4.1.1", - "graceful-fs": "4.1.11", - "indent-string": "3.2.0", - "json5": "0.5.1", - "lodash.clonedeep": "4.5.0", - "lodash.clonedeepwith": "4.5.0", - "lodash.isequal": "4.5.0", - "lodash.merge": "4.6.1", - "md5-hex": "2.0.0", - "package-hash": "2.0.0", - "pkg-dir": "2.0.0", - "resolve-from": "3.0.0", - "safe-buffer": "5.1.2" + "dot-prop": "^4.1.0", + "es6-error": "^4.0.2", + "graceful-fs": "^4.1.11", + "indent-string": "^3.1.0", + "json5": "^0.5.1", + "lodash.clonedeep": "^4.5.0", + "lodash.clonedeepwith": "^4.5.0", + "lodash.isequal": "^4.5.0", + "lodash.merge": "^4.6.0", + "md5-hex": "^2.0.0", + "package-hash": "^2.0.0", + "pkg-dir": "^2.0.0", + "resolve-from": "^3.0.0", + "safe-buffer": "^5.0.1" } }, "iconv-lite": { @@ -6376,13 +6513,13 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", - "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==" + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" }, "ignore-by-default": { "version": "1.0.1", @@ -6402,8 +6539,8 @@ "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", "dev": true, "requires": { - "pkg-dir": "2.0.0", - "resolve-cwd": "2.0.0" + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" } }, "imurmurhash": { @@ -6428,8 +6565,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -6449,8 +6586,8 @@ "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==", "dev": true, "requires": { - "moment": "2.22.1", - "sanitize-html": "1.18.2" + "moment": "^2.14.1", + "sanitize-html": "^1.13.0" } }, "inquirer": { @@ -6459,20 +6596,20 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "3.1.0", - "chalk": "2.4.1", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.2.0", - "figures": "2.0.0", - "lodash": "4.17.10", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" }, "dependencies": { "ansi-regex": { @@ -6493,8 +6630,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -6503,7 +6640,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -6514,7 +6651,7 @@ "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", "dev": true, "requires": { - "espower-loader": "1.2.2" + "espower-loader": "^1.0.0" } }, "into-stream": { @@ -6523,8 +6660,8 @@ "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, "requires": { - "from2": "2.3.0", - "p-is-promise": "1.1.0" + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" } }, "invariant": { @@ -6533,7 +6670,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -6552,7 +6689,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6560,7 +6697,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6577,7 +6714,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.11.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -6591,7 +6728,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-ci": { @@ -6600,7 +6737,7 @@ "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "1.1.3" + "ci-info": "^1.0.0" } }, "is-data-descriptor": { @@ -6608,7 +6745,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6616,7 +6753,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6626,9 +6763,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -6650,7 +6787,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-error": { @@ -6675,7 +6812,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -6683,7 +6820,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-generator-fn": { @@ -6697,7 +6834,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.1" } }, "is-installed-globally": { @@ -6706,8 +6843,8 @@ "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, "requires": { - "global-dirs": "0.1.1", - "is-path-inside": "1.0.1" + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" } }, "is-npm": { @@ -6721,7 +6858,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -6729,7 +6866,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -6752,7 +6889,7 @@ "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "symbol-observable": "1.2.0" + "symbol-observable": "^1.1.0" } }, "is-odd": { @@ -6760,7 +6897,7 @@ "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "requires": { - "is-number": "4.0.0" + "is-number": "^4.0.0" }, "dependencies": { "is-number": { @@ -6782,7 +6919,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -6791,7 +6928,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, "is-plain-obj": { @@ -6805,7 +6942,7 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "is-posix-bracket": { @@ -6898,14 +7035,35 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "istanbul-lib-coverage": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.0.tgz", + "integrity": "sha512-yMSw5xLIbdaxiVXHk3amfNM2WeBxLrwH/BCyZ9HvA/fylwziAIJOG2rKqWyLqEJqwKT725vxxqidv+SyynnGAA==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.2.0.tgz", + "integrity": "sha512-ozQGtlIw+/a/F3n6QwWiuuyRAPp64+g2GVsKYsIez0sgIEzkU5ZpL2uZ5pmAzbEJ82anlRaPlOQZzkRXspgJyg==", + "dev": true, + "requires": { + "@babel/generator": "7.0.0-beta.49", + "@babel/parser": "7.0.0-beta.49", + "@babel/template": "7.0.0-beta.49", + "@babel/traverse": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.49", + "istanbul-lib-coverage": "^2.0.0", + "semver": "^5.5.0" + } + }, "isurl": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { - "has-to-string-tag-x": "1.4.1", - "is-object": "1.0.1" + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" } }, "jest-docblock": { @@ -6927,13 +7085,13 @@ "dev": true }, "js-yaml": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", - "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "js2xmlparser": { @@ -6942,7 +7100,7 @@ "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", "dev": true, "requires": { - "xmlcreate": "1.0.2" + "xmlcreate": "^1.0.1" } }, "jsbn": { @@ -6958,17 +7116,17 @@ "dev": true, "requires": { "babylon": "7.0.0-beta.19", - "bluebird": "3.5.1", - "catharsis": "0.8.9", - "escape-string-regexp": "1.0.5", - "js2xmlparser": "3.0.0", - "klaw": "2.0.0", - "marked": "0.3.19", - "mkdirp": "0.5.1", - "requizzle": "0.2.1", - "strip-json-comments": "2.0.1", + "bluebird": "~3.5.0", + "catharsis": "~0.8.9", + "escape-string-regexp": "~1.0.5", + "js2xmlparser": "~3.0.0", + "klaw": "~2.0.0", + "marked": "~0.3.6", + "mkdirp": "~0.5.1", + "requizzle": "~0.2.1", + "strip-json-comments": "~2.0.1", "taffydb": "2.6.2", - "underscore": "1.8.3" + "underscore": "~1.8.3" }, "dependencies": { "babylon": { @@ -7030,7 +7188,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsprim": { @@ -7057,7 +7215,7 @@ "requires": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.10", - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "jws": { @@ -7065,8 +7223,8 @@ "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", "requires": { - "jwa": "1.1.6", - "safe-buffer": "5.1.2" + "jwa": "^1.1.5", + "safe-buffer": "^5.0.1" } }, "keyv": { @@ -7089,7 +7247,7 @@ "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.9" } }, "last-line-stream": { @@ -7098,7 +7256,7 @@ "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", "dev": true, "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "latest-version": { @@ -7107,7 +7265,7 @@ "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "4.0.1" + "package-json": "^4.0.0" } }, "lazy-cache": { @@ -7122,7 +7280,7 @@ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "levn": { @@ -7131,8 +7289,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "load-json-file": { @@ -7141,10 +7299,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" }, "dependencies": { "pify": { @@ -7161,8 +7319,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { @@ -7247,9 +7405,9 @@ "dev": true }, "lolex": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.6.0.tgz", - "integrity": "sha512-e1UtIo1pbrIqEXib/yMjHciyqkng5lc0rrIbytgjmRgDR9+2ceNIAcwOWSgylRjoEP9VdVguCSRwnNmlbnOUwA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", + "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", "dev": true }, "long": { @@ -7269,7 +7427,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "loud-rejection": { @@ -7278,8 +7436,8 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" } }, "lowercase-keys": { @@ -7293,8 +7451,8 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "make-dir": { @@ -7303,7 +7461,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "map-cache": { @@ -7322,7 +7480,7 @@ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "marked": { @@ -7332,12 +7490,12 @@ "dev": true }, "matcher": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.0.tgz", - "integrity": "sha512-aZGv6JBTHqfqAd09jmAlbKnAICTfIvb5Z8gXVxPB5WZtFfHMaAMdACL7tQflD2V+6/8KNcY8s6DYtWLgpJP5lA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz", + "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.4" } }, "math-random": { @@ -7352,7 +7510,7 @@ "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -7367,7 +7525,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "meow": { @@ -7376,16 +7534,16 @@ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" }, "dependencies": { "find-up": { @@ -7394,8 +7552,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "load-json-file": { @@ -7404,11 +7562,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "minimist": { @@ -7423,7 +7581,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-type": { @@ -7432,9 +7590,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -7455,7 +7613,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "read-pkg": { @@ -7464,9 +7622,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -7475,8 +7633,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" } }, "strip-bom": { @@ -7485,7 +7643,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } } } @@ -7502,7 +7660,7 @@ "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "merge2": { @@ -7521,19 +7679,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } }, "mime": { @@ -7551,7 +7709,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "mime-db": "1.33.0" + "mime-db": "~1.33.0" } }, "mimic-fn": { @@ -7571,7 +7729,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -7585,8 +7743,8 @@ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -7594,7 +7752,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -7645,9 +7803,9 @@ "dev": true }, "moment": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz", - "integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==", + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=", "dev": true }, "ms": { @@ -7661,7 +7819,7 @@ "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", "dev": true, "requires": { - "source-map": "0.1.43" + "source-map": "^0.1.34" }, "dependencies": { "source-map": { @@ -7670,7 +7828,7 @@ "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -7681,10 +7839,10 @@ "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", "dev": true, "requires": { - "array-differ": "1.0.0", - "array-union": "1.0.2", - "arrify": "1.0.1", - "minimatch": "3.0.4" + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" } }, "mute-stream": { @@ -7703,18 +7861,18 @@ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" } }, "natural-compare": { @@ -7730,16 +7888,16 @@ "dev": true }, "nise": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.3.tgz", - "integrity": "sha512-v1J/FLUB9PfGqZLGDBhQqODkbLotP0WtLo9R4EJY2PPu5f5Xg4o0rA8FDlmrjFSv9vBBKcfnOSpfYYuu5RTHqg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", + "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", "dev": true, "requires": { - "@sinonjs/formatio": "2.0.0", - "just-extend": "1.1.27", - "lolex": "2.6.0", - "path-to-regexp": "1.7.0", - "text-encoding": "0.6.4" + "@sinonjs/formatio": "^2.0.0", + "just-extend": "^1.1.27", + "lolex": "^2.3.2", + "path-to-regexp": "^1.7.0", + "text-encoding": "^0.6.4" } }, "node-forge": { @@ -7753,10 +7911,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -7765,7 +7923,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "normalize-url": { @@ -7774,9 +7932,9 @@ "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "requires": { - "prepend-http": "2.0.0", - "query-string": "5.1.1", - "sort-keys": "2.0.0" + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" }, "dependencies": { "prepend-http": { @@ -7793,7 +7951,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -7802,38 +7960,38 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.8.0.tgz", - "integrity": "sha512-PUFq1PSsx5OinSk5g5aaZygcDdI3QQT5XUlbR9QRMihtMS6w0Gm8xj4BxmKeeAlpQXC5M2DIhH16Y+KejceivQ==", - "dev": true, - "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.2.0", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.10.1", - "istanbul-lib-report": "1.1.3", - "istanbul-lib-source-maps": "1.2.3", - "istanbul-reports": "1.4.0", - "md5-hex": "1.3.0", - "merge-source-map": "1.1.0", - "micromatch": "3.1.10", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.2.1", + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-12.0.2.tgz", + "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", + "dev": true, + "requires": { + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.5.1", + "debug-log": "^1.0.1", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^2.1.0", + "foreground-child": "^1.5.3", + "glob": "^7.0.6", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^2.1.0", + "istanbul-lib-report": "^1.1.3", + "istanbul-lib-source-maps": "^1.2.5", + "istanbul-reports": "^1.4.1", + "md5-hex": "^1.2.0", + "merge-source-map": "^1.1.0", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.0", + "resolve-from": "^2.0.0", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.1", + "spawn-wrap": "^1.4.2", + "test-exclude": "^4.2.0", "yargs": "11.1.0", - "yargs-parser": "8.1.0" + "yargs-parser": "^8.0.0" }, "dependencies": { "align-text": { @@ -7841,9 +7999,9 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -7852,12 +8010,7 @@ "dev": true }, "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", + "version": "3.0.0", "bundled": true, "dev": true }, @@ -7866,7 +8019,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -7914,92 +8067,6 @@ "bundled": true, "dev": true }, - "babel-code-frame": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, - "babel-generator": { - "version": "6.26.1", - "bundled": true, - "dev": true, - "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "6.26.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "core-js": "2.5.6", - "regenerator-runtime": "0.11.1" - } - }, - "babel-template": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.10" - } - }, - "babel-traverse": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.4", - "lodash": "4.17.10" - } - }, - "babel-types": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "bundled": true, - "dev": true - }, "balanced-match": { "version": "1.0.0", "bundled": true, @@ -8010,13 +8077,13 @@ "bundled": true, "dev": true, "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -8024,7 +8091,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -8032,7 +8099,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8040,7 +8107,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8048,16 +8115,11 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -8070,7 +8132,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -8079,16 +8141,16 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -8096,7 +8158,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8111,22 +8173,15 @@ "bundled": true, "dev": true, "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "caching-transform": { @@ -8134,9 +8189,9 @@ "bundled": true, "dev": true, "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" + "md5-hex": "^1.2.0", + "mkdirp": "^0.5.1", + "write-file-atomic": "^1.1.4" } }, "camelcase": { @@ -8151,20 +8206,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" - } - }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "class-utils": { @@ -8172,10 +8215,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -8183,13 +8226,8 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true } } }, @@ -8199,8 +8237,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -8222,8 +8260,8 @@ "bundled": true, "dev": true, "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "commondir": { @@ -8251,22 +8289,17 @@ "bundled": true, "dev": true }, - "core-js": { - "version": "2.5.6", - "bundled": true, - "dev": true - }, "cross-spawn": { "version": "4.0.2", "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.3", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, "debug": { - "version": "2.6.9", + "version": "3.1.0", "bundled": true, "dev": true, "requires": { @@ -8293,7 +8326,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "define-property": { @@ -8301,8 +8334,8 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -8310,7 +8343,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8318,7 +8351,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8326,16 +8359,11 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -8343,44 +8371,26 @@ } } }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "repeating": "2.0.1" - } - }, "error-ex": { "version": "1.3.1", "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "esutils": { - "version": "2.0.2", - "bundled": true, - "dev": true - }, "execa": { "version": "0.7.0", "bundled": true, "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -8388,9 +8398,9 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.3", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -8400,21 +8410,29 @@ "bundled": true, "dev": true, "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { - "define-property": { - "version": "0.2.5", + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -8422,7 +8440,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8432,8 +8450,8 @@ "bundled": true, "dev": true, "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -8441,7 +8459,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -8451,14 +8469,14 @@ "bundled": true, "dev": true, "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -8466,7 +8484,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -8474,7 +8492,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -8482,7 +8500,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8490,7 +8508,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8498,9 +8516,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "kind-of": { @@ -8515,10 +8533,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -8526,7 +8544,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8536,9 +8554,9 @@ "bundled": true, "dev": true, "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" + "commondir": "^1.0.1", + "mkdirp": "^0.5.1", + "pkg-dir": "^1.0.0" } }, "find-up": { @@ -8546,7 +8564,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -8559,8 +8577,8 @@ "bundled": true, "dev": true, "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, "fragment-cache": { @@ -8568,7 +8586,7 @@ "bundled": true, "dev": true, "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "fs.realpath": { @@ -8596,19 +8614,14 @@ "bundled": true, "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "globals": { - "version": "9.18.0", - "bundled": true, - "dev": true - }, "graceful-fs": { "version": "4.1.11", "bundled": true, @@ -8619,10 +8632,10 @@ "bundled": true, "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -8630,39 +8643,19 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } }, - "has-ansi": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "has-value": { "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -8670,34 +8663,16 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, "kind-of": { "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -8717,8 +8692,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -8726,14 +8701,6 @@ "bundled": true, "dev": true }, - "invariant": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "1.3.1" - } - }, "invert-kv": { "version": "1.0.0", "bundled": true, @@ -8744,7 +8711,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-arrayish": { @@ -8762,7 +8729,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-data-descriptor": { @@ -8770,7 +8737,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-descriptor": { @@ -8778,9 +8745,9 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -8795,14 +8762,6 @@ "bundled": true, "dev": true }, - "is-finite": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, "is-fullwidth-code-point": { "version": "2.0.0", "bundled": true, @@ -8813,7 +8772,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-odd": { @@ -8821,7 +8780,7 @@ "bundled": true, "dev": true, "requires": { - "is-number": "4.0.0" + "is-number": "^4.0.0" }, "dependencies": { "is-number": { @@ -8836,14 +8795,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "isobject": "^3.0.1" } }, "is-stream": { @@ -8886,21 +8838,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.1", - "bundled": true, - "dev": true, - "requires": { - "babel-generator": "6.26.1", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.2.0", - "semver": "5.5.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-report": { @@ -8908,68 +8846,53 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.2", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { + "has-flag": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, "supports-color": { "version": "3.2.3", "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } }, "istanbul-lib-source-maps": { - "version": "1.2.3", + "version": "1.2.5", "bundled": true, "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" } }, "istanbul-reports": { - "version": "1.4.0", + "version": "1.4.1", "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, - "js-tokens": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, "kind-of": { "version": "3.2.2", "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -8983,7 +8906,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -8991,11 +8914,11 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "locate-path": { @@ -9003,8 +8926,8 @@ "bundled": true, "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { @@ -9014,31 +8937,18 @@ } } }, - "lodash": { - "version": "4.17.10", - "bundled": true, - "dev": true - }, "longest": { "version": "1.0.1", "bundled": true, "dev": true }, - "loose-envify": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "js-tokens": "3.0.2" - } - }, "lru-cache": { "version": "4.1.3", "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "map-cache": { @@ -9051,7 +8961,7 @@ "bundled": true, "dev": true, "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "md5-hex": { @@ -9059,7 +8969,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -9072,7 +8982,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -9080,7 +8990,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.6.1" + "source-map": "^0.6.1" }, "dependencies": { "source-map": { @@ -9095,19 +9005,19 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" }, "dependencies": { "kind-of": { @@ -9127,7 +9037,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -9140,8 +9050,8 @@ "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -9149,7 +9059,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -9172,30 +9082,20 @@ "bundled": true, "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -9208,10 +9108,10 @@ "bundled": true, "dev": true, "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "npm-run-path": { @@ -9219,7 +9119,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -9237,9 +9137,9 @@ "bundled": true, "dev": true, "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -9247,7 +9147,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9257,14 +9157,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "isobject": "^3.0.0" } }, "object.pick": { @@ -9272,14 +9165,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } + "isobject": "^3.0.1" } }, "once": { @@ -9287,7 +9173,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -9295,8 +9181,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -9309,9 +9195,9 @@ "bundled": true, "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "p-finally": { @@ -9324,7 +9210,7 @@ "bundled": true, "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -9332,7 +9218,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-try": { @@ -9345,7 +9231,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "pascalcase": { @@ -9358,7 +9244,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -9381,9 +9267,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -9401,7 +9287,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -9409,7 +9295,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -9417,8 +9303,8 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } @@ -9438,9 +9324,9 @@ "bundled": true, "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -9448,8 +9334,8 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { @@ -9457,24 +9343,19 @@ "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } } } }, - "regenerator-runtime": { - "version": "0.11.1", - "bundled": true, - "dev": true - }, "regex-not": { "version": "1.0.2", "bundled": true, "dev": true, "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "repeat-element": { @@ -9487,14 +9368,6 @@ "bundled": true, "dev": true }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-finite": "1.0.2" - } - }, "require-directory": { "version": "2.1.1", "bundled": true, @@ -9526,7 +9399,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -9534,7 +9407,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-regex": { @@ -9542,7 +9415,7 @@ "bundled": true, "dev": true, "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "semver": { @@ -9560,10 +9433,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -9571,7 +9444,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9581,7 +9454,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -9604,22 +9477,30 @@ "bundled": true, "dev": true, "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.1", - "use": "3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "define-property": { "version": "0.2.5", "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -9627,7 +9508,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9637,9 +9518,9 @@ "bundled": true, "dev": true, "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -9647,7 +9528,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -9655,7 +9536,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -9663,7 +9544,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -9671,16 +9552,11 @@ "bundled": true, "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -9693,7 +9569,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" } }, "source-map": { @@ -9702,15 +9578,15 @@ "dev": true }, "source-map-resolve": { - "version": "0.5.1", + "version": "0.5.2", "bundled": true, "dev": true, "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-url": { @@ -9723,12 +9599,12 @@ "bundled": true, "dev": true, "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.0" + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" } }, "spdx-correct": { @@ -9736,8 +9612,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -9750,8 +9626,8 @@ "bundled": true, "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -9764,7 +9640,7 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "static-extend": { @@ -9772,8 +9648,8 @@ "bundled": true, "dev": true, "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -9781,7 +9657,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9791,31 +9667,16 @@ "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { - "version": "3.0.1", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^3.0.0" } }, "strip-bom": { @@ -9823,7 +9684,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -9831,284 +9692,24 @@ "bundled": true, "dev": true }, - "supports-color": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, "test-exclude": { "version": "4.2.1", "bundled": true, "dev": true, "requires": { - "arrify": "1.0.1", - "micromatch": "3.1.10", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "braces": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "0.1.6" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "1.0.2" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "6.0.2" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "6.0.2" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" - } - }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - } - } + "arrify": "^1.0.1", + "micromatch": "^3.1.8", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" } }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, "to-object-path": { "version": "0.3.0", "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "to-regex": { @@ -10116,10 +9717,10 @@ "bundled": true, "dev": true, "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -10127,34 +9728,19 @@ "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - } - } + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, - "trim-right": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, "uglify-js": { "version": "2.8.29", "bundled": true, "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "yargs": { @@ -10163,9 +9749,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -10182,10 +9768,10 @@ "bundled": true, "dev": true, "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -10193,7 +9779,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -10201,10 +9787,10 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -10214,8 +9800,8 @@ "bundled": true, "dev": true, "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -10223,9 +9809,9 @@ "bundled": true, "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -10242,11 +9828,6 @@ "version": "0.1.4", "bundled": true, "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true } } }, @@ -10260,7 +9841,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" }, "dependencies": { "kind-of": { @@ -10275,16 +9856,16 @@ "bundled": true, "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "which": { - "version": "1.3.0", + "version": "1.3.1", "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -10308,16 +9889,21 @@ "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "string-width": { @@ -10325,9 +9911,17 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" } } } @@ -10342,9 +9936,9 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "y18n": { @@ -10362,25 +9956,20 @@ "bundled": true, "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, "camelcase": { "version": "4.1.0", "bundled": true, @@ -10391,17 +9980,9 @@ "bundled": true, "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "3.0.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "yargs-parser": { @@ -10409,7 +9990,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" } } } @@ -10419,7 +10000,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -10447,9 +10028,9 @@ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -10457,7 +10038,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "kind-of": { @@ -10465,22 +10046,22 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } }, "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" } }, "object.omit": { @@ -10489,8 +10070,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "object.pick": { @@ -10498,7 +10079,7 @@ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "observable-to-promise": { @@ -10507,8 +10088,8 @@ "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", "dev": true, "requires": { - "is-observable": "0.2.0", - "symbol-observable": "1.2.0" + "is-observable": "^0.2.0", + "symbol-observable": "^1.0.4" }, "dependencies": { "is-observable": { @@ -10517,7 +10098,7 @@ "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", "dev": true, "requires": { - "symbol-observable": "0.2.4" + "symbol-observable": "^0.2.2" }, "dependencies": { "symbol-observable": { @@ -10535,7 +10116,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -10544,7 +10125,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "optimist": { @@ -10553,8 +10134,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "option-chain": { @@ -10569,12 +10150,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" }, "dependencies": { "wordwrap": { @@ -10601,7 +10182,7 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "lcid": "1.0.0" + "lcid": "^1.0.0" } }, "os-tmpdir": { @@ -10629,12 +10210,12 @@ "dev": true }, "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -10643,7 +10224,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-timeout": { @@ -10652,7 +10233,7 @@ "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "requires": { - "p-finally": "1.0.0" + "p-finally": "^1.0.0" } }, "p-try": { @@ -10667,10 +10248,10 @@ "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "lodash.flattendeep": "4.4.0", - "md5-hex": "2.0.0", - "release-zalgo": "1.0.0" + "graceful-fs": "^4.1.11", + "lodash.flattendeep": "^4.4.0", + "md5-hex": "^2.0.0", + "release-zalgo": "^1.0.0" } }, "package-json": { @@ -10679,10 +10260,10 @@ "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0", - "semver": "5.5.0" + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" }, "dependencies": { "got": { @@ -10691,17 +10272,17 @@ "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.1", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" } } } @@ -10712,10 +10293,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" }, "dependencies": { "is-extglob": { @@ -10730,7 +10311,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -10741,7 +10322,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "parse-ms": { @@ -10811,7 +10392,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "performance-now": { @@ -10836,7 +10417,7 @@ "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", "dev": true, "requires": { - "pinkie": "1.0.0" + "pinkie": "^1.0.0" } }, "pkg-conf": { @@ -10845,8 +10426,8 @@ "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { - "find-up": "2.1.0", - "load-json-file": "4.0.0" + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" }, "dependencies": { "load-json-file": { @@ -10855,10 +10436,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, "parse-json": { @@ -10867,8 +10448,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.2" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } } } @@ -10879,7 +10460,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "2.1.0" + "find-up": "^2.1.0" } }, "plur": { @@ -10888,7 +10469,7 @@ "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "dev": true, "requires": { - "irregular-plurals": "1.4.0" + "irregular-plurals": "^1.0.0" } }, "pluralize": { @@ -10903,14 +10484,14 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "6.0.22", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz", - "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "2.4.1", - "source-map": "0.6.1", - "supports-color": "5.4.0" + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" }, "dependencies": { "source-map": { @@ -10922,45 +10503,45 @@ } }, "power-assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.5.0.tgz", - "integrity": "sha512-WaWSw+Ts283o6dzxW1BxIxoaHok7aSSGx4SaR6dW62Pk31ynv9DERDieuZpPYv5XaJ+H+zdcOaJQ+PvlasAOVw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.6.0.tgz", + "integrity": "sha512-nDb6a+p2C7Wj8Y2zmFtLpuv+xobXz4+bzT5s7dr0nn71tLozn7nRMQqzwbefzwZN5qOm0N7Cxhw4kXP75xboKA==", "requires": { - "define-properties": "1.1.2", - "empower": "1.2.3", - "power-assert-formatter": "1.4.1", - "universal-deep-strict-equal": "1.2.2", - "xtend": "4.0.1" + "define-properties": "^1.1.2", + "empower": "^1.3.0", + "power-assert-formatter": "^1.4.1", + "universal-deep-strict-equal": "^1.2.1", + "xtend": "^4.0.0" } }, "power-assert-context-formatter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.1.1.tgz", - "integrity": "sha1-7bo1LT7YpgMRTWZyZazOYNaJzN8=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.2.0.tgz", + "integrity": "sha512-HLNEW8Bin+BFCpk/zbyKwkEu9W8/zThIStxGo7weYcFkKgMuGCHUJhvJeBGXDZf0Qm2xis4pbnnciGZiX0EpSg==", "requires": { - "core-js": "2.5.6", - "power-assert-context-traversal": "1.1.1" + "core-js": "^2.0.0", + "power-assert-context-traversal": "^1.2.0" } }, "power-assert-context-reducer-ast": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.1.2.tgz", - "integrity": "sha1-SEqZ4m9Jc/+IMuXFzHVnAuYJQXQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.2.0.tgz", + "integrity": "sha512-EgOxmZ/Lb7tw4EwSKX7ZnfC0P/qRZFEG28dx/690qvhmOJ6hgThYFm5TUWANDLK5NiNKlPBi5WekVGd2+5wPrw==", "requires": { - "acorn": "4.0.13", - "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.6", - "espurify": "1.8.0", - "estraverse": "4.2.0" + "acorn": "^5.0.0", + "acorn-es7-plugin": "^1.0.12", + "core-js": "^2.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.2.0" } }, "power-assert-context-traversal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.1.1.tgz", - "integrity": "sha1-iMq8oNE7Y1nwfT0+ivppkmRXftk=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.2.0.tgz", + "integrity": "sha512-NFoHU6g2umNajiP2l4qb0BRWD773Aw9uWdWYH9EQsVwIZnog5bd2YYLFCVvaxWpwNzWeEfZIon2xtyc63026pQ==", "requires": { - "core-js": "2.5.6", - "estraverse": "4.2.0" + "core-js": "^2.0.0", + "estraverse": "^4.1.0" } }, "power-assert-formatter": { @@ -10968,22 +10549,22 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.6", - "power-assert-context-formatter": "1.1.1", - "power-assert-context-reducer-ast": "1.1.2", - "power-assert-renderer-assertion": "1.1.1", - "power-assert-renderer-comparison": "1.1.1", - "power-assert-renderer-diagram": "1.1.2", - "power-assert-renderer-file": "1.1.1" + "core-js": "^2.0.0", + "power-assert-context-formatter": "^1.0.7", + "power-assert-context-reducer-ast": "^1.0.7", + "power-assert-renderer-assertion": "^1.0.7", + "power-assert-renderer-comparison": "^1.0.7", + "power-assert-renderer-diagram": "^1.0.7", + "power-assert-renderer-file": "^1.0.7" } }, "power-assert-renderer-assertion": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.1.1.tgz", - "integrity": "sha1-y/wOd+AIao+Wrz8djme57n4ozpg=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.2.0.tgz", + "integrity": "sha512-3F7Q1ZLmV2ZCQv7aV7NJLNK9G7QsostrhOU7U0RhEQS/0vhEqrRg2jEJl1jtUL4ZyL2dXUlaaqrmPv5r9kRvIg==", "requires": { - "power-assert-renderer-base": "1.1.1", - "power-assert-util-string-width": "1.1.1" + "power-assert-renderer-base": "^1.1.1", + "power-assert-util-string-width": "^1.2.0" } }, "power-assert-renderer-base": { @@ -10992,42 +10573,42 @@ "integrity": "sha1-lqZQxv0F7hvB9mtUrWFELIs/Y+s=" }, "power-assert-renderer-comparison": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.1.1.tgz", - "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.2.0.tgz", + "integrity": "sha512-7c3RKPDBKK4E3JqdPtYRE9cM8AyX4LC4yfTvvTYyx8zSqmT5kJnXwzR0yWQLOavACllZfwrAGQzFiXPc5sWa+g==", "requires": { - "core-js": "2.5.6", - "diff-match-patch": "1.0.1", - "power-assert-renderer-base": "1.1.1", - "stringifier": "1.3.0", - "type-name": "2.0.2" + "core-js": "^2.0.0", + "diff-match-patch": "^1.0.0", + "power-assert-renderer-base": "^1.1.1", + "stringifier": "^1.3.0", + "type-name": "^2.0.1" } }, "power-assert-renderer-diagram": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.1.2.tgz", - "integrity": "sha1-ZV+PcRk1qbbVQbhjJ2VHF8Y3qYY=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.2.0.tgz", + "integrity": "sha512-JZ6PC+DJPQqfU6dwSmpcoD7gNnb/5U77bU5KgNwPPa+i1Pxiz6UuDeM3EUBlhZ1HvH9tMjI60anqVyi5l2oNdg==", "requires": { - "core-js": "2.5.6", - "power-assert-renderer-base": "1.1.1", - "power-assert-util-string-width": "1.1.1", - "stringifier": "1.3.0" + "core-js": "^2.0.0", + "power-assert-renderer-base": "^1.1.1", + "power-assert-util-string-width": "^1.2.0", + "stringifier": "^1.3.0" } }, "power-assert-renderer-file": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.1.1.tgz", - "integrity": "sha1-o34rvReMys0E5427eckv40kzxec=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.2.0.tgz", + "integrity": "sha512-/oaVrRbeOtGoyyd7e4IdLP/jIIUFJdqJtsYzP9/88R39CMnfF/S/rUc8ZQalENfUfQ/wQHu+XZYRMaCEZmEesg==", "requires": { - "power-assert-renderer-base": "1.1.1" + "power-assert-renderer-base": "^1.1.1" } }, "power-assert-util-string-width": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.1.1.tgz", - "integrity": "sha1-vmWet5N/3S5smncmjar2S9W3xZI=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz", + "integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==", "requires": { - "eastasianwidth": "0.1.1" + "eastasianwidth": "^0.2.0" } }, "prelude-ls": { @@ -11049,19 +10630,18 @@ "dev": true }, "prettier": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.12.1.tgz", - "integrity": "sha1-wa0g6APndJ+vkFpAnSNn4Gu+cyU=", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.5.tgz", + "integrity": "sha512-4M90mfvLz6yRf2Dhzd+xPIE6b4xkI8nHMJhsSm9IlfG17g6wujrrm7+H1X8x52tC4cSNm6HmuhCUSNe6Hd5wfw==", "dev": true }, "pretty-ms": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", - "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.2.0.tgz", + "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", "dev": true, "requires": { - "parse-ms": "1.0.1", - "plur": "2.1.2" + "parse-ms": "^1.0.0" }, "dependencies": { "parse-ms": { @@ -11094,19 +10674,19 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/base64": "1.1.2", - "@protobufjs/codegen": "2.0.4", - "@protobufjs/eventemitter": "1.1.0", - "@protobufjs/fetch": "1.1.0", - "@protobufjs/float": "1.0.2", - "@protobufjs/inquire": "1.1.0", - "@protobufjs/path": "1.1.2", - "@protobufjs/pool": "1.1.0", - "@protobufjs/utf8": "1.1.0", - "@types/long": "3.0.32", - "@types/node": "8.10.17", - "long": "4.0.0" + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^3.0.32", + "@types/node": "^8.9.4", + "long": "^4.0.0" } }, "proxyquire": { @@ -11115,9 +10695,9 @@ "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", "dev": true, "requires": { - "fill-keys": "1.0.2", - "module-not-found-error": "1.0.1", - "resolve": "1.1.7" + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.0", + "resolve": "~1.1.7" } }, "pseudomap": { @@ -11141,9 +10721,9 @@ "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { - "decode-uri-component": "0.2.0", - "object-assign": "4.1.1", - "strict-uri-encode": "1.1.0" + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" } }, "randomatic": { @@ -11152,9 +10732,9 @@ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "4.0.0", - "kind-of": "6.0.2", - "math-random": "1.0.1" + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" }, "dependencies": { "is-number": { @@ -11166,15 +10746,15 @@ } }, "rc": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", - "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { - "deep-extend": "0.5.1", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -11191,9 +10771,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" }, "dependencies": { "path-type": { @@ -11202,7 +10782,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" } }, "pify": { @@ -11219,8 +10799,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" } }, "readable-stream": { @@ -11228,13 +10808,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "readdirp": { @@ -11243,10 +10823,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.6", - "set-immediate-shim": "1.0.1" + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" } }, "redent": { @@ -11255,8 +10835,8 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" }, "dependencies": { "indent-string": { @@ -11265,7 +10845,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } } } @@ -11288,7 +10868,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "regex-not": { @@ -11296,8 +10876,8 @@ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "regexpp": { @@ -11312,9 +10892,9 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "1.4.0", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" } }, "registry-auth-token": { @@ -11323,8 +10903,8 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "1.2.7", - "safe-buffer": "5.1.2" + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" } }, "registry-url": { @@ -11333,7 +10913,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.7" + "rc": "^1.0.1" } }, "regjsgen": { @@ -11348,7 +10928,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "0.5.0" + "jsesc": "~0.5.0" } }, "release-zalgo": { @@ -11357,7 +10937,7 @@ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { - "es6-error": "4.1.1" + "es6-error": "^4.0.1" } }, "remove-trailing-separator": { @@ -11382,7 +10962,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "request": { @@ -11390,26 +10970,26 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.7.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.2", - "safe-buffer": "5.1.2", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" } }, "require-directory": { @@ -11436,8 +11016,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" }, "dependencies": { "resolve-from": { @@ -11454,7 +11034,7 @@ "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", "dev": true, "requires": { - "underscore": "1.6.0" + "underscore": "~1.6.0" }, "dependencies": { "underscore": { @@ -11477,7 +11057,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "3.0.0" + "resolve-from": "^3.0.0" } }, "resolve-from": { @@ -11497,7 +11077,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "1.0.1" + "lowercase-keys": "^1.0.0" } }, "restore-cursor": { @@ -11506,8 +11086,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, "ret": { @@ -11527,7 +11107,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -11536,7 +11116,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "run-async": { @@ -11545,7 +11125,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "2.1.0" + "is-promise": "^2.1.0" } }, "rx-lite": { @@ -11560,7 +11140,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "4.0.8" + "rx-lite": "*" } }, "safe-buffer": { @@ -11573,14 +11153,13 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "samsam": { "version": "1.3.0", @@ -11594,16 +11173,16 @@ "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", "dev": true, "requires": { - "chalk": "2.4.1", - "htmlparser2": "3.9.2", - "lodash.clonedeep": "4.5.0", - "lodash.escaperegexp": "4.1.2", - "lodash.isplainobject": "4.0.6", - "lodash.isstring": "4.0.1", - "lodash.mergewith": "4.6.1", - "postcss": "6.0.22", - "srcset": "1.0.0", - "xtend": "4.0.1" + "chalk": "^2.3.0", + "htmlparser2": "^3.9.0", + "lodash.clonedeep": "^4.5.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.mergewith": "^4.6.0", + "postcss": "^6.0.14", + "srcset": "^1.0.0", + "xtend": "^4.0.0" } }, "semver": { @@ -11618,7 +11197,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "5.5.0" + "semver": "^5.0.3" } }, "serialize-error": { @@ -11644,10 +11223,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -11655,7 +11234,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -11666,7 +11245,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -11687,13 +11266,13 @@ "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", "dev": true, "requires": { - "@sinonjs/formatio": "2.0.0", - "diff": "3.5.0", - "lodash.get": "4.4.2", - "lolex": "2.6.0", - "nise": "1.3.3", - "supports-color": "5.4.0", - "type-detect": "4.0.8" + "@sinonjs/formatio": "^2.0.0", + "diff": "^3.1.0", + "lodash.get": "^4.4.2", + "lolex": "^2.2.0", + "nise": "^1.2.0", + "supports-color": "^5.1.0", + "type-detect": "^4.0.5" } }, "slash": { @@ -11707,7 +11286,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0" + "is-fullwidth-code-point": "^2.0.0" }, "dependencies": { "is-fullwidth-code-point": { @@ -11729,14 +11308,14 @@ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.2", - "use": "3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { "define-property": { @@ -11744,7 +11323,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -11752,7 +11331,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -11762,9 +11341,9 @@ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -11772,7 +11351,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -11780,7 +11359,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -11788,7 +11367,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -11796,9 +11375,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -11808,7 +11387,7 @@ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" }, "dependencies": { "kind-of": { @@ -11816,7 +11395,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -11827,7 +11406,7 @@ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "is-plain-obj": "1.1.0" + "is-plain-obj": "^1.0.0" } }, "source-map": { @@ -11840,11 +11419,11 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-support": { @@ -11853,8 +11432,8 @@ "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { - "buffer-from": "1.0.0", - "source-map": "0.6.1" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" }, "dependencies": { "source-map": { @@ -11876,8 +11455,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -11892,8 +11471,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -11907,7 +11486,7 @@ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "sprintf-js": { @@ -11922,23 +11501,24 @@ "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", "dev": true, "requires": { - "array-uniq": "1.0.3", - "number-is-nan": "1.0.1" + "array-uniq": "^1.0.2", + "number-is-nan": "^1.0.0" } }, "sshpk": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", - "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" } }, "stack-utils": { @@ -11952,8 +11532,8 @@ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -11961,7 +11541,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -11988,9 +11568,9 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { @@ -11998,7 +11578,7 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "stringifier": { @@ -12006,9 +11586,9 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.6", - "traverse": "0.6.6", - "type-name": "2.0.2" + "core-js": "^2.0.0", + "traverse": "^0.6.6", + "type-name": "^2.0.1" } }, "strip-ansi": { @@ -12016,7 +11596,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -12031,7 +11611,7 @@ "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.1" } }, "strip-eof": { @@ -12046,7 +11626,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "4.0.1" + "get-stdin": "^4.0.1" } }, "strip-json-comments": { @@ -12061,16 +11641,16 @@ "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "dev": true, "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.1", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.2", - "readable-stream": "2.3.6" + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.3.5" }, "dependencies": { "debug": { @@ -12096,11 +11676,11 @@ "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", "dev": true, "requires": { - "arrify": "1.0.1", - "indent-string": "3.2.0", - "js-yaml": "3.11.0", - "serialize-error": "2.1.0", - "strip-ansi": "4.0.0" + "arrify": "^1.0.1", + "indent-string": "^3.2.0", + "js-yaml": "^3.10.0", + "serialize-error": "^2.1.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -12115,7 +11695,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -12126,8 +11706,8 @@ "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", "dev": true, "requires": { - "methods": "1.1.2", - "superagent": "3.8.3" + "methods": "~1.1.2", + "superagent": "^3.0.0" } }, "supports-color": { @@ -12136,7 +11716,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" }, "dependencies": { "has-flag": { @@ -12159,12 +11739,12 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "chalk": "2.4.1", - "lodash": "4.17.10", + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ansi-regex": { @@ -12185,8 +11765,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -12195,7 +11775,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -12212,7 +11792,7 @@ "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { - "execa": "0.7.0" + "execa": "^0.7.0" } }, "text-encoding": { @@ -12238,8 +11818,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.6", - "xtend": "4.0.1" + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" } }, "time-zone": { @@ -12260,7 +11840,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.2" } }, "to-fast-properties": { @@ -12274,7 +11854,7 @@ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -12282,7 +11862,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -12292,10 +11872,10 @@ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -12303,8 +11883,8 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, "tough-cookie": { @@ -12312,7 +11892,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "traverse": { @@ -12343,7 +11923,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -12358,7 +11938,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "type-detect": { @@ -12385,9 +11965,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "camelcase": { @@ -12404,8 +11984,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" } }, @@ -12430,9 +12010,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -12479,10 +12059,10 @@ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -12490,7 +12070,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -12498,10 +12078,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -12512,7 +12092,7 @@ "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { - "crypto-random-string": "1.0.0" + "crypto-random-string": "^1.0.0" } }, "unique-temp-dir": { @@ -12521,8 +12101,8 @@ "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", "dev": true, "requires": { - "mkdirp": "0.5.1", - "os-tmpdir": "1.0.2", + "mkdirp": "^0.5.1", + "os-tmpdir": "^1.0.1", "uid2": "0.0.3" } }, @@ -12531,15 +12111,15 @@ "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", "requires": { - "array-filter": "1.0.0", + "array-filter": "^1.0.0", "indexof": "0.0.1", - "object-keys": "1.0.11" + "object-keys": "^1.0.0" } }, "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, "unset-value": { @@ -12547,8 +12127,8 @@ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -12556,9 +12136,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -12590,16 +12170,16 @@ "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { - "boxen": "1.3.0", - "chalk": "2.4.1", - "configstore": "3.1.2", - "import-lazy": "2.1.0", - "is-ci": "1.1.0", - "is-installed-globally": "0.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "urix": { @@ -12613,7 +12193,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "1.0.4" + "prepend-http": "^1.0.1" } }, "url-to-options": { @@ -12633,7 +12213,7 @@ "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" } }, "util-deprecate": { @@ -12652,8 +12232,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "verror": { @@ -12661,9 +12241,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" } }, "well-known-symbols": { @@ -12673,12 +12253,12 @@ "dev": true }, "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -12693,7 +12273,7 @@ "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ansi-regex": { @@ -12714,8 +12294,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -12724,7 +12304,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -12745,8 +12325,8 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" } }, "wrappy": { @@ -12760,7 +12340,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "write-file-atomic": { @@ -12769,9 +12349,9 @@ "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" } }, "write-json-file": { @@ -12780,12 +12360,12 @@ "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", "dev": true, "requires": { - "detect-indent": "5.0.0", - "graceful-fs": "4.1.11", - "make-dir": "1.3.0", - "pify": "3.0.0", - "sort-keys": "2.0.0", - "write-file-atomic": "2.3.0" + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.0.0" }, "dependencies": { "detect-indent": { @@ -12797,13 +12377,13 @@ } }, "write-pkg": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.1.0.tgz", - "integrity": "sha1-AwqZlMyZk9JbTnWp8aGSNgcpHOk=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", + "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", "dev": true, "requires": { - "sort-keys": "2.0.0", - "write-json-file": "2.3.0" + "sort-keys": "^2.0.0", + "write-json-file": "^2.2.0" } }, "xdg-basedir": { @@ -12838,13 +12418,13 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", "requires": { - "camelcase": "2.1.1", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "os-locale": "1.4.0", - "string-width": "1.0.2", - "window-size": "0.1.4", - "y18n": "3.2.1" + "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" } }, "yargs-parser": { @@ -12853,7 +12433,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index a81c48171e6..a3d887da89a 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -61,23 +61,23 @@ }, "dependencies": { "google-gax": "^0.16.0", - "lodash.merge": "^4.6.0" + "lodash.merge": "^4.6.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.2.3", - "async": "^2.5.0", - "codecov": "^3.0.0", - "eslint": "^4.8.0", - "eslint-config-prettier": "^2.6.0", - "eslint-plugin-node": "^6.0.0", - "eslint-plugin-prettier": "^2.3.1", + "@google-cloud/nodejs-repo-tools": "^2.3.0", + "async": "^2.6.1", + "codecov": "^3.0.2", + "eslint": "^4.19.1", + "eslint-config-prettier": "^2.9.0", + "eslint-plugin-node": "^6.0.1", + "eslint-plugin-prettier": "^2.6.0", "extend": "^3.0.1", - "ink-docstrap": "^1.3.0", + "ink-docstrap": "^1.3.2", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^5.0.0", + "mocha": "^5.2.0", "nyc": "^12.0.2", - "power-assert": "^1.4.4", - "prettier": "^1.7.4" + "power-assert": "^1.6.0", + "prettier": "^1.13.5" } } diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 872923e346f..ca60f635ed6 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -20,14 +20,14 @@ }, "dependencies": { "@google-cloud/language": "1.2.0", - "@google-cloud/storage": "1.4.0", - "yargs": "10.0.3" + "@google-cloud/storage": "1.7.0", + "yargs": "11.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.2.3", - "ava": "0.23.0", - "proxyquire": "1.8.0", - "sinon": "4.0.2", - "uuid": "3.1.0" + "@google-cloud/nodejs-repo-tools": "2.3.0", + "ava": "0.25.0", + "proxyquire": "2.0.1", + "sinon": "6.0.0", + "uuid": "3.2.1" } } From 6d6cc95ee3f2c4e2b130a7aaf0a3cdf710a980e6 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 23 Jun 2018 14:56:05 -0700 Subject: [PATCH 136/488] chore(package): update eslint to version 5.0.0 (#59) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index a3d887da89a..9dc8e384721 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -67,7 +67,7 @@ "@google-cloud/nodejs-repo-tools": "^2.3.0", "async": "^2.6.1", "codecov": "^3.0.2", - "eslint": "^4.19.1", + "eslint": "^5.0.0", "eslint-config-prettier": "^2.9.0", "eslint-plugin-node": "^6.0.1", "eslint-plugin-prettier": "^2.6.0", From 4077f40575533e45c3d38e957d0cd6a6bb7be74d Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 25 Jun 2018 07:06:07 -0700 Subject: [PATCH 137/488] fix: update linking for samples (#60) --- packages/google-cloud-language/.circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 8053f1e2c36..c2e7e22befb 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -137,9 +137,8 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm link ../ npm install - cd .. + npm link ../ - run: name: Run linting. command: npm run lint From 3cd04d8968bfeb741daf358ab22371512723e6b4 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 25 Jun 2018 22:50:15 -0700 Subject: [PATCH 138/488] refactor: drop repo-tool as an exec wrapper (#62) --- packages/google-cloud-language/.circleci/config.yml | 7 +------ packages/google-cloud-language/package.json | 12 ++++++------ packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index c2e7e22befb..6158081695d 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -97,12 +97,7 @@ jobs: fi - run: &npm_install_and_link name: Install and link the module. - command: | - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi + command: npm install - run: name: Run unit tests. command: npm test diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 9dc8e384721..c8c6426fa54 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -50,14 +50,14 @@ ], "scripts": { "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", - "docs": "repo-tools exec -- jsdoc -c .jsdoc.js", + "docs": "jsdoc -c .jsdoc.js", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", - "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/", - "prettier": "repo-tools exec -- prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", + "lint": "eslint src/ samples/ system-test/ test/", + "prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", "samples-test": "cd samples/ && npm test && cd ../", - "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --timeout 600000", - "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", - "test": "repo-tools test run --cmd npm -- run cover" + "system-test": "mocha system-test/*.js --timeout 600000", + "test-no-cover": "mocha test/*.js --no-timeouts", + "test": "npm run cover" }, "dependencies": { "google-gax": "^0.16.0", diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index ca60f635ed6..896ba636117 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -16,7 +16,7 @@ "scripts": { "ava": "ava -T 20s --verbose test/*.test.js ./system-test/*.test.js", "cover": "nyc --reporter=lcov --cache ava -T 20s --verbose test/*.test.js ./system-test/*.test.js && nyc report", - "test": "repo-tools test run --cmd npm -- run cover" + "test": "npm run cover" }, "dependencies": { "@google-cloud/language": "1.2.0", From 7af08b40245ad693ae2e9f2b5e3f129bf1d9e1d4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 27 Jun 2018 17:53:06 -0700 Subject: [PATCH 139/488] chore(deps): update dependency sinon to v6.0.1 (#65) --- .../google-cloud-language/samples/package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 896ba636117..a32d74b1d76 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -19,15 +19,15 @@ "test": "npm run cover" }, "dependencies": { - "@google-cloud/language": "1.2.0", - "@google-cloud/storage": "1.7.0", - "yargs": "11.0.0" + "@google-cloud/language": "^1.2.0", + "@google-cloud/storage": "^1.7.0", + "yargs": "^11.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.3.0", - "ava": "0.25.0", - "proxyquire": "2.0.1", - "sinon": "6.0.0", - "uuid": "3.2.1" + "@google-cloud/nodejs-repo-tools": "^2.3.0", + "ava": "^0.25.0", + "proxyquire": "^2.0.1", + "sinon": "^6.0.1", + "uuid": "^3.2.1" } } From cf0d1aa428bb8aade595df5961e5aee3b6f7e522 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Wed, 27 Jun 2018 19:26:55 -0700 Subject: [PATCH 140/488] update google-gax and add synth.py (#64) * update google-gax and add synth.py * don't exclude version specific indexes --- .../google-cloud-language/package-lock.json | 634 +++++++++++------- packages/google-cloud-language/package.json | 2 +- .../smoke-test/language_service_smoke_test.js | 39 ++ .../cloud/language/v1/doc_language_service.js | 4 +- .../google-cloud-language/src/v1/index.js | 4 +- .../src/v1/language_service_client.js | 12 +- .../language/v1beta2/doc_language_service.js | 4 +- .../src/v1beta2/index.js | 4 +- .../src/v1beta2/language_service_client.js | 66 +- packages/google-cloud-language/synth.py | 25 + .../google-cloud-language/test/gapic-v1.js | 4 +- .../test/gapic-v1beta2.js | 64 +- 12 files changed, 563 insertions(+), 299 deletions(-) create mode 100644 packages/google-cloud-language/smoke-test/language_service_smoke_test.js create mode 100644 packages/google-cloud-language/synth.py diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index f3cbfe3b1ca..e339e600b46 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -72,21 +72,21 @@ } }, "@babel/code-frame": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz", - "integrity": "sha1-vs2AVIJzREDJ0TfkbXc0DmTX9Rs=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", + "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", "dev": true, "requires": { - "@babel/highlight": "7.0.0-beta.49" + "@babel/highlight": "7.0.0-beta.51" } }, "@babel/generator": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.49.tgz", - "integrity": "sha1-6c/9qROZaszseTu8JauRvBnQv3o=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz", + "integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=", "dev": true, "requires": { - "@babel/types": "7.0.0-beta.49", + "@babel/types": "7.0.0-beta.51", "jsesc": "^2.5.1", "lodash": "^4.17.5", "source-map": "^0.5.0", @@ -102,38 +102,38 @@ } }, "@babel/helper-function-name": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.49.tgz", - "integrity": "sha1-olwRGbnwNSeGcBJuAiXAMEHI3jI=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz", + "integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=", "dev": true, "requires": { - "@babel/helper-get-function-arity": "7.0.0-beta.49", - "@babel/template": "7.0.0-beta.49", - "@babel/types": "7.0.0-beta.49" + "@babel/helper-get-function-arity": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51" } }, "@babel/helper-get-function-arity": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.49.tgz", - "integrity": "sha1-z1Aj8y0q2S0Ic3STnOwJUby1FEE=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz", + "integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=", "dev": true, "requires": { - "@babel/types": "7.0.0-beta.49" + "@babel/types": "7.0.0-beta.51" } }, "@babel/helper-split-export-declaration": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.49.tgz", - "integrity": "sha1-QNeO2glo0BGxxShm5XRs+yPldUg=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz", + "integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=", "dev": true, "requires": { - "@babel/types": "7.0.0-beta.49" + "@babel/types": "7.0.0-beta.51" } }, "@babel/highlight": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.49.tgz", - "integrity": "sha1-lr3GtD4TSCASumaRsQGEktOWIsw=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", + "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", "dev": true, "requires": { "chalk": "^2.0.0", @@ -142,35 +142,35 @@ } }, "@babel/parser": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.49.tgz", - "integrity": "sha1-lE0MW6KBK7FZ7b0iZ0Ov0mUXm9w=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz", + "integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=", "dev": true }, "@babel/template": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.49.tgz", - "integrity": "sha1-44q+ghfLl5P0YaUwbXrXRdg+HSc=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz", + "integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=", "dev": true, "requires": { - "@babel/code-frame": "7.0.0-beta.49", - "@babel/parser": "7.0.0-beta.49", - "@babel/types": "7.0.0-beta.49", + "@babel/code-frame": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", "lodash": "^4.17.5" } }, "@babel/traverse": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.49.tgz", - "integrity": "sha1-TypzaCoYM07WYl0QCo0nMZ98LWg=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz", + "integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=", "dev": true, "requires": { - "@babel/code-frame": "7.0.0-beta.49", - "@babel/generator": "7.0.0-beta.49", - "@babel/helper-function-name": "7.0.0-beta.49", - "@babel/helper-split-export-declaration": "7.0.0-beta.49", - "@babel/parser": "7.0.0-beta.49", - "@babel/types": "7.0.0-beta.49", + "@babel/code-frame": "7.0.0-beta.51", + "@babel/generator": "7.0.0-beta.51", + "@babel/helper-function-name": "7.0.0-beta.51", + "@babel/helper-split-export-declaration": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", "debug": "^3.1.0", "globals": "^11.1.0", "invariant": "^2.2.0", @@ -195,9 +195,9 @@ } }, "@babel/types": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.49.tgz", - "integrity": "sha1-t+Oxw/TUz+Eb34yJ8e/V4WF7h6Y=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz", + "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", "dev": true, "requires": { "esutils": "^2.0.2", @@ -2069,26 +2069,19 @@ "integrity": "sha1-8u4fMiipDurRJF+asZIusucdM2s=" }, "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", + "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "^3.0.4" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } + "acorn": "^5.0.3" } }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, "requires": { "co": "^4.6.0", "fast-deep-equal": "^1.0.0", @@ -2097,9 +2090,9 @@ } }, "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", "dev": true }, "align-text": { @@ -2387,12 +2380,14 @@ "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true }, "assign-symbols": { "version": "1.0.0", @@ -2403,6 +2398,7 @@ "version": "2.6.1", "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, "requires": { "lodash": "^4.17.10" } @@ -2416,7 +2412,8 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "atob": { "version": "2.1.1", @@ -2606,12 +2603,14 @@ "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true }, "aws4": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "dev": true }, "axios": { "version": "0.18.0", @@ -3121,6 +3120,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, "optional": true, "requires": { "tweetnacl": "^0.14.3" @@ -3405,7 +3405,8 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true }, "catharsis": { "version": "0.8.9", @@ -3624,7 +3625,8 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true }, "co-with-promise": { "version": "4.6.0", @@ -3699,6 +3701,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -3731,18 +3734,6 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, "concordance": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/concordance/-/concordance-3.0.0.tgz", @@ -3878,6 +3869,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -4034,7 +4026,8 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, "detect-indent": { "version": "4.0.0", @@ -4152,6 +4145,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, "optional": true, "requires": { "jsbn": "~0.1.0" @@ -4221,6 +4215,30 @@ "is-arrayish": "^0.2.1" } }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, "es5-ext": { "version": "0.10.45", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", @@ -4363,57 +4381,82 @@ } }, "eslint": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", - "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.0.1.tgz", + "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", + "cross-spawn": "^6.0.5", "debug": "^3.1.0", "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", + "eslint-scope": "^4.0.0", "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", - "globals": "^11.0.1", + "globals": "^11.5.0", "ignore": "^3.3.3", "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^1.0.1", + "regexpp": "^1.1.0", "require-uncached": "^1.0.3", - "semver": "^5.3.0", + "semver": "^5.5.0", + "string.prototype.matchall": "^2.0.0", "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "4.0.2", - "text-table": "~0.2.0" + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" }, "dependencies": { + "ajv": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", + "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -4423,12 +4466,24 @@ "ms": "2.0.0" } }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, "globals": { "version": "11.7.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -4481,9 +4536,9 @@ } }, "eslint-plugin-prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz", - "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.1.tgz", + "integrity": "sha512-wNZ2z0oVCWnf+3BSI7roS+z4gGu2AwcPKUek+SlLZMZg+X0KbZLsB2knul7fd0K3iuIp402HIYzm4f2+OyfXxA==", "dev": true, "requires": { "fast-diff": "^1.1.1", @@ -4491,9 +4546,9 @@ } }, "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -4580,13 +4635,13 @@ } }, "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", + "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", "dev": true, "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "acorn": "^5.6.0", + "acorn-jsx": "^4.1.1" } }, "esprima": { @@ -4837,12 +4892,14 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true }, "fast-deep-equal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true }, "fast-diff": { "version": "1.1.2", @@ -4866,7 +4923,8 @@ "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -5008,12 +5066,14 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true }, "form-data": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "1.0.6", @@ -5589,6 +5649,12 @@ } } }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "function-name-support": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/function-name-support/-/function-name-support-0.2.0.tgz", @@ -5644,6 +5710,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -5764,31 +5831,21 @@ "retry-axios": "^0.3.2" } }, - "google-auto-auth": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz", - "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==", - "requires": { - "async": "^2.3.0", - "gcp-metadata": "^0.6.1", - "google-auth-library": "^1.3.1", - "request": "^2.79.0" - } - }, "google-gax": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.16.1.tgz", - "integrity": "sha512-eP7UUkKvaHmmvCrr+rxzkIOeEKOnXmoib7/AkENDAuqlC9T2+lWlzwpthDRnitQcV8SblDMzsk73YPMPCDwPyQ==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.17.1.tgz", + "integrity": "sha512-fAKvFx++SRr6bGWamWuVOkJzJnQqMgpJkhaB2oEwfFJ91rbFgEmIPRmZZ/MeIVVFUOuHUVyZ8nwjm5peyTZJ6g==", "requires": { - "duplexify": "^3.5.4", - "extend": "^3.0.0", - "globby": "^8.0.0", - "google-auto-auth": "^0.10.0", - "google-proto-files": "^0.15.0", - "grpc": "^1.10.0", - "is-stream-ended": "^0.1.0", - "lodash": "^4.17.2", - "protobufjs": "^6.8.0", + "duplexify": "^3.6.0", + "extend": "^3.0.1", + "globby": "^8.0.1", + "google-auth-library": "^1.6.1", + "google-proto-files": "^0.16.0", + "grpc": "^1.12.2", + "is-stream-ended": "^0.1.4", + "lodash": "^4.17.10", + "protobufjs": "^6.8.6", + "retry-request": "^4.0.0", "through2": "^2.0.3" } }, @@ -5802,28 +5859,13 @@ } }, "google-proto-files": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.15.1.tgz", - "integrity": "sha512-ebtmWgi/ooR5Nl63qRVZZ6VLM6JOb5zTNxTT/ZAU8yfMOdcauoOZNNMOVg0pCmTjqWXeuuVbgPP0CwO5UHHzBQ==", + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.1.tgz", + "integrity": "sha512-ykdhaYDiU/jlyrkzZDPemraKwVIgLT31XMHVNSJW//R9VED56hqSDRMx1Jlxbf0O4iDZnBWQ0JQLHbM2r5+wuA==", "requires": { - "globby": "^7.1.1", + "globby": "^8.0.0", "power-assert": "^1.4.4", "protobufjs": "^6.8.0" - }, - "dependencies": { - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - } } }, "got": { @@ -6351,17 +6393,28 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true }, "har-validator": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, "requires": { "ajv": "^5.1.0", "har-schema": "^2.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -6389,6 +6442,12 @@ "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", "dev": true }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, "has-to-string-tag-x": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", @@ -6450,9 +6509,9 @@ } }, "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", + "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", "dev": true }, "htmlparser2": { @@ -6479,6 +6538,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -6591,22 +6651,21 @@ } }, "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", "chalk": "^2.0.0", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^2.0.4", + "external-editor": "^2.1.0", "figures": "^2.0.0", "lodash": "^4.3.0", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", + "rxjs": "^5.5.2", "string-width": "^2.1.0", "strip-ansi": "^4.0.0", "through": "^2.3.6" @@ -6731,6 +6790,12 @@ "builtin-modules": "^1.0.0" } }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "dev": true + }, "is-ci": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", @@ -6758,6 +6823,12 @@ } } }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -6892,21 +6963,6 @@ "symbol-observable": "^1.1.0" } }, - "is-odd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" - } - } - }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", @@ -6969,6 +7025,15 @@ "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", "dev": true }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", @@ -6992,10 +7057,17 @@ "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "is-url": { "version": "1.2.4", @@ -7033,7 +7105,8 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true }, "istanbul-lib-coverage": { "version": "2.0.0", @@ -7042,16 +7115,16 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.2.0.tgz", - "integrity": "sha512-ozQGtlIw+/a/F3n6QwWiuuyRAPp64+g2GVsKYsIez0sgIEzkU5ZpL2uZ5pmAzbEJ82anlRaPlOQZzkRXspgJyg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.0.tgz", + "integrity": "sha512-Ie1LGWJVCFDDJKKH4g1ffpFcZTEXEd6ay5l9fE8539y4qPErJnzo4psnGzDH92tcKvdUDdbxrKySYIbt6zB9hw==", "dev": true, "requires": { - "@babel/generator": "7.0.0-beta.49", - "@babel/parser": "7.0.0-beta.49", - "@babel/template": "7.0.0-beta.49", - "@babel/traverse": "7.0.0-beta.49", - "@babel/types": "7.0.0-beta.49", + "@babel/generator": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/traverse": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", "istanbul-lib-coverage": "^2.0.0", "semver": "^5.5.0" } @@ -7107,6 +7180,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, "optional": true }, "jsdoc": { @@ -7158,12 +7232,14 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true }, "json-schema-traverse": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -7174,7 +7250,8 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true }, "json5": { "version": "0.5.1", @@ -7195,6 +7272,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -7702,12 +7780,14 @@ "mime-db": { "version": "1.33.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true }, "mime-types": { "version": "2.1.18", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, "requires": { "mime-db": "~1.33.0" } @@ -7857,16 +7937,15 @@ "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" }, "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", "is-windows": "^1.0.2", "kind-of": "^6.0.2", "object.pick": "^1.3.0", @@ -7887,6 +7966,12 @@ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, + "nice-try": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "dev": true + }, "nise": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", @@ -10015,7 +10100,8 @@ "oauth-sign": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true }, "object-assign": { "version": "4.1.1", @@ -10398,7 +10484,8 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true }, "pify": { "version": "3.0.0", @@ -10630,9 +10717,9 @@ "dev": true }, "prettier": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.5.tgz", - "integrity": "sha512-4M90mfvLz6yRf2Dhzd+xPIE6b4xkI8nHMJhsSm9IlfG17g6wujrrm7+H1X8x52tC4cSNm6HmuhCUSNe6Hd5wfw==", + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.6.tgz", + "integrity": "sha512-p5eqCNiohWZN++7aJXUVj0JgLqHCPLf9GLIcLBHGNWs4Y9FJOPs6+KNO2WT0udJIQJTbeZFrJkjzjcb8fkAYYQ==", "dev": true }, "pretty-ms": { @@ -10708,12 +10795,14 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true }, "query-string": { "version": "5.1.1", @@ -10880,6 +10969,15 @@ "safe-regex": "^1.1.0" } }, + "regexp.prototype.flags": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", + "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2" + } + }, "regexpp": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", @@ -10969,6 +11067,7 @@ "version": "2.87.0", "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.6.0", @@ -11100,6 +11199,14 @@ "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-0.3.2.tgz", "integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ==" }, + "retry-request": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", + "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", + "requires": { + "through2": "^2.0.0" + } + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -11128,19 +11235,21 @@ "is-promise": "^2.1.0" } }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "rxjs": { + "version": "5.5.11", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", + "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", "dev": true, "requires": { - "rx-lite": "*" + "symbol-observable": "1.0.1" + }, + "dependencies": { + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + } } }, "safe-buffer": { @@ -11159,7 +11268,8 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "samsam": { "version": "1.3.0", @@ -11509,6 +11619,7 @@ "version": "1.14.2", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -11573,6 +11684,19 @@ "strip-ansi": "^3.0.0" } }, + "string.prototype.matchall": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", + "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.10.0", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "regexp.prototype.flags": "^1.2.0" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -11734,31 +11858,55 @@ "dev": true }, "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", + "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", "chalk": "^2.1.0", "lodash": "^4.17.4", "slice-ansi": "1.0.0", "string-width": "^2.1.1" }, "dependencies": { + "ajv": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", + "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -11891,6 +12039,7 @@ "version": "2.3.4", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, "requires": { "punycode": "^1.4.1" } @@ -11922,6 +12071,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -11930,6 +12080,7 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, "optional": true }, "type-check": { @@ -11952,12 +12103,6 @@ "resolved": "https://registry.npmjs.org/type-name/-/type-name-2.0.2.tgz", "integrity": "sha1-7+fUEj2KxSr/9/QMfk3sUmYAj7Q=" }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, "uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", @@ -12182,6 +12327,23 @@ "xdg-basedir": "^3.0.0" } }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -12222,9 +12384,10 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.0.tgz", + "integrity": "sha512-ijO9N2xY/YaOqQ5yz5c4sy2ZjWmA6AR6zASb/gdpeKZ8+948CxwfMW9RrKVk5may6ev8c0/Xguu32e2Llelpqw==", + "dev": true }, "validate-npm-package-license": { "version": "3.0.3", @@ -12240,6 +12403,7 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index c8c6426fa54..7ca635b6a23 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -60,7 +60,7 @@ "test": "npm run cover" }, "dependencies": { - "google-gax": "^0.16.0", + "google-gax": "^0.17.1", "lodash.merge": "^4.6.1" }, "devDependencies": { diff --git a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js new file mode 100644 index 00000000000..05e15414054 --- /dev/null +++ b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js @@ -0,0 +1,39 @@ +// Copyright 2018 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +describe('LanguageServiceSmokeTest', () => { + it('successfully makes a call to the service', done => { + const language = require('../src'); + + var client = new language.v1beta2.LanguageServiceClient({ + // optional auth parameters. + }); + + var content = 'Hello, world!'; + var type = 'PLAIN_TEXT'; + var document = { + content: content, + type: type, + }; + client.analyzeSentiment({document: document}) + .then(responses => { + var response = responses[0]; + console.log(response); + }) + .then(done) + .catch(done); + }); +}); diff --git a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js index eec9ea7fc9d..73083cf8650 100644 --- a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-language/src/v1/index.js b/packages/google-cloud-language/src/v1/index.js index 4921903da71..d46e29acca5 100644 --- a/packages/google-cloud-language/src/v1/index.js +++ b/packages/google-cloud-language/src/v1/index.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index bf9568229a6..a3b010d3edb 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -38,10 +38,10 @@ class LanguageServiceClient { * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] * @param {string} [options.email] - Account email address. Required when - * usaing a .pem or .p12 keyFilename. + * using a .pem or .p12 keyFilename. * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option above is not necessary. + * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number} [options.port] - The port on which to connect to * the remote host. @@ -72,14 +72,14 @@ class LanguageServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = gax.grpc(opts); + var gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js index 944c2cbc2c1..febb701a45d 100644 --- a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js +++ b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-language/src/v1beta2/index.js b/packages/google-cloud-language/src/v1beta2/index.js index 4921903da71..d46e29acca5 100644 --- a/packages/google-cloud-language/src/v1beta2/index.js +++ b/packages/google-cloud-language/src/v1beta2/index.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 5aa12bd05f5..fbefebacb28 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -32,28 +32,28 @@ class LanguageServiceClient { /** * Construct an instance of LanguageServiceClient. * - * @param {object=} options - The configuration object. See the subsequent + * @param {object} [options] - The configuration object. See the subsequent * parameters for more details. - * @param {object=} options.credentials - Credentials object. - * @param {string=} options.credentials.client_email - * @param {string=} options.credentials.private_key - * @param {string=} options.email - Account email address. Required when - * usaing a .pem or .p12 keyFilename. - * @param {string=} options.keyFilename - Full path to the a .json, .pem, or + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option above is not necessary. + * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number=} options.port - The port on which to connect to + * @param {number} [options.port] - The port on which to connect to * the remote host. - * @param {string=} options.projectId - The project ID from the Google + * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. - * @param {function=} options.promise - Custom promise module to use instead + * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string=} options.servicePath - The domain name of the + * @param {string} [options.servicePath] - The domain name of the * API remote host. */ constructor(opts) { @@ -72,14 +72,14 @@ class LanguageServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = gax.grpc(opts); + var gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, @@ -186,15 +186,15 @@ class LanguageServiceClient { * Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate sentence offsets for the * sentence sentiment. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. @@ -241,14 +241,14 @@ class LanguageServiceClient { * Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. @@ -294,14 +294,14 @@ class LanguageServiceClient { * Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. @@ -352,14 +352,14 @@ class LanguageServiceClient { * Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. @@ -404,10 +404,10 @@ class LanguageServiceClient { * Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. @@ -457,14 +457,14 @@ class LanguageServiceClient { * The enabled features. * * This object should have the same structure as [Features]{@link google.cloud.language.v1beta2.Features} - * @param {number=} request.encodingType + * @param {number} [request.encodingType] * The encoding type used by the API to calculate offsets. * * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object=} options + * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. - * @param {function(?Error, ?Object)=} callback + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py new file mode 100644 index 00000000000..e297fc906d8 --- /dev/null +++ b/packages/google-cloud-language/synth.py @@ -0,0 +1,25 @@ +import synthtool as s +import synthtool.gcp as gcp +import logging +import subprocess + +logging.basicConfig(level=logging.DEBUG) + +gapic = gcp.GAPICGenerator() + +# tasks has two product names, and a poorly named artman yaml +for version in ['v1', 'v1beta2']: + library = gapic.node_library( + 'language', version) + + # skip index, protos, package.json, and README.md + s.copy( + library, + excludes=['package.json', 'README.md', 'src/index.js']) + +# +# Node.js specific cleanup +# +subprocess.run(['npm', 'install']) +subprocess.run(['npm', 'run', 'prettier']) +subprocess.run(['npm', 'run', 'lint']) diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js index 550c0ad5300..2861fd69cb7 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-v1beta2.js index ce078db1b27..adcd537f421 100644 --- a/packages/google-cloud-language/test/gapic-v1beta2.js +++ b/packages/google-cloud-language/test/gapic-v1beta2.js @@ -1,10 +1,10 @@ -// Copyright 2017, Google Inc. All rights reserved. +// Copyright 2018 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -25,7 +25,10 @@ error.code = FAKE_STATUS_CODE; describe('LanguageServiceClient', () => { describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -53,7 +56,10 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSentiment with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -79,7 +85,10 @@ describe('LanguageServiceClient', () => { describe('analyzeEntities', () => { it('invokes analyzeEntities without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -107,7 +116,10 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntities with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -133,7 +145,10 @@ describe('LanguageServiceClient', () => { describe('analyzeEntitySentiment', () => { it('invokes analyzeEntitySentiment without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -161,7 +176,10 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntitySentiment with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -187,7 +205,10 @@ describe('LanguageServiceClient', () => { describe('analyzeSyntax', () => { it('invokes analyzeSyntax without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -215,7 +236,10 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSyntax with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -241,7 +265,10 @@ describe('LanguageServiceClient', () => { describe('classifyText', () => { it('invokes classifyText without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -266,7 +293,10 @@ describe('LanguageServiceClient', () => { }); it('invokes classifyText with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -292,7 +322,10 @@ describe('LanguageServiceClient', () => { describe('annotateText', () => { it('invokes annotateText without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; @@ -322,7 +355,10 @@ describe('LanguageServiceClient', () => { }); it('invokes annotateText with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient(); + var client = new languageModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var document = {}; From c5629969fdf89428a4697c3d97b7cb9b485117bd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 27 Jun 2018 19:27:24 -0700 Subject: [PATCH 141/488] fix(deps): update dependency yargs to v12 (#68) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index a32d74b1d76..f0a936c4e8f 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -21,7 +21,7 @@ "dependencies": { "@google-cloud/language": "^1.2.0", "@google-cloud/storage": "^1.7.0", - "yargs": "^11.0.0" + "yargs": "^12.0.0" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.3.0", From e037ef66ce8996f880e3e7a6f2e6c65fdfaf6e19 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 2 Jul 2018 20:51:24 -0700 Subject: [PATCH 142/488] chore(deps): lock file maintenance (#69) --- .../google-cloud-language/package-lock.json | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index e339e600b46..489b4336499 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -3117,9 +3117,9 @@ } }, "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, "optional": true, "requires": { @@ -4427,9 +4427,9 @@ }, "dependencies": { "ajv": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", - "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -10717,9 +10717,9 @@ "dev": true }, "prettier": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.6.tgz", - "integrity": "sha512-p5eqCNiohWZN++7aJXUVj0JgLqHCPLf9GLIcLBHGNWs4Y9FJOPs6+KNO2WT0udJIQJTbeZFrJkjzjcb8fkAYYQ==", + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz", + "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", "dev": true }, "pretty-ms": { @@ -11872,9 +11872,9 @@ }, "dependencies": { "ajv": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", - "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -12384,9 +12384,9 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.0.tgz", - "integrity": "sha512-ijO9N2xY/YaOqQ5yz5c4sy2ZjWmA6AR6zASb/gdpeKZ8+948CxwfMW9RrKVk5may6ev8c0/Xguu32e2Llelpqw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true }, "validate-npm-package-license": { From 6e36989136e78ca7183ac8760d2fb5863eb6c1bb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 2 Jul 2018 22:53:02 -0700 Subject: [PATCH 143/488] chore(deps): lock file maintenance (#70) --- packages/google-cloud-language/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index 489b4336499..42e7e1fd3fe 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -6791,9 +6791,9 @@ } }, "is-callable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", "dev": true }, "is-ci": { From bab76a1037ac23e0d729f6304598c2947479a8e2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 9 Jul 2018 19:39:00 -0700 Subject: [PATCH 144/488] chore(deps): lock file maintenance (#72) --- .../google-cloud-language/package-lock.json | 91 +++++++++++-------- 1 file changed, 54 insertions(+), 37 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index 42e7e1fd3fe..e3e3aad86d6 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -2054,9 +2054,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.10.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz", - "integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==" + "version": "8.10.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.21.tgz", + "integrity": "sha512-87XkD9qDXm8fIax+5y7drx84cXsu34ZZqfB7Cial3Q/2lxSoJ/+DRaWckkCbxP41wFSIrrb939VhzaNxj4eY1w==" }, "acorn": { "version": "5.7.1", @@ -3652,14 +3652,15 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codecov": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.2.tgz", - "integrity": "sha512-9ljtIROIjPIUmMRqO+XuDITDoV8xRrZmA0jcEq6p2hg2+wY9wGmLfreAZGIL72IzUfdEDZaU8+Vjidg1fBQ8GQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.4.tgz", + "integrity": "sha512-KJyzHdg9B8U9LxXa7hS6jnEW5b1cNckLYc2YpnJ1nEFiOW+/iSzDHp+5MYEIQd9fN3/tC6WmGZmYiwxzkuGp/A==", "dev": true, "requires": { - "argv": "0.0.2", - "request": "^2.81.0", - "urlgrey": "0.4.4" + "argv": "^0.0.2", + "ignore-walk": "^3.0.1", + "request": "^2.87.0", + "urlgrey": "^0.4.4" } }, "collection-visit": { @@ -4381,9 +4382,9 @@ } }, "eslint": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.0.1.tgz", - "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.1.0.tgz", + "integrity": "sha512-DyH6JsoA1KzA5+OSWFjg56DFJT+sDLO0yokaPZ9qY0UEmYrPA1gEX/G1MnVkmRDsksG4H1foIVz2ZXXM3hHYvw==", "dev": true, "requires": { "ajv": "^6.5.0", @@ -4393,6 +4394,7 @@ "debug": "^3.1.0", "doctrine": "^2.1.0", "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", "espree": "^4.0.0", "esquery": "^1.0.1", @@ -4400,7 +4402,7 @@ "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", - "globals": "^11.5.0", + "globals": "^11.7.0", "ignore": "^3.3.3", "imurmurhash": "^0.1.4", "inquirer": "^5.2.0", @@ -4536,9 +4538,9 @@ } }, "eslint-plugin-prettier": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.1.tgz", - "integrity": "sha512-wNZ2z0oVCWnf+3BSI7roS+z4gGu2AwcPKUek+SlLZMZg+X0KbZLsB2knul7fd0K3iuIp402HIYzm4f2+OyfXxA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz", + "integrity": "sha512-tGek5clmW5swrAx1mdPYM8oThrBE83ePh7LeseZHBWfHVGrHPhKn7Y5zgRMbU/9D5Td9K4CEmUPjGxA7iw98Og==", "dev": true, "requires": { "fast-diff": "^1.1.1", @@ -4555,6 +4557,12 @@ "estraverse": "^4.1.1" } }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -5027,9 +5035,9 @@ "dev": true }, "follow-redirects": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", - "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.1.tgz", + "integrity": "sha512-v9GI1hpaqq1ZZR6pBD1+kI7O24PhDvNGNodjS3MdcEqyrahCp8zbtpv+2B/krUnSmUH80lbAS7MrdeK5IylgKg==", "requires": { "debug": "^3.1.0" }, @@ -5923,9 +5931,9 @@ "dev": true }, "grpc": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.4.tgz", - "integrity": "sha512-t0Hy4yoHHYLkK0b+ULTHw5ZuSFmWokCABY0C4bKQbE4jnm1hpjA23cQVD0xAqDcRHN5CkvFzlqb34ngV22dqoQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.13.0.tgz", + "integrity": "sha512-jGxWFYzttSz9pi8mu283jZvo2zIluWonQ918GMHKx8grT57GIVlvx7/82fo7AGS75lbkPoO1T6PZLvCRD9Pbtw==", "requires": { "lodash": "^4.17.5", "nan": "^2.0.0", @@ -6139,7 +6147,7 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.2", "bundled": true, "requires": { "detect-libc": "^1.0.2", @@ -6148,7 +6156,7 @@ "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" @@ -6509,9 +6517,9 @@ } }, "hosted-git-info": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", - "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, "htmlparser2": { @@ -6587,6 +6595,15 @@ "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", "dev": true }, + "ignore-walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, "import-lazy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", @@ -7109,15 +7126,15 @@ "dev": true }, "istanbul-lib-coverage": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.0.tgz", - "integrity": "sha512-yMSw5xLIbdaxiVXHk3amfNM2WeBxLrwH/BCyZ9HvA/fylwziAIJOG2rKqWyLqEJqwKT725vxxqidv+SyynnGAA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", "dev": true }, "istanbul-lib-instrument": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.0.tgz", - "integrity": "sha512-Ie1LGWJVCFDDJKKH4g1ffpFcZTEXEd6ay5l9fE8539y4qPErJnzo4psnGzDH92tcKvdUDdbxrKySYIbt6zB9hw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.1.tgz", + "integrity": "sha512-h9Vg3nfbxrF0PK0kZiNiMAyL8zXaLiBP/BXniaKSwVvAi1TaumYV2b0wPdmy1CRX3irYbYD1p4Wjbv4uyECiiQ==", "dev": true, "requires": { "@babel/generator": "7.0.0-beta.51", @@ -7125,7 +7142,7 @@ "@babel/template": "7.0.0-beta.51", "@babel/traverse": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "istanbul-lib-coverage": "^2.0.0", + "istanbul-lib-coverage": "^2.0.1", "semver": "^5.5.0" } }, @@ -7483,9 +7500,9 @@ "dev": true }, "lolex": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", - "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", + "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", "dev": true }, "long": { From ab9ad324c78da51fa8eb9bd4d9d39577bc9b5571 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 9 Jul 2018 22:12:17 -0700 Subject: [PATCH 145/488] fix: drop support for node.js 4.x and 9.x (#73) --- .../.circleci/config.yml | 37 +++---------------- packages/google-cloud-language/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 8 insertions(+), 33 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 6158081695d..5bd338975b8 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -3,10 +3,6 @@ workflows: version: 2 tests: jobs: &workflow_jobs - - node4: - filters: - tags: - only: /.*/ - node6: filters: tags: @@ -15,30 +11,22 @@ workflows: filters: tags: only: /.*/ - - node9: - filters: - tags: - only: /.*/ - node10: filters: tags: only: /.*/ - lint: requires: - - node4 - node6 - node8 - - node9 - node10 filters: tags: only: /.*/ - docs: requires: - - node4 - node6 - node8 - - node9 - node10 filters: tags: @@ -79,9 +67,9 @@ workflows: only: master jobs: *workflow_jobs jobs: - node4: + node6: docker: - - image: 'node:4' + - image: 'node:6' steps: &unit_tests_steps - checkout - run: &remove_package_lock @@ -98,17 +86,8 @@ jobs: - run: &npm_install_and_link name: Install and link the module. command: npm install - - run: - name: Run unit tests. - command: npm test - - run: - name: Submit coverage data to codecov. - command: node_modules/.bin/codecov - when: always - node6: - docker: - - image: 'node:6' - steps: *unit_tests_steps + - run: npm test + - run: node_modules/.bin/codecov node8: docker: - image: 'node:8' @@ -199,9 +178,5 @@ jobs: - image: 'node:8' steps: - checkout - - run: - name: Set NPM authentication. - command: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - - run: - name: Publish the module to npm. - command: npm publish + - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' + - run: npm publish diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 7ca635b6a23..428d2984315 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc", "engines": { - "node": ">=4.0.0" + "node": ">=6.0.0" }, "repository": "googleapis/nodejs-language", "main": "src/index.js", diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index f0a936c4e8f..9a032a981c2 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google Inc.", "engines": { - "node": ">=4.0.0" + "node": ">=6.0.0" }, "repository": "googleapis/nodejs-language", "private": true, From c9ce2d8540829eb3d96c9dfd253d8b4443340805 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 10 Jul 2018 08:06:44 -0700 Subject: [PATCH 146/488] chore(deps): lock file maintenance (#74) --- packages/google-cloud-language/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index e3e3aad86d6..c203086e497 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -4659,9 +4659,9 @@ "dev": true }, "espurify": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.0.tgz", - "integrity": "sha512-jdkJG9jswjKCCDmEridNUuIQei9algr+o66ZZ19610ZoBsiWLRsQGNYS4HGez3Z/DsR0lhANGAqiwBUclPuNag==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.1.tgz", + "integrity": "sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==", "requires": { "core-js": "^2.0.0" } From 392cf84239c7c7ff526631b18649163cdb357198 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 10 Jul 2018 09:40:42 -0700 Subject: [PATCH 147/488] chore(deps): lock file maintenance (#75) --- packages/google-cloud-language/package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index c203086e497..3f00e45d69a 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -7517,12 +7517,12 @@ "dev": true }, "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "^3.0.0 || ^4.0.0" } }, "loud-rejection": { From f0afba2d15b27a4e83a88180481564ea79790f83 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 10 Jul 2018 11:31:41 -0700 Subject: [PATCH 148/488] chore(build): use `npm ci` instead of `npm install` (#76) --- packages/google-cloud-language/synth.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index e297fc906d8..00f34a25133 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -17,9 +17,7 @@ library, excludes=['package.json', 'README.md', 'src/index.js']) -# # Node.js specific cleanup -# -subprocess.run(['npm', 'install']) +subprocess.run(['npm', 'ci']) subprocess.run(['npm', 'run', 'prettier']) subprocess.run(['npm', 'run', 'lint']) From 1fcccd05da6352f0c27f7b5e0fefab39209cd27a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 16 Jul 2018 19:09:44 -0700 Subject: [PATCH 149/488] chore(deps): lock file maintenance (#79) --- .../google-cloud-language/package-lock.json | 1308 +++++++++++++---- 1 file changed, 1005 insertions(+), 303 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index 3f00e45d69a..73d48a1d8e0 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -223,25 +223,25 @@ } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.0.tgz", - "integrity": "sha512-c8dIGESnNkmM88duFxGHvMQP5QKPgp/sfJq0QhC6+gOcJC7/PKjqd0PkmgPPeIgVl6SXy5Zf/KLbxnJUVgNT1Q==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.1.tgz", + "integrity": "sha512-yIOn92sjHwpF/eORQWjv7QzQPcESSRCsZshdmeX40RGRlB0+HPODRDghZq0GiCqe6zpIYZvKmiKiYd3u52P/7Q==", "dev": true, "requires": { "ava": "0.25.0", "colors": "1.1.2", "fs-extra": "5.0.0", - "got": "8.2.0", + "got": "8.3.0", "handlebars": "4.0.11", "lodash": "4.17.5", - "nyc": "11.4.1", + "nyc": "11.7.2", "proxyquire": "1.8.0", "semver": "^5.5.0", - "sinon": "4.3.0", + "sinon": "6.0.1", "string": "3.3.3", - "supertest": "3.0.0", + "supertest": "3.1.0", "yargs": "11.0.0", - "yargs-parser": "9.0.2" + "yargs-parser": "10.1.0" }, "dependencies": { "ansi-regex": { @@ -250,6 +250,12 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -274,37 +280,37 @@ "dev": true }, "nyc": { - "version": "11.4.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", - "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", + "version": "11.7.2", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.7.2.tgz", + "integrity": "sha512-gBt7qwsR1vryYfglVjQRx1D+AtMZW5NbUKxb+lZe8SN8KsheGCPGWEsSC9AGQG+r2+te1+10uPHUCahuqm1nGQ==", "dev": true, "requires": { "archy": "^1.0.0", "arrify": "^1.0.1", "caching-transform": "^1.0.0", - "convert-source-map": "^1.3.0", + "convert-source-map": "^1.5.1", "debug-log": "^1.0.1", "default-require-extensions": "^1.0.0", "find-cache-dir": "^0.1.1", "find-up": "^2.1.0", "foreground-child": "^1.5.3", "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-coverage": "^1.1.2", "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^1.9.1", - "istanbul-lib-report": "^1.1.2", - "istanbul-lib-source-maps": "^1.2.2", - "istanbul-reports": "^1.1.3", + "istanbul-lib-instrument": "^1.10.0", + "istanbul-lib-report": "^1.1.3", + "istanbul-lib-source-maps": "^1.2.3", + "istanbul-reports": "^1.4.0", "md5-hex": "^1.2.0", - "merge-source-map": "^1.0.2", - "micromatch": "^2.3.11", + "merge-source-map": "^1.1.0", + "micromatch": "^3.1.10", "mkdirp": "^0.5.0", "resolve-from": "^2.0.0", - "rimraf": "^2.5.4", + "rimraf": "^2.6.2", "signal-exit": "^3.0.1", "spawn-wrap": "^1.4.2", - "test-exclude": "^4.1.1", - "yargs": "^10.0.3", + "test-exclude": "^4.2.0", + "yargs": "11.1.0", "yargs-parser": "^8.0.0" }, "dependencies": { @@ -347,20 +353,22 @@ "dev": true }, "arr-diff": { - "version": "2.0.0", + "version": "4.0.0", "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } + "dev": true }, "arr-flatten": { "version": "1.1.0", "bundled": true, "dev": true }, + "arr-union": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, "array-unique": { - "version": "0.2.1", + "version": "0.3.2", "bundled": true, "dev": true }, @@ -369,11 +377,21 @@ "bundled": true, "dev": true }, + "assign-symbols": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, "async": { "version": "1.5.2", "bundled": true, "dev": true }, + "atob": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, "babel-code-frame": { "version": "6.26.0", "bundled": true, @@ -385,7 +403,7 @@ } }, "babel-generator": { - "version": "6.26.0", + "version": "6.26.1", "bundled": true, "dev": true, "requires": { @@ -395,7 +413,7 @@ "detect-indent": "^4.0.0", "jsesc": "^1.3.0", "lodash": "^4.17.4", - "source-map": "^0.5.6", + "source-map": "^0.5.7", "trim-right": "^1.0.1" } }, @@ -465,8 +483,63 @@ "bundled": true, "dev": true }, + "base": { + "version": "0.11.2", + "bundled": true, + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "brace-expansion": { - "version": "1.1.8", + "version": "1.1.11", "bundled": true, "dev": true, "requires": { @@ -475,13 +548,30 @@ } }, "braces": { - "version": "1.8.5", + "version": "2.3.2", "bundled": true, "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "builtin-modules": { @@ -489,6 +579,22 @@ "bundled": true, "dev": true }, + "cache-base": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, "caching-transform": { "version": "1.0.1", "bundled": true, @@ -527,6 +633,27 @@ "supports-color": "^2.0.0" } }, + "class-utils": { + "version": "0.3.6", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "cliui": { "version": "2.1.0", "bundled": true, @@ -551,11 +678,25 @@ "bundled": true, "dev": true }, + "collection-visit": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, "commondir": { "version": "1.0.1", "bundled": true, "dev": true }, + "component-emitter": { + "version": "1.2.1", + "bundled": true, + "dev": true + }, "concat-map": { "version": "0.0.1", "bundled": true, @@ -566,8 +707,13 @@ "bundled": true, "dev": true }, + "copy-descriptor": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, "core-js": { - "version": "2.5.3", + "version": "2.5.6", "bundled": true, "dev": true }, @@ -598,6 +744,11 @@ "bundled": true, "dev": true }, + "decode-uri-component": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, "default-require-extensions": { "version": "1.0.0", "bundled": true, @@ -606,6 +757,48 @@ "strip-bom": "^2.0.0" } }, + "define-property": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "detect-indent": { "version": "4.0.0", "bundled": true, @@ -659,44 +852,139 @@ } }, "expand-brackets": { - "version": "0.1.5", + "version": "2.1.4", "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, - "expand-range": { - "version": "1.8.2", + "extend-shallow": { + "version": "3.0.2", "bundled": true, "dev": true, "requires": { - "fill-range": "^2.1.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } } }, "extglob": { - "version": "0.3.2", + "version": "2.0.4", "bundled": true, "dev": true, "requires": { - "is-extglob": "^1.0.0" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, - "filename-regex": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, "fill-range": { - "version": "2.2.3", + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "find-cache-dir": { @@ -722,21 +1010,21 @@ "bundled": true, "dev": true }, - "for-own": { - "version": "0.1.5", + "foreground-child": { + "version": "1.5.6", "bundled": true, "dev": true, "requires": { - "for-in": "^1.0.1" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" } }, - "foreground-child": { - "version": "1.5.6", + "fragment-cache": { + "version": "0.2.1", "bundled": true, "dev": true, "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" + "map-cache": "^0.2.2" } }, "fs.realpath": { @@ -754,6 +1042,11 @@ "bundled": true, "dev": true }, + "get-value": { + "version": "2.0.6", + "bundled": true, + "dev": true + }, "glob": { "version": "7.1.2", "bundled": true, @@ -767,23 +1060,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-base": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, "globals": { "version": "9.18.0", "bundled": true, @@ -828,8 +1104,37 @@ "bundled": true, "dev": true }, + "has-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "hosted-git-info": { - "version": "2.5.0", + "version": "2.6.0", "bundled": true, "dev": true }, @@ -853,7 +1158,7 @@ "dev": true }, "invariant": { - "version": "2.2.2", + "version": "2.2.4", "bundled": true, "dev": true, "requires": { @@ -865,6 +1170,14 @@ "bundled": true, "dev": true }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, "is-arrayish": { "version": "0.2.1", "bundled": true, @@ -883,17 +1196,29 @@ "builtin-modules": "^1.0.0" } }, - "is-dotfile": { - "version": "1.0.3", + "is-data-descriptor": { + "version": "0.1.4", "bundled": true, - "dev": true + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } }, - "is-equal-shallow": { - "version": "0.1.3", + "is-descriptor": { + "version": "0.1.6", "bundled": true, "dev": true, "requires": { - "is-primitive": "^2.0.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } } }, "is-extendable": { @@ -901,11 +1226,6 @@ "bundled": true, "dev": true }, - "is-extglob": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "is-finite": { "version": "1.0.2", "bundled": true, @@ -915,39 +1235,41 @@ } }, "is-fullwidth-code-point": { - "version": "1.0.0", + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-number": { + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "kind-of": "^3.0.2" } }, - "is-glob": { - "version": "2.0.1", + "is-odd": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "bundled": true, + "dev": true + } } }, - "is-number": { - "version": "2.1.0", + "is-plain-object": { + "version": "2.0.4", "bundled": true, "dev": true, "requires": { - "kind-of": "^3.0.2" + "isobject": "^3.0.1" } }, - "is-posix-bracket": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, "is-stream": { "version": "1.1.0", "bundled": true, @@ -958,6 +1280,11 @@ "bundled": true, "dev": true }, + "is-windows": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, "isarray": { "version": "1.0.0", "bundled": true, @@ -969,15 +1296,12 @@ "dev": true }, "isobject": { - "version": "2.1.0", + "version": "3.0.1", "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } + "dev": true }, "istanbul-lib-coverage": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "dev": true }, @@ -990,7 +1314,7 @@ } }, "istanbul-lib-instrument": { - "version": "1.9.1", + "version": "1.10.1", "bundled": true, "dev": true, "requires": { @@ -999,16 +1323,16 @@ "babel-traverse": "^6.18.0", "babel-types": "^6.18.0", "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-coverage": "^1.2.0", "semver": "^5.3.0" } }, "istanbul-lib-report": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-coverage": "^1.1.2", "mkdirp": "^0.5.1", "path-parse": "^1.0.5", "supports-color": "^3.1.2" @@ -1025,12 +1349,12 @@ } }, "istanbul-lib-source-maps": { - "version": "1.2.2", + "version": "1.2.3", "bundled": true, "dev": true, "requires": { "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-coverage": "^1.1.2", "mkdirp": "^0.5.1", "rimraf": "^2.6.1", "source-map": "^0.5.3" @@ -1047,7 +1371,7 @@ } }, "istanbul-reports": { - "version": "1.1.3", + "version": "1.4.0", "bundled": true, "dev": true, "requires": { @@ -1115,7 +1439,7 @@ } }, "lodash": { - "version": "4.17.4", + "version": "4.17.10", "bundled": true, "dev": true }, @@ -1133,7 +1457,7 @@ } }, "lru-cache": { - "version": "4.1.1", + "version": "4.1.3", "bundled": true, "dev": true, "requires": { @@ -1141,6 +1465,19 @@ "yallist": "^2.1.2" } }, + "map-cache": { + "version": "0.2.2", + "bundled": true, + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, "md5-hex": { "version": "1.3.0", "bundled": true, @@ -1163,35 +1500,49 @@ } }, "merge-source-map": { - "version": "1.0.4", + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } } }, "micromatch": { - "version": "2.3.11", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "version": "3.1.10", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } } }, "mimic-fn": { - "version": "1.1.0", + "version": "1.2.0", "bundled": true, "dev": true }, @@ -1208,6 +1559,25 @@ "bundled": true, "dev": true }, + "mixin-deep": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.1", "bundled": true, @@ -1221,6 +1591,32 @@ "bundled": true, "dev": true }, + "nanomatch": { + "version": "1.2.9", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "normalize-package-data": { "version": "2.4.0", "bundled": true, @@ -1232,14 +1628,6 @@ "validate-npm-package-license": "^3.0.1" } }, - "normalize-path": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, "npm-run-path": { "version": "2.0.2", "bundled": true, @@ -1258,13 +1646,40 @@ "bundled": true, "dev": true }, - "object.omit": { - "version": "2.0.1", + "object-copy": { + "version": "0.1.0", "bundled": true, "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "isobject": "^3.0.1" } }, "once": { @@ -1305,9 +1720,12 @@ "dev": true }, "p-limit": { - "version": "1.1.0", + "version": "1.2.0", "bundled": true, - "dev": true + "dev": true, + "requires": { + "p-try": "^1.0.0" + } }, "p-locate": { "version": "2.0.0", @@ -1317,16 +1735,10 @@ "p-limit": "^1.1.0" } }, - "parse-glob": { - "version": "3.0.4", + "p-try": { + "version": "1.0.0", "bundled": true, - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } + "dev": true }, "parse-json": { "version": "2.2.0", @@ -1336,6 +1748,11 @@ "error-ex": "^1.2.0" } }, + "pascalcase": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, "path-exists": { "version": "2.1.0", "bundled": true, @@ -1406,8 +1823,8 @@ } } }, - "preserve": { - "version": "0.2.0", + "posix-character-classes": { + "version": "0.1.1", "bundled": true, "dev": true }, @@ -1416,43 +1833,6 @@ "bundled": true, "dev": true }, - "randomatic": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "read-pkg": { "version": "1.1.0", "bundled": true, @@ -1488,19 +1868,15 @@ "bundled": true, "dev": true }, - "regex-cache": { - "version": "0.4.4", + "regex-not": { + "version": "1.0.2", "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, - "remove-trailing-separator": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, "repeat-element": { "version": "1.1.2", "bundled": true, @@ -1534,6 +1910,16 @@ "bundled": true, "dev": true }, + "resolve-url": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "ret": { + "version": "0.1.15", + "bundled": true, + "dev": true + }, "right-align": { "version": "0.1.3", "bundled": true, @@ -1551,16 +1937,45 @@ "glob": "^7.0.5" } }, - "semver": { - "version": "5.4.1", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, + "safe-regex": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "set-value": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "shebang-command": { "version": "1.2.0", "bundled": true, @@ -1584,11 +1999,120 @@ "bundled": true, "dev": true }, + "snapdragon": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, "source-map": { "version": "0.5.7", "bundled": true, "dev": true }, + "source-map-resolve": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "atob": "^2.0.0", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "bundled": true, + "dev": true + }, "spawn-wrap": { "version": "1.4.2", "bundled": true, @@ -1603,23 +2127,60 @@ } }, "spdx-correct": { - "version": "1.0.2", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "^1.0.2" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "spdx-expression-parse": { - "version": "1.0.4", + "spdx-exceptions": { + "version": "2.1.0", "bundled": true, "dev": true }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "spdx-license-ids": { - "version": "1.2.2", + "version": "3.0.0", "bundled": true, "dev": true }, + "split-string": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "static-extend": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "string-width": { "version": "2.1.1", "bundled": true, @@ -1634,11 +2195,6 @@ "bundled": true, "dev": true }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, "strip-ansi": { "version": "4.0.0", "bundled": true, @@ -1676,12 +2232,12 @@ "dev": true }, "test-exclude": { - "version": "4.1.1", + "version": "4.2.1", "bundled": true, "dev": true, "requires": { "arrify": "^1.0.1", - "micromatch": "^2.3.11", + "micromatch": "^3.1.8", "object-assign": "^4.1.0", "read-pkg-up": "^1.0.1", "require-main-filename": "^1.0.1" @@ -1692,6 +2248,34 @@ "bundled": true, "dev": true }, + "to-object-path": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, "trim-right": { "version": "1.0.1", "bundled": true, @@ -1728,13 +2312,101 @@ "dev": true, "optional": true }, + "union-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unset-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "bundled": true, + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "bundled": true, + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "bundled": true, + "dev": true + }, + "use": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "validate-npm-package-license": { - "version": "3.0.1", + "version": "3.0.3", "bundled": true, "dev": true, "requires": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "which": { @@ -1770,6 +2442,14 @@ "strip-ansi": "^3.0.1" }, "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, "string-width": { "version": "1.0.2", "bundled": true, @@ -1808,11 +2488,11 @@ "dev": true }, "yargs": { - "version": "10.0.3", + "version": "11.1.0", "bundled": true, "dev": true, "requires": { - "cliui": "^3.2.0", + "cliui": "^4.0.0", "decamelize": "^1.1.1", "find-up": "^2.1.0", "get-caller-file": "^1.0.1", @@ -1823,35 +2503,49 @@ "string-width": "^2.0.0", "which-module": "^2.0.0", "y18n": "^3.2.1", - "yargs-parser": "^8.0.0" + "yargs-parser": "^9.0.2" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, "cliui": { - "version": "3.2.0", + "version": "4.1.0", "bundled": true, "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "yargs-parser": { + "version": "9.0.2", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "^4.1.0" } } } }, "yargs-parser": { - "version": "8.0.0", + "version": "8.1.0", "bundled": true, "dev": true, "requires": { @@ -1915,6 +2609,17 @@ "which-module": "^2.0.0", "y18n": "^3.2.1", "yargs-parser": "^9.0.2" + }, + "dependencies": { + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } } } } @@ -4342,9 +5047,9 @@ "dev": true }, "escodegen": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz", - "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", + "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", "dev": true, "requires": { "esprima": "^3.1.3", @@ -4653,9 +5358,9 @@ } }, "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "espurify": { @@ -5686,9 +6391,9 @@ } }, "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, "get-port": { @@ -5877,9 +6582,9 @@ } }, "got": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/got/-/got-8.2.0.tgz", - "integrity": "sha512-giadqJpXIwjY+ZsuWys8p2yjZGhOHiU4hiJHjS/oeCxw1u8vANQz3zPlrxW2Zw/siCXsSMI3hvzWGcnFyujyAg==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.0.tgz", + "integrity": "sha512-kBNy/S2CGwrYgDSec5KTWGKUvupwkkTVAjIsVFF2shXO13xpZdFP4d4kxa//CLX2tN/rV0aYwK8vY6UKWGn2vQ==", "dev": true, "requires": { "@sindresorhus/is": "^0.7.0", @@ -5892,7 +6597,7 @@ "isurl": "^1.0.0-alpha5", "lowercase-keys": "^1.0.0", "mimic-response": "^1.0.0", - "p-cancelable": "^0.3.0", + "p-cancelable": "^0.4.0", "p-timeout": "^2.0.1", "pify": "^3.0.0", "safe-buffer": "^5.1.1", @@ -7816,9 +8521,9 @@ "dev": true }, "mimic-response": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", - "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true }, "minimatch": { @@ -10295,9 +11000,9 @@ "dev": true }, "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", "dev": true }, "p-finally": { @@ -11388,18 +12093,18 @@ "dev": true }, "sinon": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.3.0.tgz", - "integrity": "sha512-pmf05hFgEZUS52AGJcsVjOjqAyJW2yo14cOwVYvzCyw7+inv06YXkLyW75WG6X6p951lzkoKh51L2sNbR9CDvw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.0.1.tgz", + "integrity": "sha512-rfszhNcfamK2+ofIPi9XqeH89pH7KGDcAtM+F9CsjHXOK3jzWG99vyhyD2V+r7s4IipmWcWUFYq4ftZ9/Eu2Wg==", "dev": true, "requires": { "@sinonjs/formatio": "^2.0.0", - "diff": "^3.1.0", + "diff": "^3.5.0", "lodash.get": "^4.4.2", - "lolex": "^2.2.0", - "nise": "^1.2.0", - "supports-color": "^5.1.0", - "type-detect": "^4.0.5" + "lolex": "^2.4.2", + "nise": "^1.3.3", + "supports-color": "^5.4.0", + "type-detect": "^4.0.8" } }, "slash": { @@ -11777,9 +12482,9 @@ "dev": true }, "superagent": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", - "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", + "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", "dev": true, "requires": { "component-emitter": "^1.2.0", @@ -11787,11 +12492,11 @@ "debug": "^3.1.0", "extend": "^3.0.0", "form-data": "^2.3.1", - "formidable": "^1.2.0", + "formidable": "^1.1.1", "methods": "^1.1.1", "mime": "^1.4.1", "qs": "^6.5.1", - "readable-stream": "^2.3.5" + "readable-stream": "^2.0.5" }, "dependencies": { "debug": { @@ -11842,13 +12547,13 @@ } }, "supertest": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.0.0.tgz", - "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.1.0.tgz", + "integrity": "sha512-O44AMnmJqx294uJQjfUmEyYOg7d9mylNFsMw/Wkz4evKd1njyPrtCN+U6ZIC7sKtfEVQhfTqFFijlXx8KP/Czw==", "dev": true, "requires": { "methods": "~1.1.2", - "superagent": "^3.0.0" + "superagent": "3.8.2" } }, "supports-color": { @@ -12388,12 +13093,9 @@ "dev": true }, "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", - "requires": { - "kind-of": "^6.0.2" - } + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "util-deprecate": { "version": "1.0.2", @@ -12609,9 +13311,9 @@ } }, "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", "dev": true, "requires": { "camelcase": "^4.1.0" From 97f565e0efec2feaffda8dd7ba2f6a7e7d5c1650 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 18 Jul 2018 00:58:24 -0700 Subject: [PATCH 150/488] test: use strictEqual in tests (#81) --- packages/google-cloud-language/test/gapic-v1.js | 12 ++++++------ packages/google-cloud-language/test/gapic-v1beta2.js | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js index 2861fd69cb7..288219560c3 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -76,7 +76,7 @@ describe('LanguageServiceClient', () => { client.analyzeSentiment(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -136,7 +136,7 @@ describe('LanguageServiceClient', () => { client.analyzeEntities(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -196,7 +196,7 @@ describe('LanguageServiceClient', () => { client.analyzeEntitySentiment(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -256,7 +256,7 @@ describe('LanguageServiceClient', () => { client.analyzeSyntax(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -313,7 +313,7 @@ describe('LanguageServiceClient', () => { client.classifyText(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -377,7 +377,7 @@ describe('LanguageServiceClient', () => { client.annotateText(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-v1beta2.js index adcd537f421..5f6a9a51f19 100644 --- a/packages/google-cloud-language/test/gapic-v1beta2.js +++ b/packages/google-cloud-language/test/gapic-v1beta2.js @@ -76,7 +76,7 @@ describe('LanguageServiceClient', () => { client.analyzeSentiment(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -136,7 +136,7 @@ describe('LanguageServiceClient', () => { client.analyzeEntities(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -196,7 +196,7 @@ describe('LanguageServiceClient', () => { client.analyzeEntitySentiment(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -256,7 +256,7 @@ describe('LanguageServiceClient', () => { client.analyzeSyntax(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -313,7 +313,7 @@ describe('LanguageServiceClient', () => { client.classifyText(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); @@ -377,7 +377,7 @@ describe('LanguageServiceClient', () => { client.annotateText(request, (err, response) => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); From 4aa5d12f6d3fb95393b5ff4f9f87beaef3ace788 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 18 Jul 2018 11:19:52 -0700 Subject: [PATCH 151/488] chore(deps): update dependency eslint-plugin-node to v7 (#80) --- .../google-cloud-language/package-lock.json | 79 +++++++++++++++---- packages/google-cloud-language/package.json | 2 +- 2 files changed, 64 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index 73d48a1d8e0..f9a4b4af315 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -318,6 +318,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1446,7 +1447,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -2805,6 +2807,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -2816,6 +2819,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -5219,18 +5223,44 @@ } } }, + "eslint-plugin-es": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz", + "integrity": "sha512-9XcVyZiQRVeFjqHw8qHNDAZcQLqaHlOGGpeYqzYh8S4JYCWTCO3yzyen8yVmA5PratfzTRWDwCOFphtDEG+w/w==", + "dev": true, + "requires": { + "eslint-utils": "^1.3.0", + "regexpp": "^2.0.0" + }, + "dependencies": { + "regexpp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", + "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", + "dev": true + } + } + }, "eslint-plugin-node": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", - "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", + "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", "dev": true, "requires": { - "ignore": "^3.3.6", + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^4.0.2", "minimatch": "^3.0.4", - "resolve": "^1.3.3", - "semver": "^5.4.1" + "resolve": "^1.8.1", + "semver": "^5.5.0" }, "dependencies": { + "ignore": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", + "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", + "dev": true + }, "resolve": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", @@ -5874,12 +5904,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5894,17 +5926,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -6021,7 +6056,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -6033,6 +6069,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6047,6 +6084,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6054,12 +6092,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -6078,6 +6118,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6158,7 +6199,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6170,6 +6212,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6291,6 +6334,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8219,7 +8263,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.4.0", @@ -8805,6 +8850,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9747,7 +9793,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "lru-cache": { "version": "4.1.3", diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 428d2984315..d46643aacdf 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -69,7 +69,7 @@ "codecov": "^3.0.2", "eslint": "^5.0.0", "eslint-config-prettier": "^2.9.0", - "eslint-plugin-node": "^6.0.1", + "eslint-plugin-node": "^7.0.0", "eslint-plugin-prettier": "^2.6.0", "extend": "^3.0.1", "ink-docstrap": "^1.3.2", From 82a69131e4dcc0c8af97e8f829092019a686c44d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 24 Jul 2018 10:04:32 -0700 Subject: [PATCH 152/488] chore(deps): lock file maintenance (#83) --- .../google-cloud-language/package-lock.json | 103 ++++++++---------- 1 file changed, 44 insertions(+), 59 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index f9a4b4af315..49f5a10d67c 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -223,9 +223,9 @@ } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.1.tgz", - "integrity": "sha512-yIOn92sjHwpF/eORQWjv7QzQPcESSRCsZshdmeX40RGRlB0+HPODRDghZq0GiCqe6zpIYZvKmiKiYd3u52P/7Q==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.2.tgz", + "integrity": "sha512-Zah0wZcVifSpKIy5ulTFyGpHYAA8h/biYy8X7J2UvaXga5XlyruKrXo2K1VmBxB9MDPXa0Duz8M003pe2Ras3w==", "dev": true, "requires": { "ava": "0.25.0", @@ -318,7 +318,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1447,8 +1446,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.3.1", @@ -2756,14 +2754,14 @@ } }, "@types/long": { - "version": "3.0.32", - "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", - "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { - "version": "8.10.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.21.tgz", - "integrity": "sha512-87XkD9qDXm8fIax+5y7drx84cXsu34ZZqfB7Cial3Q/2lxSoJ/+DRaWckkCbxP41wFSIrrb939VhzaNxj4eY1w==" + "version": "10.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz", + "integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q==" }, "acorn": { "version": "5.7.1", @@ -2807,7 +2805,6 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -2819,7 +2816,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -5091,9 +5087,9 @@ } }, "eslint": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.1.0.tgz", - "integrity": "sha512-DyH6JsoA1KzA5+OSWFjg56DFJT+sDLO0yokaPZ9qY0UEmYrPA1gEX/G1MnVkmRDsksG4H1foIVz2ZXXM3hHYvw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.2.0.tgz", + "integrity": "sha512-zlggW1qp7/TBjwLfouRoY7eWXrXwJZFqCdIxxh0/LVB/QuuKuIMkzyUZEcDo6LBadsry5JcEMxIqd3H/66CXVg==", "dev": true, "requires": { "ajv": "^6.5.0", @@ -5112,7 +5108,7 @@ "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", "globals": "^11.7.0", - "ignore": "^3.3.3", + "ignore": "^4.0.2", "imurmurhash": "^0.1.4", "inquirer": "^5.2.0", "is-resolvable": "^1.1.0", @@ -5189,6 +5185,12 @@ "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true }, + "ignore": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", + "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -5539,9 +5541,9 @@ } }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extend-shallow": { "version": "3.0.2", @@ -5904,14 +5906,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5926,20 +5926,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -6056,8 +6053,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -6069,7 +6065,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6084,7 +6079,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6092,14 +6086,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -6118,7 +6110,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -6199,8 +6190,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -6212,7 +6202,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6334,7 +6323,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8263,8 +8251,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.4.0", @@ -8545,18 +8532,18 @@ "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" }, "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", "dev": true }, "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", "dev": true, "requires": { - "mime-db": "~1.33.0" + "mime-db": "~1.35.0" } }, "mimic-fn": { @@ -8850,7 +8837,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9793,8 +9779,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "lru-cache": { "version": "4.1.3", @@ -11526,9 +11511,9 @@ "dev": true }, "protobufjs": { - "version": "6.8.6", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", - "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", + "version": "6.8.8", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", + "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -11540,8 +11525,8 @@ "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", - "@types/long": "^3.0.32", - "@types/node": "^8.9.4", + "@types/long": "^4.0.0", + "@types/node": "^10.1.0", "long": "^4.0.0" } }, From a3f86d631cf8faaa66512f08ed9debdf4f671e81 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Jul 2018 07:51:23 -0700 Subject: [PATCH 153/488] chore: require node 8 for samples (#86) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 9a032a981c2..811ab233faa 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google Inc.", "engines": { - "node": ">=6.0.0" + "node": ">=8" }, "repository": "googleapis/nodejs-language", "private": true, From ba9e57f618a764fe84b4dabe4594babe9f12c33f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Jul 2018 10:50:01 -0700 Subject: [PATCH 154/488] chore: move mocha options to mocha.opts (#85) --- packages/google-cloud-language/package.json | 4 ++-- packages/google-cloud-language/test/mocha.opts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-language/test/mocha.opts diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index d46643aacdf..ef2d0a27ebd 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -49,14 +49,14 @@ "greenkeeper[bot] " ], "scripts": { - "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", + "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "eslint src/ samples/ system-test/ test/", "prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", "samples-test": "cd samples/ && npm test && cd ../", "system-test": "mocha system-test/*.js --timeout 600000", - "test-no-cover": "mocha test/*.js --no-timeouts", + "test-no-cover": "mocha test/*.js", "test": "npm run cover" }, "dependencies": { diff --git a/packages/google-cloud-language/test/mocha.opts b/packages/google-cloud-language/test/mocha.opts new file mode 100644 index 00000000000..3e740ac6e4c --- /dev/null +++ b/packages/google-cloud-language/test/mocha.opts @@ -0,0 +1,2 @@ +--require intelli-espower-loader +--timeout 10000 From 8b796bcd11e335b8227c3ee95b67d0b1de4d3a6d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 30 Jul 2018 18:44:47 -0700 Subject: [PATCH 155/488] chore(deps): lock file maintenance (#87) --- .../google-cloud-language/package-lock.json | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index 49f5a10d67c..79ca52eb584 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -223,9 +223,9 @@ } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.2.tgz", - "integrity": "sha512-Zah0wZcVifSpKIy5ulTFyGpHYAA8h/biYy8X7J2UvaXga5XlyruKrXo2K1VmBxB9MDPXa0Duz8M003pe2Ras3w==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.3.tgz", + "integrity": "sha512-aow6Os43uhdgshSe/fr43ESHNl/kHhikim9AOqIMUzEb6mip6H4d8GFKgpO/yoqUUTIhCN3sbpkKktMI5mOQHw==", "dev": true, "requires": { "ava": "0.25.0", @@ -2759,9 +2759,9 @@ "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { - "version": "10.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz", - "integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q==" + "version": "10.5.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.4.tgz", + "integrity": "sha512-8TqvB0ReZWwtcd3LXq3YSrBoLyXFgBX/sBZfGye9+YS8zH7/g+i6QRIuiDmwBoTzcQ/pk89nZYTYU4c5akKkzw==" }, "acorn": { "version": "5.7.1", @@ -4848,13 +4848,14 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "ecdsa-sig-formatter": { @@ -6668,9 +6669,9 @@ "dev": true }, "grpc": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.13.0.tgz", - "integrity": "sha512-jGxWFYzttSz9pi8mu283jZvo2zIluWonQ918GMHKx8grT57GIVlvx7/82fo7AGS75lbkPoO1T6PZLvCRD9Pbtw==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.13.1.tgz", + "integrity": "sha512-yl0xChnlUISTefOPU2NQ1cYPh5m/DTatEUV6jdRyQPE9NCrtPq7Gn6J2alMTglN7ufYbJapOd00dvhGurHH6HQ==", "requires": { "lodash": "^4.17.5", "nan": "^2.0.0", @@ -6884,12 +6885,12 @@ } }, "node-pre-gyp": { - "version": "0.10.2", + "version": "0.10.3", "bundled": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", @@ -6912,7 +6913,7 @@ "bundled": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.1.11", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -7869,9 +7870,9 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.1.tgz", - "integrity": "sha512-h9Vg3nfbxrF0PK0kZiNiMAyL8zXaLiBP/BXniaKSwVvAi1TaumYV2b0wPdmy1CRX3irYbYD1p4Wjbv4uyECiiQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", + "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", "dev": true, "requires": { "@babel/generator": "7.0.0-beta.51", @@ -11471,9 +11472,9 @@ "dev": true }, "prettier": { - "version": "1.13.7", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz", - "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.0.tgz", + "integrity": "sha512-KtQ2EGaUwf2EyDfp1fxyEb0PqGKakVm0WyXwDt6u+cAoxbO2Z2CwKvOe3+b4+F2IlO9lYHi1kqFuRM70ddBnow==", "dev": true }, "pretty-ms": { From cf355f651e5c9cf89b796378f6a99f955d50b53c Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 30 Jul 2018 20:12:04 -0700 Subject: [PATCH 156/488] chore: add node templates to synth.py (#84) --- packages/google-cloud-language/synth.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index 00f34a25133..b7b46e3b7d5 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -6,6 +6,7 @@ logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICGenerator() +common_templates = gcp.CommonTemplates() # tasks has two product names, and a poorly named artman yaml for version in ['v1', 'v1beta2']: @@ -17,6 +18,10 @@ library, excludes=['package.json', 'README.md', 'src/index.js']) +templates = common_templates.node_library(package_name="@google-cloud/language") +s.copy(templates) + + # Node.js specific cleanup subprocess.run(['npm', 'ci']) subprocess.run(['npm', 'run', 'prettier']) From c8b8404ec052d5d69dc47a1bb068da5926214771 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 31 Jul 2018 05:58:32 -0700 Subject: [PATCH 157/488] Re-generate library using /synth.py (#88) --- .../.circleci/config.yml | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 5bd338975b8..cf867c5f06d 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -4,51 +4,39 @@ workflows: tests: jobs: &workflow_jobs - node6: - filters: + filters: &all_commits tags: only: /.*/ - node8: - filters: - tags: - only: /.*/ + filters: *all_commits - node10: - filters: - tags: - only: /.*/ + filters: *all_commits - lint: requires: - node6 - node8 - node10 - filters: - tags: - only: /.*/ + filters: *all_commits - docs: requires: - node6 - node8 - node10 - filters: - tags: - only: /.*/ + filters: *all_commits - system_tests: requires: - lint - docs - filters: + filters: &master_and_releases branches: only: master - tags: + tags: &releases only: '/^v[\d.]+$/' - sample_tests: requires: - lint - docs - filters: - branches: - only: master - tags: - only: '/^v[\d.]+$/' + filters: *master_and_releases - publish_npm: requires: - system_tests @@ -56,8 +44,7 @@ workflows: filters: branches: ignore: /.*/ - tags: - only: '/^v[\d.]+$/' + tags: *releases nightly: triggers: - schedule: @@ -70,6 +57,7 @@ jobs: node6: docker: - image: 'node:6' + user: node steps: &unit_tests_steps - checkout - run: &remove_package_lock @@ -84,25 +72,29 @@ jobs: echo "Not a nightly build, skipping this step." fi - run: &npm_install_and_link - name: Install and link the module. - command: npm install + name: Install and link the module + command: |- + mkdir -p /home/node/.npm-global + npm install + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test - run: node_modules/.bin/codecov + node8: docker: - image: 'node:8' - steps: *unit_tests_steps - node9: - docker: - - image: 'node:9' + user: node steps: *unit_tests_steps node10: docker: - image: 'node:10' + user: node steps: *unit_tests_steps lint: docker: - image: 'node:8' + user: node steps: - checkout - run: *remove_package_lock @@ -111,14 +103,19 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm install npm link ../ + npm install + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Run linting. command: npm run lint + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global docs: docker: - image: 'node:8' + user: node steps: - checkout - run: *remove_package_lock @@ -129,6 +126,7 @@ jobs: sample_tests: docker: - image: 'node:8' + user: node steps: - checkout - run: *remove_package_lock @@ -145,15 +143,17 @@ jobs: command: npm run samples-test environment: GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /var/language/.circleci/key.json + GOOGLE_APPLICATION_CREDENTIALS: /home/node/samples/.circleci/key.json + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Remove unencrypted key. command: rm .circleci/key.json when: always - working_directory: /var/language/ + working_directory: /home/node/samples/ system_tests: docker: - image: 'node:8' + user: node steps: - checkout - run: *remove_package_lock @@ -176,7 +176,8 @@ jobs: publish_npm: docker: - image: 'node:8' + user: node steps: - checkout - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - - run: npm publish + - run: npm publish --access=public \ No newline at end of file From 0fb4af221b14bbb6c578997b9335437f1514053b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 2 Aug 2018 05:11:14 -0700 Subject: [PATCH 158/488] remove that whitespace (#90) --- packages/google-cloud-language/test/mocha.opts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-language/test/mocha.opts b/packages/google-cloud-language/test/mocha.opts index 3e740ac6e4c..8751e7bae37 100644 --- a/packages/google-cloud-language/test/mocha.opts +++ b/packages/google-cloud-language/test/mocha.opts @@ -1,2 +1,3 @@ --require intelli-espower-loader --timeout 10000 +--throw-deprecation From 296acfbc723ac324ff5d35d26e8667772b456e77 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 6 Aug 2018 19:07:23 -0700 Subject: [PATCH 159/488] chore(deps): lock file maintenance (#92) --- .../google-cloud-language/package-lock.json | 87 +++++++++---------- 1 file changed, 41 insertions(+), 46 deletions(-) diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json index 79ca52eb584..201c35cb96a 100644 --- a/packages/google-cloud-language/package-lock.json +++ b/packages/google-cloud-language/package-lock.json @@ -2759,9 +2759,9 @@ "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { - "version": "10.5.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.4.tgz", - "integrity": "sha512-8TqvB0ReZWwtcd3LXq3YSrBoLyXFgBX/sBZfGye9+YS8zH7/g+i6QRIuiDmwBoTzcQ/pk89nZYTYU4c5akKkzw==" + "version": "10.5.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.7.tgz", + "integrity": "sha512-VkKcfuitP+Nc/TaTFH0B8qNmn+6NbI6crLkQonbedViVz7O2w8QV/GERPlkJ4bg42VGHiEWa31CoTOPs1q6z1w==" }, "acorn": { "version": "5.7.1", @@ -3083,10 +3083,13 @@ } }, "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } }, "assert-plus": { "version": "1.0.0", @@ -3312,9 +3315,9 @@ "dev": true }, "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, "axios": { @@ -3951,9 +3954,9 @@ "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" }, "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, "builtin-modules": { @@ -5088,9 +5091,9 @@ } }, "eslint": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.2.0.tgz", - "integrity": "sha512-zlggW1qp7/TBjwLfouRoY7eWXrXwJZFqCdIxxh0/LVB/QuuKuIMkzyUZEcDo6LBadsry5JcEMxIqd3H/66CXVg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", + "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", "dev": true, "requires": { "ajv": "^6.5.0", @@ -5124,7 +5127,7 @@ "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^1.1.0", + "regexpp": "^2.0.0", "require-uncached": "^1.0.3", "semver": "^5.5.0", "string.prototype.matchall": "^2.0.0", @@ -5187,9 +5190,9 @@ "dev": true }, "ignore": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", - "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", + "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", "dev": true }, "json-schema-traverse": { @@ -5234,14 +5237,6 @@ "requires": { "eslint-utils": "^1.3.0", "regexpp": "^2.0.0" - }, - "dependencies": { - "regexpp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", - "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", - "dev": true - } } }, "eslint-plugin-node": { @@ -5259,9 +5254,9 @@ }, "dependencies": { "ignore": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", - "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", + "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", "dev": true }, "resolve": { @@ -5773,9 +5768,9 @@ "dev": true }, "follow-redirects": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.1.tgz", - "integrity": "sha512-v9GI1hpaqq1ZZR6pBD1+kI7O24PhDvNGNodjS3MdcEqyrahCp8zbtpv+2B/krUnSmUH80lbAS7MrdeK5IylgKg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.2.tgz", + "integrity": "sha512-kssLorP/9acIdpQ2udQVTiCS5LQmdEz9mvdIfDcl1gYX2tPKFADHSyFdvJS040XdFsPzemWtgI3q8mFVCxtX8A==", "requires": { "debug": "^3.1.0" }, @@ -11206,9 +11201,9 @@ "dev": true }, "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "path-to-regexp": { @@ -11734,9 +11729,9 @@ } }, "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", - "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", + "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", "dev": true }, "regexpu-core": { @@ -12033,9 +12028,9 @@ "dev": true }, "sanitize-html": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.2.tgz", - "integrity": "sha512-52ThA+Z7h6BnvpSVbURwChl10XZrps5q7ytjTwWcIe9bmJwnVP6cpEVK2NvDOUhGupoqAvNbUz3cpnJDp4+/pg==", + "version": "1.18.4", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.4.tgz", + "integrity": "sha512-hjyDYCYrQuhnEjq+5lenLlIfdPBtnZ7z0DkQOC8YGxvkuOInH+1SrkNTj30t4f2/SSv9c5kLniB+uCIpBvYuew==", "dev": true, "requires": { "chalk": "^2.3.0", @@ -13142,9 +13137,9 @@ "dev": true }, "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "^3.0.0", From afd2dce537c7667d760ea8b7bae8664c5f6a2924 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 7 Aug 2018 13:59:29 -0700 Subject: [PATCH 160/488] chore: ignore package-lock.json (#93) * chore: ignore package-log.json * remove locky * renovateeee --- .../.circleci/config.yml | 17 +- .../.circleci/get_workflow_name.py | 67 - packages/google-cloud-language/.gitignore | 1 + .../google-cloud-language/package-lock.json | 13359 ---------------- 4 files changed, 2 insertions(+), 13442 deletions(-) delete mode 100644 packages/google-cloud-language/.circleci/get_workflow_name.py delete mode 100644 packages/google-cloud-language/package-lock.json diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index cf867c5f06d..dd4c80cc6e9 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -59,18 +59,7 @@ jobs: - image: 'node:6' user: node steps: &unit_tests_steps - - checkout - - run: &remove_package_lock - name: Remove package-lock.json if needed. - command: | - WORKFLOW_NAME=`python .circleci/get_workflow_name.py` - echo "Workflow name: $WORKFLOW_NAME" - if [ "$WORKFLOW_NAME" = "nightly" ]; then - echo "Nightly build detected, removing package-lock.json." - rm -f package-lock.json samples/package-lock.json - else - echo "Not a nightly build, skipping this step." - fi + - checkout - run: &npm_install_and_link name: Install and link the module command: |- @@ -97,7 +86,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: *npm_install_and_link - run: &samples_npm_install_and_link name: Link the module being tested to the samples. @@ -118,7 +106,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: *npm_install_and_link - run: name: Build documentation. @@ -129,7 +116,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: name: Decrypt credentials. command: | @@ -156,7 +142,6 @@ jobs: user: node steps: - checkout - - run: *remove_package_lock - run: name: Decrypt credentials. command: | diff --git a/packages/google-cloud-language/.circleci/get_workflow_name.py b/packages/google-cloud-language/.circleci/get_workflow_name.py deleted file mode 100644 index ff6b58fd24f..00000000000 --- a/packages/google-cloud-language/.circleci/get_workflow_name.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 2018 Google LLC -# -# 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Get workflow name for the current build using CircleCI API. -Would be great if this information is available in one of -CircleCI environment variables, but it's not there. -https://circleci.ideas.aha.io/ideas/CCI-I-295 -""" - -import json -import os -import sys -import urllib2 - - -def main(): - try: - username = os.environ['CIRCLE_PROJECT_USERNAME'] - reponame = os.environ['CIRCLE_PROJECT_REPONAME'] - build_num = os.environ['CIRCLE_BUILD_NUM'] - except: - sys.stderr.write( - 'Looks like we are not inside CircleCI container. Exiting...\n') - return 1 - - try: - request = urllib2.Request( - "https://circleci.com/api/v1.1/project/github/%s/%s/%s" % - (username, reponame, build_num), - headers={"Accept": "application/json"}) - contents = urllib2.urlopen(request).read() - except: - sys.stderr.write('Cannot query CircleCI API. Exiting...\n') - return 1 - - try: - build_info = json.loads(contents) - except: - sys.stderr.write( - 'Cannot parse JSON received from CircleCI API. Exiting...\n') - return 1 - - try: - workflow_name = build_info['workflows']['workflow_name'] - except: - sys.stderr.write( - 'Cannot get workflow name from CircleCI build info. Exiting...\n') - return 1 - - print workflow_name - return 0 - - -retval = main() -exit(retval) diff --git a/packages/google-cloud-language/.gitignore b/packages/google-cloud-language/.gitignore index b7d407606fb..6b002b948bd 100644 --- a/packages/google-cloud-language/.gitignore +++ b/packages/google-cloud-language/.gitignore @@ -7,3 +7,4 @@ out/ system-test/secrets.js system-test/*key.json *.lock +package-lock.json diff --git a/packages/google-cloud-language/package-lock.json b/packages/google-cloud-language/package-lock.json deleted file mode 100644 index 201c35cb96a..00000000000 --- a/packages/google-cloud-language/package-lock.json +++ /dev/null @@ -1,13359 +0,0 @@ -{ - "name": "@google-cloud/language", - "version": "1.2.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@ava/babel-plugin-throws-helper": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@ava/babel-plugin-throws-helper/-/babel-plugin-throws-helper-2.0.0.tgz", - "integrity": "sha1-L8H+PCEacQcaTsp7j3r1hCzRrnw=", - "dev": true - }, - "@ava/babel-preset-stage-4": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@ava/babel-preset-stage-4/-/babel-preset-stage-4-1.1.0.tgz", - "integrity": "sha512-oWqTnIGXW3k72UFidXzW0ONlO7hnO9x02S/QReJ7NBGeiBH9cUHY9+EfV6C8PXC6YJH++WrliEq03wMSJGNZFg==", - "dev": true, - "requires": { - "babel-plugin-check-es2015-constants": "^6.8.0", - "babel-plugin-syntax-trailing-function-commas": "^6.20.0", - "babel-plugin-transform-async-to-generator": "^6.16.0", - "babel-plugin-transform-es2015-destructuring": "^6.19.0", - "babel-plugin-transform-es2015-function-name": "^6.9.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", - "babel-plugin-transform-es2015-parameters": "^6.21.0", - "babel-plugin-transform-es2015-spread": "^6.8.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.8.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.11.0", - "babel-plugin-transform-exponentiation-operator": "^6.8.0", - "package-hash": "^1.2.0" - }, - "dependencies": { - "md5-hex": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", - "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "package-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-1.2.0.tgz", - "integrity": "sha1-AD5WzVe3NqbtYRTMK4FUJnJ3DkQ=", - "dev": true, - "requires": { - "md5-hex": "^1.3.0" - } - } - } - }, - "@ava/babel-preset-transform-test-files": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@ava/babel-preset-transform-test-files/-/babel-preset-transform-test-files-3.0.0.tgz", - "integrity": "sha1-ze0RlqjY2TgaUJJAq5LpGl7Aafc=", - "dev": true, - "requires": { - "@ava/babel-plugin-throws-helper": "^2.0.0", - "babel-plugin-espower": "^2.3.2" - } - }, - "@ava/write-file-atomic": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ava/write-file-atomic/-/write-file-atomic-2.2.0.tgz", - "integrity": "sha512-BTNB3nGbEfJT+69wuqXFr/bQH7Vr7ihx2xGOMNqPgDGhwspoZhiWumDDZNjBy7AScmqS5CELIOGtPVXESyrnDA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "@babel/code-frame": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", - "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", - "dev": true, - "requires": { - "@babel/highlight": "7.0.0-beta.51" - } - }, - "@babel/generator": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz", - "integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51", - "jsesc": "^2.5.1", - "lodash": "^4.17.5", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", - "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz", - "integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "7.0.0-beta.51", - "@babel/template": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz", - "integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz", - "integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/highlight": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", - "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" - } - }, - "@babel/parser": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz", - "integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=", - "dev": true - }, - "@babel/template": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz", - "integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=", - "dev": true, - "requires": { - "@babel/code-frame": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "lodash": "^4.17.5" - } - }, - "@babel/traverse": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz", - "integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=", - "dev": true, - "requires": { - "@babel/code-frame": "7.0.0-beta.51", - "@babel/generator": "7.0.0-beta.51", - "@babel/helper-function-name": "7.0.0-beta.51", - "@babel/helper-split-export-declaration": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "debug": "^3.1.0", - "globals": "^11.1.0", - "invariant": "^2.2.0", - "lodash": "^4.17.5" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "globals": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", - "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz", - "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.5", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - } - } - }, - "@concordance/react": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@concordance/react/-/react-1.0.0.tgz", - "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", - "dev": true, - "requires": { - "arrify": "^1.0.1" - } - }, - "@google-cloud/nodejs-repo-tools": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.3.3.tgz", - "integrity": "sha512-aow6Os43uhdgshSe/fr43ESHNl/kHhikim9AOqIMUzEb6mip6H4d8GFKgpO/yoqUUTIhCN3sbpkKktMI5mOQHw==", - "dev": true, - "requires": { - "ava": "0.25.0", - "colors": "1.1.2", - "fs-extra": "5.0.0", - "got": "8.3.0", - "handlebars": "4.0.11", - "lodash": "4.17.5", - "nyc": "11.7.2", - "proxyquire": "1.8.0", - "semver": "^5.5.0", - "sinon": "6.0.1", - "string": "3.3.3", - "supertest": "3.1.0", - "yargs": "11.0.0", - "yargs-parser": "10.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "nyc": { - "version": "11.7.2", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.7.2.tgz", - "integrity": "sha512-gBt7qwsR1vryYfglVjQRx1D+AtMZW5NbUKxb+lZe8SN8KsheGCPGWEsSC9AGQG+r2+te1+10uPHUCahuqm1nGQ==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.5.1", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.1.2", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^1.10.0", - "istanbul-lib-report": "^1.1.3", - "istanbul-lib-source-maps": "^1.2.3", - "istanbul-reports": "^1.4.0", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.1.0", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.2.0", - "yargs": "11.1.0", - "yargs-parser": "^8.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "async": { - "version": "1.5.2", - "bundled": true, - "dev": true - }, - "atob": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "babel-code-frame": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "babel-generator": { - "version": "6.26.1", - "bundled": true, - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "base": { - "version": "0.11.2", - "bundled": true, - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "caching-transform": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "class-utils": { - "version": "0.3.6", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "bundled": true, - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "core-js": { - "version": "2.5.6", - "bundled": true, - "dev": true - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^2.0.0" - } - }, - "define-property": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "error-ex": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "esutils": { - "version": "2.0.2", - "bundled": true, - "dev": true - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fragment-cache": { - "version": "0.2.1", - "bundled": true, - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "get-value": { - "version": "2.0.6", - "bundled": true, - "dev": true - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "globals": { - "version": "9.18.0", - "bundled": true, - "dev": true - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "has-ansi": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "has-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hosted-git-info": { - "version": "2.6.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invariant": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-odd": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "bundled": true, - "dev": true - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "istanbul-lib-coverage": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.1", - "bundled": true, - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.0", - "semver": "^5.3.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.3", - "bundled": true, - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "istanbul-reports": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "js-tokens": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - } - } - }, - "lodash": { - "version": "4.17.10", - "bundled": true, - "dev": true - }, - "longest": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "loose-envify": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "js-tokens": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.3", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "map-cache": { - "version": "0.2.2", - "bundled": true, - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5-hex": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "merge-source-map": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "nanomatch": { - "version": "1.2.9", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pascalcase": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "bundled": true, - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "bundled": true, - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "bundled": true, - "dev": true - }, - "regex-not": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "ret": { - "version": "0.1.15", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-regex": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "set-value": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - }, - "source-map-resolve": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "atob": "^2.0.0", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "split-string": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "static-extend": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "trim-right": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "uglify-js": { - "version": "2.8.29", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "union-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unset-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "bundled": true, - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "bundled": true, - "dev": true - }, - "use": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "validate-npm-package-license": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "window-size": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "write-file-atomic": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "y18n": { - "version": "3.2.1", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, - "dev": true - }, - "yargs": { - "version": "11.1.0", - "bundled": true, - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "yargs-parser": { - "version": "9.0.2", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "yargs-parser": { - "version": "8.1.0", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - } - } - } - } - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "yargs": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", - "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - } - } - }, - "@ladjs/time-require": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@ladjs/time-require/-/time-require-0.1.4.tgz", - "integrity": "sha512-weIbJqTMfQ4r1YX85u54DKfjLZs2jwn1XZ6tIOP/pFgMwhIN5BAtaCp/1wn9DzyLsDR9tW0R2NIePcVJ45ivQQ==", - "dev": true, - "requires": { - "chalk": "^0.4.0", - "date-time": "^0.1.1", - "pretty-ms": "^0.2.1", - "text-table": "^0.2.0" - }, - "dependencies": { - "ansi-styles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", - "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", - "dev": true - }, - "chalk": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", - "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", - "dev": true, - "requires": { - "ansi-styles": "~1.0.0", - "has-color": "~0.1.0", - "strip-ansi": "~0.1.0" - } - }, - "pretty-ms": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-0.2.2.tgz", - "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", - "dev": true, - "requires": { - "parse-ms": "^0.1.0" - } - }, - "strip-ansi": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", - "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", - "dev": true - } - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@nodelib/fs.stat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz", - "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==" - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" - }, - "@sindresorhus/is": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", - "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", - "dev": true - }, - "@sinonjs/formatio": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", - "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", - "dev": true, - "requires": { - "samsam": "1.3.0" - } - }, - "@types/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", - "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" - }, - "@types/node": { - "version": "10.5.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.7.tgz", - "integrity": "sha512-VkKcfuitP+Nc/TaTFH0B8qNmn+6NbI6crLkQonbedViVz7O2w8QV/GERPlkJ4bg42VGHiEWa31CoTOPs1q6z1w==" - }, - "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" - }, - "acorn-es7-plugin": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz", - "integrity": "sha1-8u4fMiipDurRJF+asZIusucdM2s=" - }, - "acorn-jsx": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", - "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", - "dev": true, - "requires": { - "acorn": "^5.0.3" - } - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "dev": true, - "requires": { - "string-width": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - } - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "argv": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", - "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=", - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "arr-exclude": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/arr-exclude/-/arr-exclude-1.0.0.tgz", - "integrity": "sha1-38fC5VKicHI8zaBM8xKMjL/lxjE=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=" - }, - "array-find": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", - "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "ascli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", - "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", - "requires": { - "colour": "~0.7.1", - "optjs": "~3.2.2" - } - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" - }, - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" - }, - "auto-bind": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.1.tgz", - "integrity": "sha512-/W9yj1yKmBLwpexwAujeD9YHwYmRuWFGV8HWE7smQab797VeHa4/cnE2NFeDhA+E+5e/OGBI8763EhLjfZ/MXA==", - "dev": true - }, - "ava": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/ava/-/ava-0.25.0.tgz", - "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", - "dev": true, - "requires": { - "@ava/babel-preset-stage-4": "^1.1.0", - "@ava/babel-preset-transform-test-files": "^3.0.0", - "@ava/write-file-atomic": "^2.2.0", - "@concordance/react": "^1.0.0", - "@ladjs/time-require": "^0.1.4", - "ansi-escapes": "^3.0.0", - "ansi-styles": "^3.1.0", - "arr-flatten": "^1.0.1", - "array-union": "^1.0.1", - "array-uniq": "^1.0.2", - "arrify": "^1.0.0", - "auto-bind": "^1.1.0", - "ava-init": "^0.2.0", - "babel-core": "^6.17.0", - "babel-generator": "^6.26.0", - "babel-plugin-syntax-object-rest-spread": "^6.13.0", - "bluebird": "^3.0.0", - "caching-transform": "^1.0.0", - "chalk": "^2.0.1", - "chokidar": "^1.4.2", - "clean-stack": "^1.1.1", - "clean-yaml-object": "^0.1.0", - "cli-cursor": "^2.1.0", - "cli-spinners": "^1.0.0", - "cli-truncate": "^1.0.0", - "co-with-promise": "^4.6.0", - "code-excerpt": "^2.1.1", - "common-path-prefix": "^1.0.0", - "concordance": "^3.0.0", - "convert-source-map": "^1.5.1", - "core-assert": "^0.2.0", - "currently-unhandled": "^0.4.1", - "debug": "^3.0.1", - "dot-prop": "^4.1.0", - "empower-core": "^0.6.1", - "equal-length": "^1.0.0", - "figures": "^2.0.0", - "find-cache-dir": "^1.0.0", - "fn-name": "^2.0.0", - "get-port": "^3.0.0", - "globby": "^6.0.0", - "has-flag": "^2.0.0", - "hullabaloo-config-manager": "^1.1.0", - "ignore-by-default": "^1.0.0", - "import-local": "^0.1.1", - "indent-string": "^3.0.0", - "is-ci": "^1.0.7", - "is-generator-fn": "^1.0.0", - "is-obj": "^1.0.0", - "is-observable": "^1.0.0", - "is-promise": "^2.1.0", - "last-line-stream": "^1.0.0", - "lodash.clonedeepwith": "^4.5.0", - "lodash.debounce": "^4.0.3", - "lodash.difference": "^4.3.0", - "lodash.flatten": "^4.2.0", - "loud-rejection": "^1.2.0", - "make-dir": "^1.0.0", - "matcher": "^1.0.0", - "md5-hex": "^2.0.0", - "meow": "^3.7.0", - "ms": "^2.0.0", - "multimatch": "^2.1.0", - "observable-to-promise": "^0.5.0", - "option-chain": "^1.0.0", - "package-hash": "^2.0.0", - "pkg-conf": "^2.0.0", - "plur": "^2.0.0", - "pretty-ms": "^3.0.0", - "require-precompiled": "^0.1.0", - "resolve-cwd": "^2.0.0", - "safe-buffer": "^5.1.1", - "semver": "^5.4.1", - "slash": "^1.0.0", - "source-map-support": "^0.5.0", - "stack-utils": "^1.0.1", - "strip-ansi": "^4.0.0", - "strip-bom-buf": "^1.0.0", - "supertap": "^1.0.0", - "supports-color": "^5.0.0", - "trim-off-newlines": "^1.0.1", - "unique-temp-dir": "^1.0.0", - "update-notifier": "^2.3.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "empower-core": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-0.6.2.tgz", - "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", - "dev": true, - "requires": { - "call-signature": "0.0.2", - "core-js": "^2.0.0" - } - }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "ava-init": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ava-init/-/ava-init-0.2.1.tgz", - "integrity": "sha512-lXwK5LM+2g1euDRqW1mcSX/tqzY1QU7EjKpqayFPPtNRmbSYZ8RzPO5tqluTToijmtjp2M+pNpVdbcHssC4glg==", - "dev": true, - "requires": { - "arr-exclude": "^1.0.0", - "execa": "^0.7.0", - "has-yarn": "^1.0.0", - "read-pkg-up": "^2.0.0", - "write-pkg": "^3.1.0" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "axios": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", - "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", - "requires": { - "follow-redirects": "^1.3.0", - "is-buffer": "^1.1.5" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - } - } - }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "dev": true, - "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", - "dev": true, - "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-espower": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-2.4.0.tgz", - "integrity": "sha512-/+SRpy7pKgTI28oEHfn1wkuM5QFAdRq8WNsOOih1dVrdV6A/WbNbRZyl0eX5eyDgtb0lOE27PeDFuCX2j8OxVg==", - "dev": true, - "requires": { - "babel-generator": "^6.1.0", - "babylon": "^6.1.0", - "call-matcher": "^1.0.0", - "core-js": "^2.0.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.1.1" - } - }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", - "dev": true - }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", - "dev": true - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", - "dev": true - }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", - "dev": true - }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", - "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", - "dev": true, - "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" - } - }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", - "dev": true, - "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" - } - }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", - "dev": true, - "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - }, - "dependencies": { - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - } - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", - "dev": true - }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "dev": true, - "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "buf-compare": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", - "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", - "dev": true - }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "bytebuffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", - "requires": { - "long": "~3" - }, - "dependencies": { - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cacheable-request": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", - "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", - "dev": true, - "requires": { - "clone-response": "1.0.2", - "get-stream": "3.0.0", - "http-cache-semantics": "3.8.1", - "keyv": "3.0.0", - "lowercase-keys": "1.0.0", - "normalize-url": "2.0.1", - "responselike": "1.0.2" - }, - "dependencies": { - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true - } - } - }, - "caching-transform": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz", - "integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=", - "dev": true, - "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" - }, - "dependencies": { - "md5-hex": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz", - "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - } - } - }, - "call-matcher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-matcher/-/call-matcher-1.0.1.tgz", - "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", - "dev": true, - "requires": { - "core-js": "^2.0.0", - "deep-equal": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.0.0" - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" - }, - "call-signature": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/call-signature/-/call-signature-0.0.2.tgz", - "integrity": "sha1-qEq8glpV70yysCi9dOIFpluaSZY=" - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "^0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "catharsis": { - "version": "0.8.9", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", - "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", - "dev": true, - "requires": { - "underscore-contrib": "~0.3.0" - } - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "ci-info": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", - "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", - "dev": true - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-stack": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-1.3.0.tgz", - "integrity": "sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=", - "dev": true - }, - "clean-yaml-object": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", - "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", - "dev": true - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-spinners": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz", - "integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==", - "dev": true - }, - "cli-truncate": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-1.1.0.tgz", - "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", - "dev": true, - "requires": { - "slice-ansi": "^1.0.0", - "string-width": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "co-with-promise": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co-with-promise/-/co-with-promise-4.6.0.tgz", - "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", - "dev": true, - "requires": { - "pinkie-promise": "^1.0.0" - } - }, - "code-excerpt": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-2.1.1.tgz", - "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", - "dev": true, - "requires": { - "convert-to-spaces": "^1.0.1" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "codecov": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.4.tgz", - "integrity": "sha512-KJyzHdg9B8U9LxXa7hS6jnEW5b1cNckLYc2YpnJ1nEFiOW+/iSzDHp+5MYEIQd9fN3/tC6WmGZmYiwxzkuGp/A==", - "dev": true, - "requires": { - "argv": "^0.0.2", - "ignore-walk": "^3.0.1", - "request": "^2.87.0", - "urlgrey": "^0.4.4" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", - "dev": true, - "requires": { - "color-name": "1.1.1" - } - }, - "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "colour": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", - "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "common-path-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-1.0.0.tgz", - "integrity": "sha1-zVL28HEuC6q5fW+XModPIvR3UsA=", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concordance": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/concordance/-/concordance-3.0.0.tgz", - "integrity": "sha512-CZBzJ3/l5QJjlZM20WY7+5GP5pMTw+1UEbThcpMw8/rojsi5sBCiD8ZbBLtD+jYpRGAkwuKuqk108c154V9eyQ==", - "dev": true, - "requires": { - "date-time": "^2.1.0", - "esutils": "^2.0.2", - "fast-diff": "^1.1.1", - "function-name-support": "^0.2.0", - "js-string-escape": "^1.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.flattendeep": "^4.4.0", - "lodash.merge": "^4.6.0", - "md5-hex": "^2.0.0", - "semver": "^5.3.0", - "well-known-symbols": "^1.0.0" - }, - "dependencies": { - "date-time": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", - "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", - "dev": true, - "requires": { - "time-zone": "^1.0.0" - } - } - } - }, - "configstore": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "convert-to-spaces": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", - "integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=", - "dev": true - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" - }, - "core-assert": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz", - "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", - "dev": true, - "requires": { - "buf-compare": "^1.0.0", - "is-error": "^2.2.0" - } - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true, - "requires": { - "capture-stack-trace": "^1.0.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "^0.10.9" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "date-time": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/date-time/-/date-time-0.1.1.tgz", - "integrity": "sha1-7S9tk9l5DOL9ZtW1/z7dW7y/Owc=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "dev": true, - "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diff-match-patch": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.1.tgz", - "integrity": "sha512-A0QEhr4PxGUMEtKxd6X+JLnOTFd3BfIPSDpsc4dMvj+CbSaErDwTpoTo/nFJDMSrjxLW4BiNq+FbNisAAHhWeQ==" - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "dev": true, - "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", - "dev": true - } - } - }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ecdsa-sig-formatter": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", - "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "empower": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/empower/-/empower-1.3.0.tgz", - "integrity": "sha512-tP2WqM7QzrPguCCQEQfFFDF+6Pw6YWLQal3+GHQaV+0uIr0S+jyREQPWljE02zFCYPFYLZ3LosiRV+OzTrxPpQ==", - "requires": { - "core-js": "^2.0.0", - "empower-core": "^1.2.0" - } - }, - "empower-assert": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.1.0.tgz", - "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", - "dev": true, - "requires": { - "estraverse": "^4.2.0" - } - }, - "empower-core": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-1.2.0.tgz", - "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", - "requires": { - "call-signature": "0.0.2", - "core-js": "^2.0.0" - } - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "requires": { - "once": "^1.4.0" - } - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", - "dev": true - }, - "equal-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz", - "integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "dev": true, - "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" - } - }, - "es5-ext": { - "version": "0.10.45", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" - } - }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" - } - }, - "escallmatch": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/escallmatch/-/escallmatch-1.5.0.tgz", - "integrity": "sha1-UAmdhugJGwkt+N37w/mm+wWgJNA=", - "dev": true, - "requires": { - "call-matcher": "^1.0.0", - "esprima": "^2.0.0" - }, - "dependencies": { - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - } - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "escodegen": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", - "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", - "dev": true, - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", - "dev": true, - "requires": { - "es6-map": "^0.1.3", - "es6-weak-map": "^2.0.1", - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", - "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", - "dev": true, - "requires": { - "ajv": "^6.5.0", - "babel-code-frame": "^6.26.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^4.0.0", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.2", - "imurmurhash": "^0.1.4", - "inquirer": "^5.2.0", - "is-resolvable": "^1.1.0", - "js-yaml": "^3.11.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.5", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^2.0.0", - "require-uncached": "^1.0.3", - "semver": "^5.5.0", - "string.prototype.matchall": "^2.0.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^4.0.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "globals": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", - "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", - "dev": true - }, - "ignore": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", - "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "eslint-config-prettier": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz", - "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", - "dev": true, - "requires": { - "get-stdin": "^5.0.1" - }, - "dependencies": { - "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", - "dev": true - } - } - }, - "eslint-plugin-es": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz", - "integrity": "sha512-9XcVyZiQRVeFjqHw8qHNDAZcQLqaHlOGGpeYqzYh8S4JYCWTCO3yzyen8yVmA5PratfzTRWDwCOFphtDEG+w/w==", - "dev": true, - "requires": { - "eslint-utils": "^1.3.0", - "regexpp": "^2.0.0" - } - }, - "eslint-plugin-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", - "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", - "dev": true, - "requires": { - "eslint-plugin-es": "^1.3.1", - "eslint-utils": "^1.3.1", - "ignore": "^4.0.2", - "minimatch": "^3.0.4", - "resolve": "^1.8.1", - "semver": "^5.5.0" - }, - "dependencies": { - "ignore": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", - "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", - "dev": true - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - } - } - }, - "eslint-plugin-prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz", - "integrity": "sha512-tGek5clmW5swrAx1mdPYM8oThrBE83ePh7LeseZHBWfHVGrHPhKn7Y5zgRMbU/9D5Td9K4CEmUPjGxA7iw98Og==", - "dev": true, - "requires": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" - } - }, - "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", - "dev": true - }, - "espower": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/espower/-/espower-2.1.1.tgz", - "integrity": "sha512-F4TY1qYJB1aUyzB03NsZksZzUQmQoEBaTUjRJGR30GxbkbjKI41NhCyYjrF+bGgWN7x/ZsczYppRpz/0WdI0ug==", - "dev": true, - "requires": { - "array-find": "^1.0.0", - "escallmatch": "^1.5.0", - "escodegen": "^1.7.0", - "escope": "^3.3.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.3.0", - "estraverse": "^4.1.0", - "source-map": "^0.5.0", - "type-name": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "espower-loader": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/espower-loader/-/espower-loader-1.2.2.tgz", - "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", - "dev": true, - "requires": { - "convert-source-map": "^1.1.0", - "espower-source": "^2.0.0", - "minimatch": "^3.0.0", - "source-map-support": "^0.4.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - } - } - }, - "espower-location-detector": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/espower-location-detector/-/espower-location-detector-1.0.0.tgz", - "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", - "dev": true, - "requires": { - "is-url": "^1.2.1", - "path-is-absolute": "^1.0.0", - "source-map": "^0.5.0", - "xtend": "^4.0.0" - } - }, - "espower-source": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/espower-source/-/espower-source-2.3.0.tgz", - "integrity": "sha512-Wc4kC4zUAEV7Qt31JRPoBUc5jjowHRylml2L2VaDQ1XEbnqQofGWx+gPR03TZAPokAMl5dqyL36h3ITyMXy3iA==", - "dev": true, - "requires": { - "acorn": "^5.0.0", - "acorn-es7-plugin": "^1.0.10", - "convert-source-map": "^1.1.1", - "empower-assert": "^1.0.0", - "escodegen": "^1.10.0", - "espower": "^2.1.1", - "estraverse": "^4.0.0", - "merge-estraverse-visitors": "^1.0.0", - "multi-stage-sourcemap": "^0.2.1", - "path-is-absolute": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "espree": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", - "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", - "dev": true, - "requires": { - "acorn": "^5.6.0", - "acorn-jsx": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "espurify": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.1.tgz", - "integrity": "sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==", - "requires": { - "core-js": "^2.0.0" - } - }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - }, - "dependencies": { - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "fast-diff": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", - "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", - "dev": true - }, - "fast-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", - "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.0.1", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.1", - "micromatch": "^3.1.10" - } - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "dev": true, - "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fill-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", - "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", - "dev": true, - "requires": { - "is-object": "~1.0.1", - "merge-descriptors": "~1.0.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", - "dev": true, - "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" - } - }, - "fn-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz", - "integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=", - "dev": true - }, - "follow-redirects": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.2.tgz", - "integrity": "sha512-kssLorP/9acIdpQ2udQVTiCS5LQmdEz9mvdIfDcl1gYX2tPKFADHSyFdvJS040XdFsPzemWtgI3q8mFVCxtX8A==", - "requires": { - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "requires": { - "map-cache": "^0.2.2" - } - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "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" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "function-name-support": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/function-name-support/-/function-name-support-0.2.0.tgz", - "integrity": "sha1-VdO/qm6v1QWlD5vIH99XVkoLsHE=", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "gcp-metadata": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz", - "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==", - "requires": { - "axios": "^0.18.0", - "extend": "^3.0.1", - "retry-axios": "0.3.2" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-port": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", - "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" - }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", - "dev": true, - "requires": { - "ini": "^1.3.4" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", - "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "google-auth-library": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz", - "integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==", - "requires": { - "axios": "^0.18.0", - "gcp-metadata": "^0.6.3", - "gtoken": "^2.3.0", - "jws": "^3.1.5", - "lodash.isstring": "^4.0.1", - "lru-cache": "^4.1.3", - "retry-axios": "^0.3.2" - } - }, - "google-gax": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-0.17.1.tgz", - "integrity": "sha512-fAKvFx++SRr6bGWamWuVOkJzJnQqMgpJkhaB2oEwfFJ91rbFgEmIPRmZZ/MeIVVFUOuHUVyZ8nwjm5peyTZJ6g==", - "requires": { - "duplexify": "^3.6.0", - "extend": "^3.0.1", - "globby": "^8.0.1", - "google-auth-library": "^1.6.1", - "google-proto-files": "^0.16.0", - "grpc": "^1.12.2", - "is-stream-ended": "^0.1.4", - "lodash": "^4.17.10", - "protobufjs": "^6.8.6", - "retry-request": "^4.0.0", - "through2": "^2.0.3" - } - }, - "google-p12-pem": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz", - "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==", - "requires": { - "node-forge": "^0.7.4", - "pify": "^3.0.0" - } - }, - "google-proto-files": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.1.tgz", - "integrity": "sha512-ykdhaYDiU/jlyrkzZDPemraKwVIgLT31XMHVNSJW//R9VED56hqSDRMx1Jlxbf0O4iDZnBWQ0JQLHbM2r5+wuA==", - "requires": { - "globby": "^8.0.0", - "power-assert": "^1.4.4", - "protobufjs": "^6.8.0" - } - }, - "got": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/got/-/got-8.3.0.tgz", - "integrity": "sha512-kBNy/S2CGwrYgDSec5KTWGKUvupwkkTVAjIsVFF2shXO13xpZdFP4d4kxa//CLX2tN/rV0aYwK8vY6UKWGn2vQ==", - "dev": true, - "requires": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.4.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" - }, - "dependencies": { - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "requires": { - "prepend-http": "^2.0.0" - } - } - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "grpc": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.13.1.tgz", - "integrity": "sha512-yl0xChnlUISTefOPU2NQ1cYPh5m/DTatEUV6jdRyQPE9NCrtPq7Gn6J2alMTglN7ufYbJapOd00dvhGurHH6HQ==", - "requires": { - "lodash": "^4.17.5", - "nan": "^2.0.0", - "node-pre-gyp": "^0.10.0", - "protobufjs": "^5.0.3" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "requires": { - "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" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true - }, - "iconv-lite": { - "version": "0.4.23", - "bundled": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.5", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, - "minipass": { - "version": "2.3.3", - "bundled": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true - } - } - }, - "ms": { - "version": "2.0.0", - "bundled": true - }, - "needle": { - "version": "2.2.1", - "bundled": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.3", - "bundled": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true - }, - "npm-packlist": { - "version": "1.1.11", - "bundled": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true - }, - "protobufjs": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", - "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", - "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" - } - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true - }, - "sax": { - "version": "1.2.4", - "bundled": true - }, - "semver": { - "version": "5.5.0", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - }, - "tar": { - "version": "4.4.4", - "bundled": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.3", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true - } - } - }, - "gtoken": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz", - "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==", - "requires": { - "axios": "^0.18.0", - "google-p12-pem": "^1.0.0", - "jws": "^3.1.4", - "mime": "^2.2.0", - "pify": "^3.0.0" - } - }, - "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, - "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-color": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", - "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", - "dev": true - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dev": true, - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "has-yarn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-1.0.0.tgz", - "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=", - "dev": true - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "htmlparser2": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", - "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", - "dev": true - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "hullabaloo-config-manager": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/hullabaloo-config-manager/-/hullabaloo-config-manager-1.1.1.tgz", - "integrity": "sha512-ztKnkZV0TmxnumCDHHgLGNiDnotu4EHCp9YMkznWuo4uTtCyJ+cu+RNcxUeXYKTllpvLFWnbfWry09yzszgg+A==", - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "es6-error": "^4.0.2", - "graceful-fs": "^4.1.11", - "indent-string": "^3.1.0", - "json5": "^0.5.1", - "lodash.clonedeep": "^4.5.0", - "lodash.clonedeepwith": "^4.5.0", - "lodash.isequal": "^4.5.0", - "lodash.merge": "^4.6.0", - "md5-hex": "^2.0.0", - "package-hash": "^2.0.0", - "pkg-dir": "^2.0.0", - "resolve-from": "^3.0.0", - "safe-buffer": "^5.0.1" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" - }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", - "dev": true - }, - "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "import-local": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-0.1.1.tgz", - "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", - "dev": true, - "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "ink-docstrap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.2.tgz", - "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==", - "dev": true, - "requires": { - "moment": "^2.14.1", - "sanitize-html": "^1.13.0" - } - }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "intelli-espower-loader": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/intelli-espower-loader/-/intelli-espower-loader-1.0.1.tgz", - "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", - "dev": true, - "requires": { - "espower-loader": "^1.0.0" - } - }, - "into-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", - "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", - "dev": true, - "requires": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" - } - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, - "irregular-plurals": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", - "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-ci": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", - "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", - "dev": true, - "requires": { - "ci-info": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-error": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.1.tgz", - "integrity": "sha1-aEqW2EB2V3yY9M20DG0mpRI78Zw=", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-generator-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", - "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", - "dev": true, - "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" - } - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", - "dev": true - }, - "is-observable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", - "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", - "dev": true, - "requires": { - "symbol-observable": "^1.1.0" - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-stream-ended": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", - "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", - "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", - "dev": true, - "requires": { - "@babel/generator": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/template": "7.0.0-beta.51", - "@babel/traverse": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "istanbul-lib-coverage": "^2.0.1", - "semver": "^5.5.0" - } - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "dev": true, - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "jest-docblock": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", - "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==", - "dev": true - }, - "js-string-escape": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", - "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", - "dev": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "js2xmlparser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", - "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", - "dev": true, - "requires": { - "xmlcreate": "^1.0.1" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "jsdoc": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", - "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", - "dev": true, - "requires": { - "babylon": "7.0.0-beta.19", - "bluebird": "~3.5.0", - "catharsis": "~0.8.9", - "escape-string-regexp": "~1.0.5", - "js2xmlparser": "~3.0.0", - "klaw": "~2.0.0", - "marked": "~0.3.6", - "mkdirp": "~0.5.1", - "requizzle": "~0.2.1", - "strip-json-comments": "~2.0.1", - "taffydb": "2.6.2", - "underscore": "~1.8.3" - }, - "dependencies": { - "babylon": { - "version": "7.0.0-beta.19", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.19.tgz", - "integrity": "sha512-Vg0C9s/REX6/WIXN37UKpv5ZhRi6A4pjHlpkE34+8/a6c2W1Q692n3hmc+SZG5lKRnaExLUbxtJ1SVT+KaCQ/A==", - "dev": true - } - } - }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "just-extend": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", - "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", - "dev": true - }, - "jwa": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz", - "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.10", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", - "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", - "requires": { - "jwa": "^1.1.5", - "safe-buffer": "^5.0.1" - } - }, - "keyv": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", - "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", - "dev": true, - "requires": { - "json-buffer": "3.0.0" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "klaw": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", - "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "last-line-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/last-line-stream/-/last-line-stream-1.0.0.tgz", - "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", - "dev": true, - "requires": { - "through2": "^2.0.0" - } - }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "dev": true, - "requires": { - "package-json": "^4.0.0" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.clonedeepwith": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz", - "integrity": "sha1-buMFc6A6GmDWcKYu8zwQzxr9vdQ=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", - "dev": true - }, - "lodash.escaperegexp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", - "dev": true - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", - "dev": true - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" - }, - "lodash.merge": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", - "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==" - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true - }, - "lolex": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", - "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", - "dev": true - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "requires": { - "object-visit": "^1.0.0" - } - }, - "marked": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", - "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", - "dev": true - }, - "matcher": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz", - "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.4" - } - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, - "md5-hex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", - "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", - "integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-estraverse-visitors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/merge-estraverse-visitors/-/merge-estraverse-visitors-1.0.0.tgz", - "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "merge2": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", - "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" - }, - "mime-db": { - "version": "1.35.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.19", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", - "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", - "dev": true, - "requires": { - "mime-db": "~1.35.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", - "dev": true, - "requires": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "module-not-found-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", - "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", - "dev": true - }, - "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multi-stage-sourcemap": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/multi-stage-sourcemap/-/multi-stage-sourcemap-0.2.1.tgz", - "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", - "dev": true, - "requires": { - "source-map": "^0.1.34" - }, - "dependencies": { - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "nice-try": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", - "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", - "dev": true - }, - "nise": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", - "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", - "dev": true, - "requires": { - "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", - "lolex": "^2.3.2", - "path-to-regexp": "^1.7.0", - "text-encoding": "^0.6.4" - } - }, - "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-url": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", - "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", - "dev": true, - "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" - }, - "dependencies": { - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - } - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "nyc": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-12.0.2.tgz", - "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", - "dev": true, - "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.5.1", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^2.1.0", - "istanbul-lib-report": "^1.1.3", - "istanbul-lib-source-maps": "^1.2.5", - "istanbul-reports": "^1.4.1", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.1.0", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.2.0", - "yargs": "11.1.0", - "yargs-parser": "^8.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "async": { - "version": "1.5.2", - "bundled": true, - "dev": true - }, - "atob": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "base": { - "version": "0.11.2", - "bundled": true, - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "caching-transform": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "class-utils": { - "version": "0.3.6", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "bundled": true, - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^2.0.0" - } - }, - "define-property": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "error-ex": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fragment-cache": { - "version": "0.2.1", - "bundled": true, - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "get-value": { - "version": "2.0.6", - "bundled": true, - "dev": true - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "has-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hosted-git-info": { - "version": "2.6.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-odd": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "bundled": true, - "dev": true - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "istanbul-lib-coverage": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - } - }, - "istanbul-reports": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - } - } - }, - "longest": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "map-cache": { - "version": "0.2.2", - "bundled": true, - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5-hex": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "merge-source-map": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "nanomatch": { - "version": "1.2.9", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pascalcase": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "bundled": true, - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "bundled": true, - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "regex-not": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "ret": { - "version": "0.1.15", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-regex": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "set-value": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "bundled": true, - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "split-string": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "static-extend": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" - } - }, - "to-object-path": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "uglify-js": { - "version": "2.8.29", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "union-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unset-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "bundled": true, - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "bundled": true, - "dev": true - }, - "use": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "validate-npm-package-license": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "window-size": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "write-file-atomic": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "y18n": { - "version": "3.2.1", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, - "dev": true - }, - "yargs": { - "version": "11.1.0", - "bundled": true, - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "yargs-parser": { - "version": "9.0.2", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "yargs-parser": { - "version": "8.1.0", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - } - } - } - } - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "requires": { - "isobject": "^3.0.0" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "requires": { - "isobject": "^3.0.1" - } - }, - "observable-to-promise": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/observable-to-promise/-/observable-to-promise-0.5.0.tgz", - "integrity": "sha1-yCjw8NxH6fhq+KSXfF1VB2znqR8=", - "dev": true, - "requires": { - "is-observable": "^0.2.0", - "symbol-observable": "^1.0.4" - }, - "dependencies": { - "is-observable": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", - "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", - "dev": true, - "requires": { - "symbol-observable": "^0.2.2" - }, - "dependencies": { - "symbol-observable": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", - "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", - "dev": true - } - } - } - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "option-chain": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/option-chain/-/option-chain-1.0.0.tgz", - "integrity": "sha1-k41zvU4Xg/lI00AjZEraI2aeMPI=", - "dev": true - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - } - } - }, - "optjs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", - "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-cancelable": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", - "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "package-hash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-2.0.0.tgz", - "integrity": "sha1-eK4ybIngWk2BO2hgGXevBcANKg0=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "lodash.flattendeep": "^4.4.0", - "md5-hex": "^2.0.0", - "release-zalgo": "^1.0.0" - } - }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", - "dev": true, - "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" - }, - "dependencies": { - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", - "dev": true, - "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" - } - } - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-ms": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-0.1.2.tgz", - "integrity": "sha1-3T+iXtbC78e93hKtm0bBY6opIk4=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "^3.0.0" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "pinkie": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz", - "integrity": "sha1-Wkfyi6EBXQIBvae/DzWOR77Ix+Q=", - "dev": true - }, - "pinkie-promise": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz", - "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", - "dev": true, - "requires": { - "pinkie": "^1.0.0" - } - }, - "pkg-conf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" - }, - "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "plur": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", - "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", - "dev": true, - "requires": { - "irregular-plurals": "^1.0.0" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "power-assert": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.6.0.tgz", - "integrity": "sha512-nDb6a+p2C7Wj8Y2zmFtLpuv+xobXz4+bzT5s7dr0nn71tLozn7nRMQqzwbefzwZN5qOm0N7Cxhw4kXP75xboKA==", - "requires": { - "define-properties": "^1.1.2", - "empower": "^1.3.0", - "power-assert-formatter": "^1.4.1", - "universal-deep-strict-equal": "^1.2.1", - "xtend": "^4.0.0" - } - }, - "power-assert-context-formatter": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.2.0.tgz", - "integrity": "sha512-HLNEW8Bin+BFCpk/zbyKwkEu9W8/zThIStxGo7weYcFkKgMuGCHUJhvJeBGXDZf0Qm2xis4pbnnciGZiX0EpSg==", - "requires": { - "core-js": "^2.0.0", - "power-assert-context-traversal": "^1.2.0" - } - }, - "power-assert-context-reducer-ast": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.2.0.tgz", - "integrity": "sha512-EgOxmZ/Lb7tw4EwSKX7ZnfC0P/qRZFEG28dx/690qvhmOJ6hgThYFm5TUWANDLK5NiNKlPBi5WekVGd2+5wPrw==", - "requires": { - "acorn": "^5.0.0", - "acorn-es7-plugin": "^1.0.12", - "core-js": "^2.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.2.0" - } - }, - "power-assert-context-traversal": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.2.0.tgz", - "integrity": "sha512-NFoHU6g2umNajiP2l4qb0BRWD773Aw9uWdWYH9EQsVwIZnog5bd2YYLFCVvaxWpwNzWeEfZIon2xtyc63026pQ==", - "requires": { - "core-js": "^2.0.0", - "estraverse": "^4.1.0" - } - }, - "power-assert-formatter": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", - "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", - "requires": { - "core-js": "^2.0.0", - "power-assert-context-formatter": "^1.0.7", - "power-assert-context-reducer-ast": "^1.0.7", - "power-assert-renderer-assertion": "^1.0.7", - "power-assert-renderer-comparison": "^1.0.7", - "power-assert-renderer-diagram": "^1.0.7", - "power-assert-renderer-file": "^1.0.7" - } - }, - "power-assert-renderer-assertion": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.2.0.tgz", - "integrity": "sha512-3F7Q1ZLmV2ZCQv7aV7NJLNK9G7QsostrhOU7U0RhEQS/0vhEqrRg2jEJl1jtUL4ZyL2dXUlaaqrmPv5r9kRvIg==", - "requires": { - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0" - } - }, - "power-assert-renderer-base": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-renderer-base/-/power-assert-renderer-base-1.1.1.tgz", - "integrity": "sha1-lqZQxv0F7hvB9mtUrWFELIs/Y+s=" - }, - "power-assert-renderer-comparison": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.2.0.tgz", - "integrity": "sha512-7c3RKPDBKK4E3JqdPtYRE9cM8AyX4LC4yfTvvTYyx8zSqmT5kJnXwzR0yWQLOavACllZfwrAGQzFiXPc5sWa+g==", - "requires": { - "core-js": "^2.0.0", - "diff-match-patch": "^1.0.0", - "power-assert-renderer-base": "^1.1.1", - "stringifier": "^1.3.0", - "type-name": "^2.0.1" - } - }, - "power-assert-renderer-diagram": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.2.0.tgz", - "integrity": "sha512-JZ6PC+DJPQqfU6dwSmpcoD7gNnb/5U77bU5KgNwPPa+i1Pxiz6UuDeM3EUBlhZ1HvH9tMjI60anqVyi5l2oNdg==", - "requires": { - "core-js": "^2.0.0", - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0", - "stringifier": "^1.3.0" - } - }, - "power-assert-renderer-file": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.2.0.tgz", - "integrity": "sha512-/oaVrRbeOtGoyyd7e4IdLP/jIIUFJdqJtsYzP9/88R39CMnfF/S/rUc8ZQalENfUfQ/wQHu+XZYRMaCEZmEesg==", - "requires": { - "power-assert-renderer-base": "^1.1.1" - } - }, - "power-assert-util-string-width": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz", - "integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==", - "requires": { - "eastasianwidth": "^0.2.0" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "prettier": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.0.tgz", - "integrity": "sha512-KtQ2EGaUwf2EyDfp1fxyEb0PqGKakVm0WyXwDt6u+cAoxbO2Z2CwKvOe3+b4+F2IlO9lYHi1kqFuRM70ddBnow==", - "dev": true - }, - "pretty-ms": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.2.0.tgz", - "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", - "dev": true, - "requires": { - "parse-ms": "^1.0.0" - }, - "dependencies": { - "parse-ms": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", - "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", - "dev": true - } - } - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", - "dev": true - }, - "protobufjs": { - "version": "6.8.8", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", - "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.0", - "@types/node": "^10.1.0", - "long": "^4.0.0" - } - }, - "proxyquire": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-1.8.0.tgz", - "integrity": "sha1-AtUUpb7ZhvBMuyCTrxZ0FTX3ntw=", - "dev": true, - "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.0", - "resolve": "~1.1.7" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "randomatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", - "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "dependencies": { - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - }, - "dependencies": { - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - } - } - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp.prototype.flags": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", - "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2" - } - }, - "regexpp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", - "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", - "dev": true - }, - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "dev": true, - "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "dev": true, - "requires": { - "rc": "^1.0.1" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - } - }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "require-precompiled": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/require-precompiled/-/require-precompiled-0.1.0.tgz", - "integrity": "sha1-WhtS63Dr7UPrmC6XTIWrWVceVvo=", - "dev": true - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true - } - } - }, - "requizzle": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", - "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", - "dev": true, - "requires": { - "underscore": "~1.6.0" - }, - "dependencies": { - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", - "dev": true - } - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" - }, - "retry-axios": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-0.3.2.tgz", - "integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ==" - }, - "retry-request": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.0.0.tgz", - "integrity": "sha512-S4HNLaWcMP6r8E4TMH52Y7/pM8uNayOcTDDQNBwsCccL1uI+Ol2TljxRDPzaNfbhOB30+XWP5NnZkB3LiJxi1w==", - "requires": { - "through2": "^2.0.0" - } - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "5.5.11", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", - "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - }, - "dependencies": { - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", - "dev": true - }, - "sanitize-html": { - "version": "1.18.4", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.4.tgz", - "integrity": "sha512-hjyDYCYrQuhnEjq+5lenLlIfdPBtnZ7z0DkQOC8YGxvkuOInH+1SrkNTj30t4f2/SSv9c5kLniB+uCIpBvYuew==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "htmlparser2": "^3.9.0", - "lodash.clonedeep": "^4.5.0", - "lodash.escaperegexp": "^4.1.2", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.mergewith": "^4.6.0", - "postcss": "^6.0.14", - "srcset": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", - "dev": true, - "requires": { - "semver": "^5.0.3" - } - }, - "serialize-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", - "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "sinon": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.0.1.tgz", - "integrity": "sha512-rfszhNcfamK2+ofIPi9XqeH89pH7KGDcAtM+F9CsjHXOK3jzWG99vyhyD2V+r7s4IipmWcWUFYq4ftZ9/Eu2Wg==", - "dev": true, - "requires": { - "@sinonjs/formatio": "^2.0.0", - "diff": "^3.5.0", - "lodash.get": "^4.4.2", - "lolex": "^2.4.2", - "nise": "^1.3.3", - "supports-color": "^5.4.0", - "type-detect": "^4.0.8" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" - }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - } - } - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sort-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", - "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "srcset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/srcset/-/srcset-1.0.0.tgz", - "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", - "dev": true, - "requires": { - "array-uniq": "^1.0.2", - "number-is-nan": "^1.0.0" - } - }, - "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/string/-/string-3.3.3.tgz", - "integrity": "sha1-XqIRzZLSKOGEKUmQpsyXs2anfLA=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string.prototype.matchall": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", - "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.10.0", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "regexp.prototype.flags": "^1.2.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "stringifier": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", - "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", - "requires": { - "core-js": "^2.0.0", - "traverse": "^0.6.6", - "type-name": "^2.0.1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-bom-buf": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", - "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", - "dev": true, - "requires": { - "is-utf8": "^0.2.1" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", - "dev": true, - "requires": { - "component-emitter": "^1.2.0", - "cookiejar": "^2.1.0", - "debug": "^3.1.0", - "extend": "^3.0.0", - "form-data": "^2.3.1", - "formidable": "^1.1.1", - "methods": "^1.1.1", - "mime": "^1.4.1", - "qs": "^6.5.1", - "readable-stream": "^2.0.5" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - } - } - }, - "supertap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supertap/-/supertap-1.0.0.tgz", - "integrity": "sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "indent-string": "^3.2.0", - "js-yaml": "^3.10.0", - "serialize-error": "^2.1.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "supertest": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.1.0.tgz", - "integrity": "sha512-O44AMnmJqx294uJQjfUmEyYOg7d9mylNFsMw/Wkz4evKd1njyPrtCN+U6ZIC7sKtfEVQhfTqFFijlXx8KP/Czw==", - "dev": true, - "requires": { - "methods": "~1.1.2", - "superagent": "3.8.2" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - } - } - }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, - "table": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", - "dev": true, - "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "taffydb": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", - "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", - "dev": true - }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - } - }, - "text-encoding": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", - "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", - "dev": true - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "time-zone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", - "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", - "dev": true - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "requires": { - "punycode": "^1.4.1" - } - }, - "traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "trim-off-newlines": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", - "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/type-name/-/type-name-2.0.2.tgz", - "integrity": "sha1-7+fUEj2KxSr/9/QMfk3sUmYAj7Q=" - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true, - "optional": true - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true, - "optional": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, - "uid2": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz", - "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I=", - "dev": true - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", - "dev": true - }, - "underscore-contrib": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", - "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", - "dev": true, - "requires": { - "underscore": "1.6.0" - }, - "dependencies": { - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", - "dev": true - } - } - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", - "dev": true, - "requires": { - "crypto-random-string": "^1.0.0" - } - }, - "unique-temp-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz", - "integrity": "sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=", - "dev": true, - "requires": { - "mkdirp": "^0.5.1", - "os-tmpdir": "^1.0.1", - "uid2": "0.0.3" - } - }, - "universal-deep-strict-equal": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", - "integrity": "sha1-DaSsL3PP95JMgfpN4BjKViyisKc=", - "requires": { - "array-filter": "^1.0.0", - "indexof": "0.0.1", - "object-keys": "^1.0.0" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - } - } - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true - }, - "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", - "dev": true, - "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", - "dev": true - }, - "urlgrey": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz", - "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "well-known-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-1.0.0.tgz", - "integrity": "sha1-c8eK6Bp3Jqj6WY4ogIAcixYiVRg=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "widest-line": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", - "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", - "dev": true, - "requires": { - "string-width": "^2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "write-json-file": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz", - "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", - "dev": true, - "requires": { - "detect-indent": "^5.0.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "pify": "^3.0.0", - "sort-keys": "^2.0.0", - "write-file-atomic": "^2.0.0" - }, - "dependencies": { - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", - "dev": true - } - } - }, - "write-pkg": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", - "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", - "dev": true, - "requires": { - "sort-keys": "^2.0.0", - "write-json-file": "^2.2.0" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "dev": true - }, - "xmlcreate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz", - "integrity": "sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "requires": { - "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" - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } - } - } - } -} From 17e40308f8e028a38558e475448d3016c4138993 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 9 Aug 2018 00:03:15 -0700 Subject: [PATCH 161/488] fix(deps): update dependency google-gax to ^0.18.0 (#89) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index ef2d0a27ebd..0a3941a88a3 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -60,7 +60,7 @@ "test": "npm run cover" }, "dependencies": { - "google-gax": "^0.17.1", + "google-gax": "^0.18.0", "lodash.merge": "^4.6.1" }, "devDependencies": { From f3ba8c01e0196669ebfb22e6179b63550487a2ee Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 9 Aug 2018 14:42:43 -0700 Subject: [PATCH 162/488] chore: do not use npm ci (#96) --- packages/google-cloud-language/synth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index b7b46e3b7d5..a6d2543b43e 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -23,6 +23,6 @@ # Node.js specific cleanup -subprocess.run(['npm', 'ci']) +subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'prettier']) subprocess.run(['npm', 'run', 'lint']) From e003e5eabd47b471ba964aad7ecb381803daa930 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 14 Aug 2018 13:16:34 -0400 Subject: [PATCH 163/488] chore(deps): update dependency eslint-config-prettier to v3 (#98) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit

This Pull Request updates devDependency eslint-config-prettier from ^2.9.0 to ^3.0.0

Note: This PR was created on a configured schedule ("after 9am and before 3pm") and will not receive updates outside those times.


Release Notes

v3.0.1

Compare Source

  • Improved: eslint --print-config usage instructions.

v3.0.0

Compare Source

  • Breaking change: Dropped Node.js 4 support.


This PR has been generated by Renovate Bot.

--- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 0a3941a88a3..aec37f95439 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -68,7 +68,7 @@ "async": "^2.6.1", "codecov": "^3.0.2", "eslint": "^5.0.0", - "eslint-config-prettier": "^2.9.0", + "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^7.0.0", "eslint-plugin-prettier": "^2.6.0", "extend": "^3.0.1", From 7bd11ebb6469fb23e28022059a88dc51e13206c1 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 14 Aug 2018 11:03:56 -0700 Subject: [PATCH 164/488] fix: update sample to use a long enough string for classify-text (#97) Fixes #94 --- packages/google-cloud-language/samples/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 916dc6b8eb0..a9cde0ccafa 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -58,7 +58,7 @@ Examples: node analyze.v1.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt node analyze.v1.js entity-sentiment-text "President Obama is speaking at the White House." node analyze.v1.js entity-sentiment-file my-bucket file.txt Detects sentiment of entities in gs://my-bucket/file.txt - node analyze.v1.js classify-text "Android is a mobile operating system developed by Google." + node analyze.v1.js classify-text "Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets." node analyze.v1.js classify-file my-bucket android_text.txt Detects syntax in gs://my-bucket/android_text.txt For more information, see https://cloud.google.com/natural-language/docs @@ -99,7 +99,7 @@ Examples: node analyze.v1beta2.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt node analyze.v1beta2.js syntax-text "President Obama is speaking at the White House." node analyze.v1beta2.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt - node analyze.v1beta2.js classify-text "Android is a mobile operating system developed by Google." + node analyze.v1beta2.js classify-text "Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets." node analyze.v1beta2.js classify-file my-bucket Detects syntax in gs://my-bucket/android_text.txt android_text.txt From 73be87e93dffe1d8a4728eac3d0f65ee31a8ae91 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Wed, 22 Aug 2018 07:27:04 -0700 Subject: [PATCH 165/488] chore: make the CircleCI config consistent --- packages/google-cloud-language/.circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index dd4c80cc6e9..41c82336dbb 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -59,7 +59,7 @@ jobs: - image: 'node:6' user: node steps: &unit_tests_steps - - checkout + - checkout - run: &npm_install_and_link name: Install and link the module command: |- @@ -69,7 +69,7 @@ jobs: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test - run: node_modules/.bin/codecov - + node8: docker: - image: 'node:8' @@ -165,4 +165,4 @@ jobs: steps: - checkout - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - - run: npm publish --access=public \ No newline at end of file + - run: npm publish --access=public From 48268c197b847344c2d078d209644eb8cc419c30 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Mon, 27 Aug 2018 11:17:19 -0700 Subject: [PATCH 166/488] Update the CI config (#105) --- packages/google-cloud-language/.circleci/config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 41c82336dbb..eab76c4a6ba 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -107,9 +107,7 @@ jobs: steps: - checkout - run: *npm_install_and_link - - run: - name: Build documentation. - command: npm run docs + - run: npm run docs sample_tests: docker: - image: 'node:8' @@ -164,5 +162,6 @@ jobs: user: node steps: - checkout - - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' + - npm install + - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - run: npm publish --access=public From 131ad9f3bed0ceb894877c7d17516d3055b35054 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 27 Aug 2018 19:55:26 -0700 Subject: [PATCH 167/488] fix(deps): update dependency google-gax to ^0.19.0 (#103) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index aec37f95439..b8b5dac5d47 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -60,7 +60,7 @@ "test": "npm run cover" }, "dependencies": { - "google-gax": "^0.18.0", + "google-gax": "^0.19.0", "lodash.merge": "^4.6.1" }, "devDependencies": { From 0bb93294e181c2ffcd971ced25665855a205cb70 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 28 Aug 2018 07:51:32 -0700 Subject: [PATCH 168/488] chore(deps): update dependency nyc to v13 (#106) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index b8b5dac5d47..0748f94faf0 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -76,7 +76,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.2.0", - "nyc": "^12.0.2", + "nyc": "^13.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.5" } From b4617aa006d71784ee972da65c293e4d22a30f21 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 28 Aug 2018 13:18:52 -0700 Subject: [PATCH 169/488] Re-generate library using /synth.py (#107) --- packages/google-cloud-language/.jsdoc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index ba88e2c2dce..0e95c7cbd1d 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -1,5 +1,5 @@ /*! - * Copyright 2017 Google Inc. All Rights Reserved. + * Copyright 2018 Google LLC. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2017 Google, Inc.', + copyright: 'Copyright 2018 Google, LLC.', includeDate: false, sourceFiles: false, systemName: '@google-cloud/language', From 5ccceab7d82a8b30229b0e1f3efa25b636c3b7a8 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 31 Aug 2018 12:26:55 -0700 Subject: [PATCH 170/488] Re-generate library using /synth.py (#108) --- .../.circleci/config.yml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index eab76c4a6ba..9a65e928a47 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -117,9 +117,11 @@ jobs: - run: name: Decrypt credentials. command: | - openssl aes-256-cbc -d -in .circleci/key.json.enc \ + if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then + openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + fi - run: *npm_install_and_link - run: *samples_npm_install_and_link - run: @@ -131,7 +133,10 @@ jobs: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Remove unencrypted key. - command: rm .circleci/key.json + command: | + if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then + rm .circleci/key.json + fi when: always working_directory: /home/node/samples/ system_tests: @@ -143,9 +148,11 @@ jobs: - run: name: Decrypt credentials. command: | - openssl aes-256-cbc -d -in .circleci/key.json.enc \ + if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then + openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + fi - run: *npm_install_and_link - run: name: Run system tests. @@ -154,7 +161,10 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json - run: name: Remove unencrypted key. - command: rm .circleci/key.json + command: | + if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then + rm .circleci/key.json + fi when: always publish_npm: docker: @@ -162,6 +172,6 @@ jobs: user: node steps: - checkout - - npm install + - run: npm install - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - run: npm publish --access=public From c5945d806ce331c8a0bfb5dc4f81cc918714eabe Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Sep 2018 10:54:56 -0700 Subject: [PATCH 171/488] Retry npm install in CI (#112) --- .../.circleci/config.yml | 6 +- .../.circleci/npm-install-retry.js | 60 +++++++++++++++++++ 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100755 packages/google-cloud-language/.circleci/npm-install-retry.js diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 9a65e928a47..80dcf7e67d9 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -64,7 +64,7 @@ jobs: name: Install and link the module command: |- mkdir -p /home/node/.npm-global - npm install + ./.circleci/npm-install-retry.js environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test @@ -92,7 +92,7 @@ jobs: command: | cd samples/ npm link ../ - npm install + ./../.circleci/npm-install-retry.js environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: @@ -172,6 +172,6 @@ jobs: user: node steps: - checkout - - run: npm install + - run: ./.circleci/npm-install-retry.js - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - run: npm publish --access=public diff --git a/packages/google-cloud-language/.circleci/npm-install-retry.js b/packages/google-cloud-language/.circleci/npm-install-retry.js new file mode 100755 index 00000000000..ae3220d7348 --- /dev/null +++ b/packages/google-cloud-language/.circleci/npm-install-retry.js @@ -0,0 +1,60 @@ +#!/usr/bin/env node + +let spawn = require('child_process').spawn; + +// +//USE: ./index.js [... NPM ARGS] +// + +let timeout = process.argv[2] || 60000; +let attempts = process.argv[3] || 3; +let args = process.argv.slice(4); +if (args.length === 0) { + args = ['install']; +} + +(function npm() { + let timer; + args.push('--verbose'); + let proc = spawn('npm', args); + proc.stdout.pipe(process.stdout); + proc.stderr.pipe(process.stderr); + proc.stdin.end(); + proc.stdout.on('data', () => { + setTimer(); + }); + proc.stderr.on('data', () => { + setTimer(); + }); + + // side effect: this also restarts when npm exits with a bad code even if it + // didnt timeout + proc.on('close', (code, signal) => { + clearTimeout(timer); + if (code || signal) { + console.log('[npm-are-you-sleeping] npm exited with code ' + code + ''); + + if (--attempts) { + console.log('[npm-are-you-sleeping] restarting'); + npm(); + } else { + console.log('[npm-are-you-sleeping] i tried lots of times. giving up.'); + throw new Error("npm install fails"); + } + } + }); + + function setTimer() { + clearTimeout(timer); + timer = setTimeout(() => { + console.log('[npm-are-you-sleeping] killing npm with SIGTERM'); + proc.kill('SIGTERM'); + // wait a couple seconds + timer = setTimeout(() => { + // its it's still not closed sigkill + console.log('[npm-are-you-sleeping] killing npm with SIGKILL'); + proc.kill('SIGKILL'); + }, 2000); + }, timeout); + } +})(); From c2f4e49d8855cbfbefa41a30b78ab331cf7020ca Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 5 Sep 2018 09:55:17 -0700 Subject: [PATCH 172/488] Update synth and storage (#113) --- packages/google-cloud-language/.circleci/config.yml | 11 +++++++---- packages/google-cloud-language/package.json | 2 -- packages/google-cloud-language/samples/package.json | 10 +--------- packages/google-cloud-language/synth.py | 7 ++----- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 80dcf7e67d9..8af6a4d0489 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -149,21 +149,24 @@ jobs: name: Decrypt credentials. command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - openssl aes-256-cbc -d -in .circleci/key.json.enc \ - -out .circleci/key.json \ - -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + for encrypted_key in .circleci/*.json.enc; do + openssl aes-256-cbc -d -in $encrypted_key \ + -out $(echo $encrypted_key | sed 's/\.enc//') \ + -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" + done fi - run: *npm_install_and_link - run: name: Run system tests. command: npm run system-test environment: + GCLOUD_PROJECT: long-door-651 GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json - run: name: Remove unencrypted key. command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - rm .circleci/key.json + rm .circleci/*.json fi when: always publish_npm: diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 0748f94faf0..6b992970744 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -65,13 +65,11 @@ }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.3.0", - "async": "^2.6.1", "codecov": "^3.0.2", "eslint": "^5.0.0", "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^7.0.0", "eslint-plugin-prettier": "^2.6.0", - "extend": "^3.0.1", "ink-docstrap": "^1.3.2", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 811ab233faa..d95315f7ca2 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -1,6 +1,5 @@ { "name": "nodejs-docs-samples-language", - "version": "0.0.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { @@ -8,11 +7,6 @@ }, "repository": "googleapis/nodejs-language", "private": true, - "semistandard": { - "ignore": [ - "node_modules" - ] - }, "scripts": { "ava": "ava -T 20s --verbose test/*.test.js ./system-test/*.test.js", "cover": "nyc --reporter=lcov --cache ava -T 20s --verbose test/*.test.js ./system-test/*.test.js && nyc report", @@ -20,14 +14,12 @@ }, "dependencies": { "@google-cloud/language": "^1.2.0", - "@google-cloud/storage": "^1.7.0", + "@google-cloud/storage": "^2.0.0", "yargs": "^12.0.0" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.3.0", "ava": "^0.25.0", - "proxyquire": "^2.0.1", - "sinon": "^6.0.1", "uuid": "^3.2.1" } } diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index a6d2543b43e..49fdaf10e05 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -6,8 +6,6 @@ logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICGenerator() -common_templates = gcp.CommonTemplates() - # tasks has two product names, and a poorly named artman yaml for version in ['v1', 'v1beta2']: library = gapic.node_library( @@ -18,11 +16,10 @@ library, excludes=['package.json', 'README.md', 'src/index.js']) -templates = common_templates.node_library(package_name="@google-cloud/language") +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library() s.copy(templates) - # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'prettier']) -subprocess.run(['npm', 'run', 'lint']) From fdd12079a484b50f3e8a9da82f1c5cb71bb1141d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 13 Sep 2018 06:44:23 -0700 Subject: [PATCH 173/488] fix(deps): update dependency google-gax to ^0.20.0 (#117) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6b992970744..d538cd8071d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -60,7 +60,7 @@ "test": "npm run cover" }, "dependencies": { - "google-gax": "^0.19.0", + "google-gax": "^0.20.0", "lodash.merge": "^4.6.1" }, "devDependencies": { From 943d5aceb37810e5d74d10f54fafa6c0244c23cc Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 14 Sep 2018 08:35:14 -0700 Subject: [PATCH 174/488] Switch to let/const (#118) --- .../smoke-test/language_service_smoke_test.js | 10 +- .../cloud/language/v1/doc_language_service.js | 46 ++++---- .../src/v1/language_service_client.js | 54 +++++----- .../language/v1beta2/doc_language_service.js | 46 ++++---- .../src/v1beta2/language_service_client.js | 54 +++++----- .../google-cloud-language/test/gapic-v1.js | 102 +++++++++--------- .../test/gapic-v1beta2.js | 102 +++++++++--------- 7 files changed, 207 insertions(+), 207 deletions(-) diff --git a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js index 05e15414054..8acc7ed10ff 100644 --- a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js +++ b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js @@ -18,19 +18,19 @@ describe('LanguageServiceSmokeTest', () => { it('successfully makes a call to the service', done => { const language = require('../src'); - var client = new language.v1beta2.LanguageServiceClient({ + const client = new language.v1beta2.LanguageServiceClient({ // optional auth parameters. }); - var content = 'Hello, world!'; - var type = 'PLAIN_TEXT'; - var document = { + const content = 'Hello, world!'; + const type = 'PLAIN_TEXT'; + const document = { content: content, type: type, }; client.analyzeSentiment({document: document}) .then(responses => { - var response = responses[0]; + const response = responses[0]; console.log(response); }) .then(done) diff --git a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js index 73083cf8650..4800b74a832 100644 --- a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js @@ -49,7 +49,7 @@ * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var Document = { +const Document = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -96,7 +96,7 @@ var Document = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Sentence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var Sentence = { +const Sentence = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -145,7 +145,7 @@ var Sentence = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var Entity = { +const Entity = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -223,7 +223,7 @@ var Entity = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Token definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var Token = { +const Token = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -244,7 +244,7 @@ var Token = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.Sentiment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var Sentiment = { +const Sentiment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -317,7 +317,7 @@ var Sentiment = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.PartOfSpeech definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var PartOfSpeech = { +const PartOfSpeech = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -867,7 +867,7 @@ var PartOfSpeech = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.DependencyEdge definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var DependencyEdge = { +const DependencyEdge = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -1321,7 +1321,7 @@ var DependencyEdge = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.EntityMention definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var EntityMention = { +const EntityMention = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -1363,7 +1363,7 @@ var EntityMention = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.TextSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var TextSpan = { +const TextSpan = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1381,7 +1381,7 @@ var TextSpan = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.ClassificationCategory definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var ClassificationCategory = { +const ClassificationCategory = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1402,7 +1402,7 @@ var ClassificationCategory = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeSentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnalyzeSentimentRequest = { +const AnalyzeSentimentRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1428,7 +1428,7 @@ var AnalyzeSentimentRequest = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeSentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnalyzeSentimentResponse = { +const AnalyzeSentimentResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1449,7 +1449,7 @@ var AnalyzeSentimentResponse = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeEntitySentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnalyzeEntitySentimentRequest = { +const AnalyzeEntitySentimentRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1470,7 +1470,7 @@ var AnalyzeEntitySentimentRequest = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeEntitySentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnalyzeEntitySentimentResponse = { +const AnalyzeEntitySentimentResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1491,7 +1491,7 @@ var AnalyzeEntitySentimentResponse = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeEntitiesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnalyzeEntitiesRequest = { +const AnalyzeEntitiesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1512,7 +1512,7 @@ var AnalyzeEntitiesRequest = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeEntitiesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnalyzeEntitiesResponse = { +const AnalyzeEntitiesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1533,7 +1533,7 @@ var AnalyzeEntitiesResponse = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeSyntaxRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnalyzeSyntaxRequest = { +const AnalyzeSyntaxRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1559,7 +1559,7 @@ var AnalyzeSyntaxRequest = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnalyzeSyntaxResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnalyzeSyntaxResponse = { +const AnalyzeSyntaxResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1575,7 +1575,7 @@ var AnalyzeSyntaxResponse = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.ClassifyTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var ClassifyTextRequest = { +const ClassifyTextRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1591,7 +1591,7 @@ var ClassifyTextRequest = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.ClassifyTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var ClassifyTextResponse = { +const ClassifyTextResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1618,7 +1618,7 @@ var ClassifyTextResponse = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnnotateTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnnotateTextRequest = { +const AnnotateTextRequest = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -1692,7 +1692,7 @@ var AnnotateTextRequest = { * @memberof google.cloud.language.v1 * @see [google.cloud.language.v1.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} */ -var AnnotateTextResponse = { +const AnnotateTextResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1706,7 +1706,7 @@ var AnnotateTextResponse = { * @enum {number} * @memberof google.cloud.language.v1 */ -var EncodingType = { +const EncodingType = { /** * If `EncodingType` is not specified, encoding-dependent information (such as diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index a3b010d3edb..74309f84520 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -72,13 +72,13 @@ class LanguageServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - var clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -89,7 +89,7 @@ class LanguageServiceClient { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -98,7 +98,7 @@ class LanguageServiceClient { ); // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.cloud.language.v1.LanguageService', gapicConfig, opts.clientConfig, @@ -112,14 +112,14 @@ class LanguageServiceClient { // Put together the "service stub" for // google.cloud.language.v1.LanguageService. - var languageServiceStub = gaxGrpc.createStub( + const languageServiceStub = gaxGrpc.createStub( protos.google.cloud.language.v1.LanguageService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var languageServiceStubMethods = [ + const languageServiceStubMethods = [ 'analyzeSentiment', 'analyzeEntities', 'analyzeEntitySentiment', @@ -132,7 +132,7 @@ class LanguageServiceClient { languageServiceStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), @@ -205,14 +205,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1.LanguageServiceClient({ + * const client = new language.v1.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.analyzeSentiment({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -259,14 +259,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1.LanguageServiceClient({ + * const client = new language.v1.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.analyzeEntities({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -312,14 +312,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1.LanguageServiceClient({ + * const client = new language.v1.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.analyzeEntitySentiment({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -370,14 +370,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1.LanguageServiceClient({ + * const client = new language.v1.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.analyzeSyntax({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -418,14 +418,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1.LanguageServiceClient({ + * const client = new language.v1.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.classifyText({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -475,19 +475,19 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1.LanguageServiceClient({ + * const client = new language.v1.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; - * var features = {}; - * var request = { + * const document = {}; + * const features = {}; + * const request = { * document: document, * features: features, * }; * client.annotateText(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { diff --git a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js index febb701a45d..ccf06a7244d 100644 --- a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js +++ b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js @@ -49,7 +49,7 @@ * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var Document = { +const Document = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -96,7 +96,7 @@ var Document = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Sentence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var Sentence = { +const Sentence = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -145,7 +145,7 @@ var Sentence = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var Entity = { +const Entity = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -223,7 +223,7 @@ var Entity = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Token definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var Token = { +const Token = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -244,7 +244,7 @@ var Token = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.Sentiment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var Sentiment = { +const Sentiment = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -315,7 +315,7 @@ var Sentiment = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.PartOfSpeech definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var PartOfSpeech = { +const PartOfSpeech = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -863,7 +863,7 @@ var PartOfSpeech = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.DependencyEdge definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var DependencyEdge = { +const DependencyEdge = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -1317,7 +1317,7 @@ var DependencyEdge = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.EntityMention definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var EntityMention = { +const EntityMention = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -1359,7 +1359,7 @@ var EntityMention = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.TextSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var TextSpan = { +const TextSpan = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1377,7 +1377,7 @@ var TextSpan = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.ClassificationCategory definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var ClassificationCategory = { +const ClassificationCategory = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1399,7 +1399,7 @@ var ClassificationCategory = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeSentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnalyzeSentimentRequest = { +const AnalyzeSentimentRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1425,7 +1425,7 @@ var AnalyzeSentimentRequest = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeSentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnalyzeSentimentResponse = { +const AnalyzeSentimentResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1446,7 +1446,7 @@ var AnalyzeSentimentResponse = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnalyzeEntitySentimentRequest = { +const AnalyzeEntitySentimentRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1467,7 +1467,7 @@ var AnalyzeEntitySentimentRequest = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnalyzeEntitySentimentResponse = { +const AnalyzeEntitySentimentResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1488,7 +1488,7 @@ var AnalyzeEntitySentimentResponse = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeEntitiesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnalyzeEntitiesRequest = { +const AnalyzeEntitiesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1509,7 +1509,7 @@ var AnalyzeEntitiesRequest = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeEntitiesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnalyzeEntitiesResponse = { +const AnalyzeEntitiesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1530,7 +1530,7 @@ var AnalyzeEntitiesResponse = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeSyntaxRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnalyzeSyntaxRequest = { +const AnalyzeSyntaxRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1556,7 +1556,7 @@ var AnalyzeSyntaxRequest = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnalyzeSyntaxResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnalyzeSyntaxResponse = { +const AnalyzeSyntaxResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1572,7 +1572,7 @@ var AnalyzeSyntaxResponse = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.ClassifyTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var ClassifyTextRequest = { +const ClassifyTextRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1588,7 +1588,7 @@ var ClassifyTextRequest = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.ClassifyTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var ClassifyTextResponse = { +const ClassifyTextResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1615,7 +1615,7 @@ var ClassifyTextResponse = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnnotateTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnnotateTextRequest = { +const AnnotateTextRequest = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -1689,7 +1689,7 @@ var AnnotateTextRequest = { * @memberof google.cloud.language.v1beta2 * @see [google.cloud.language.v1beta2.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} */ -var AnnotateTextResponse = { +const AnnotateTextResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -1703,7 +1703,7 @@ var AnnotateTextResponse = { * @enum {number} * @memberof google.cloud.language.v1beta2 */ -var EncodingType = { +const EncodingType = { /** * If `EncodingType` is not specified, encoding-dependent information (such as diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index fbefebacb28..75007fe8782 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -72,13 +72,13 @@ class LanguageServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gax.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - var clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -89,7 +89,7 @@ class LanguageServiceClient { } // Load the applicable protos. - var protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -98,7 +98,7 @@ class LanguageServiceClient { ); // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.cloud.language.v1beta2.LanguageService', gapicConfig, opts.clientConfig, @@ -112,14 +112,14 @@ class LanguageServiceClient { // Put together the "service stub" for // google.cloud.language.v1beta2.LanguageService. - var languageServiceStub = gaxGrpc.createStub( + const languageServiceStub = gaxGrpc.createStub( protos.google.cloud.language.v1beta2.LanguageService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var languageServiceStubMethods = [ + const languageServiceStubMethods = [ 'analyzeSentiment', 'analyzeEntities', 'analyzeEntitySentiment', @@ -132,7 +132,7 @@ class LanguageServiceClient { languageServiceStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), @@ -206,14 +206,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1beta2.LanguageServiceClient({ + * const client = new language.v1beta2.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.analyzeSentiment({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -260,14 +260,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1beta2.LanguageServiceClient({ + * const client = new language.v1beta2.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.analyzeEntities({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -313,14 +313,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1beta2.LanguageServiceClient({ + * const client = new language.v1beta2.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.analyzeEntitySentiment({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -371,14 +371,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1beta2.LanguageServiceClient({ + * const client = new language.v1beta2.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.analyzeSyntax({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -419,14 +419,14 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1beta2.LanguageServiceClient({ + * const client = new language.v1beta2.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; + * const document = {}; * client.classifyText({document: document}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -476,19 +476,19 @@ class LanguageServiceClient { * * const language = require('@google-cloud/language'); * - * var client = new language.v1beta2.LanguageServiceClient({ + * const client = new language.v1beta2.LanguageServiceClient({ * // optional auth parameters. * }); * - * var document = {}; - * var features = {}; - * var request = { + * const document = {}; + * const features = {}; + * const request = { * document: document, * features: features, * }; * client.annotateText(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js index 288219560c3..d68be1a6fe7 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -18,27 +18,27 @@ const assert = require('assert'); const languageModule = require('../src'); -var FAKE_STATUS_CODE = 1; -var error = new Error(); +const FAKE_STATUS_CODE = 1; +const error = new Error(); error.code = FAKE_STATUS_CODE; describe('LanguageServiceClient', () => { describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -56,14 +56,14 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSentiment with error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -85,20 +85,20 @@ describe('LanguageServiceClient', () => { describe('analyzeEntities', () => { it('invokes analyzeEntities without error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -116,14 +116,14 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntities with error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -145,20 +145,20 @@ describe('LanguageServiceClient', () => { describe('analyzeEntitySentiment', () => { it('invokes analyzeEntitySentiment without error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -176,14 +176,14 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntitySentiment with error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -205,20 +205,20 @@ describe('LanguageServiceClient', () => { describe('analyzeSyntax', () => { it('invokes analyzeSyntax without error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -236,14 +236,14 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSyntax with error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -265,19 +265,19 @@ describe('LanguageServiceClient', () => { describe('classifyText', () => { it('invokes classifyText without error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.classifyText = mockSimpleGrpcMethod( @@ -293,14 +293,14 @@ describe('LanguageServiceClient', () => { }); it('invokes classifyText with error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -322,22 +322,22 @@ describe('LanguageServiceClient', () => { describe('annotateText', () => { it('invokes annotateText without error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var features = {}; - var request = { + const document = {}; + const features = {}; + const request = { document: document, features: features, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -355,15 +355,15 @@ describe('LanguageServiceClient', () => { }); it('invokes annotateText with error', done => { - var client = new languageModule.v1.LanguageServiceClient({ + const client = new languageModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var features = {}; - var request = { + const document = {}; + const features = {}; + const request = { document: document, features: features, }; diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-v1beta2.js index 5f6a9a51f19..59535945504 100644 --- a/packages/google-cloud-language/test/gapic-v1beta2.js +++ b/packages/google-cloud-language/test/gapic-v1beta2.js @@ -18,27 +18,27 @@ const assert = require('assert'); const languageModule = require('../src'); -var FAKE_STATUS_CODE = 1; -var error = new Error(); +const FAKE_STATUS_CODE = 1; +const error = new Error(); error.code = FAKE_STATUS_CODE; describe('LanguageServiceClient', () => { describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -56,14 +56,14 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSentiment with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -85,20 +85,20 @@ describe('LanguageServiceClient', () => { describe('analyzeEntities', () => { it('invokes analyzeEntities without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -116,14 +116,14 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntities with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -145,20 +145,20 @@ describe('LanguageServiceClient', () => { describe('analyzeEntitySentiment', () => { it('invokes analyzeEntitySentiment without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -176,14 +176,14 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntitySentiment with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -205,20 +205,20 @@ describe('LanguageServiceClient', () => { describe('analyzeSyntax', () => { it('invokes analyzeSyntax without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -236,14 +236,14 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSyntax with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -265,19 +265,19 @@ describe('LanguageServiceClient', () => { describe('classifyText', () => { it('invokes classifyText without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; // Mock response - var expectedResponse = {}; + const expectedResponse = {}; // Mock Grpc layer client._innerApiCalls.classifyText = mockSimpleGrpcMethod( @@ -293,14 +293,14 @@ describe('LanguageServiceClient', () => { }); it('invokes classifyText with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var request = { + const document = {}; + const request = { document: document, }; @@ -322,22 +322,22 @@ describe('LanguageServiceClient', () => { describe('annotateText', () => { it('invokes annotateText without error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var features = {}; - var request = { + const document = {}; + const features = {}; + const request = { document: document, features: features, }; // Mock response - var language = 'language-1613589672'; - var expectedResponse = { + const language = 'language-1613589672'; + const expectedResponse = { language: language, }; @@ -355,15 +355,15 @@ describe('LanguageServiceClient', () => { }); it('invokes annotateText with error', done => { - var client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var document = {}; - var features = {}; - var request = { + const document = {}; + const features = {}; + const request = { document: document, features: features, }; From 68faa780325d0bf3d7cb4c53f447014c6da79ae0 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 17 Sep 2018 12:00:31 -0700 Subject: [PATCH 175/488] Use mocha for sample tests (#119) --- .../samples/package.json | 6 ++-- .../samples/test/quickstart.test.js | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 packages/google-cloud-language/samples/test/quickstart.test.js diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index d95315f7ca2..08e1551565b 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -8,9 +8,7 @@ "repository": "googleapis/nodejs-language", "private": true, "scripts": { - "ava": "ava -T 20s --verbose test/*.test.js ./system-test/*.test.js", - "cover": "nyc --reporter=lcov --cache ava -T 20s --verbose test/*.test.js ./system-test/*.test.js && nyc report", - "test": "npm run cover" + "test": "mocha" }, "dependencies": { "@google-cloud/language": "^1.2.0", @@ -19,7 +17,7 @@ }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.3.0", - "ava": "^0.25.0", + "mocha": "^5.2.0", "uuid": "^3.2.1" } } diff --git a/packages/google-cloud-language/samples/test/quickstart.test.js b/packages/google-cloud-language/samples/test/quickstart.test.js new file mode 100644 index 00000000000..12dd4f193d7 --- /dev/null +++ b/packages/google-cloud-language/samples/test/quickstart.test.js @@ -0,0 +1,33 @@ +/** + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +const path = require(`path`); +const assert = require('assert'); +const tools = require(`@google-cloud/nodejs-repo-tools`); + +const cmd = `node quickstart.js`; +const cwd = path.join(__dirname, `..`); + +beforeEach(async () => tools.stubConsole); +afterEach(async () => tools.restoreConsole); + +it(`should analyze sentiment in text`, async () => { + const output = await tools.runAsync(cmd, cwd); + assert(RegExp('Text: Hello, world!').test(output)); + assert(RegExp('Sentiment score: ').test(output)); + assert(RegExp('Sentiment magnitude: ').test(output)); +}); From dc69b96a2856ad288793703d4ff5fc1fc67f6edb Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 18 Sep 2018 10:51:48 -0700 Subject: [PATCH 176/488] Enable no-var in eslint (#120) --- packages/google-cloud-language/.eslintrc.yml | 1 + .../system-test/language_service_smoke_test.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-language/.eslintrc.yml b/packages/google-cloud-language/.eslintrc.yml index bed57fbc42c..65f1dce6c0c 100644 --- a/packages/google-cloud-language/.eslintrc.yml +++ b/packages/google-cloud-language/.eslintrc.yml @@ -11,3 +11,4 @@ rules: block-scoped-var: error eqeqeq: error no-warning-comments: warn + no-var: error diff --git a/packages/google-cloud-language/system-test/language_service_smoke_test.js b/packages/google-cloud-language/system-test/language_service_smoke_test.js index eb13a4a2849..ab60d5b6ab1 100644 --- a/packages/google-cloud-language/system-test/language_service_smoke_test.js +++ b/packages/google-cloud-language/system-test/language_service_smoke_test.js @@ -18,20 +18,20 @@ describe('LanguageServiceSmokeTest', () => { it('successfully makes a call to the service', done => { const language = require('../src'); - var client = new language.v1.LanguageServiceClient({ + let client = new language.v1.LanguageServiceClient({ // optional auth parameters. }); - var content = 'Hello, world!'; - var type = 'PLAIN_TEXT'; - var document = { + let content = 'Hello, world!'; + let type = 'PLAIN_TEXT'; + let document = { content: content, type: type, }; client .analyzeSentiment({document: document}) .then(responses => { - var response = responses[0]; + let response = responses[0]; console.log(response); }) .then(done) From 2741c268c11370dff3e7e8d257ab65305d1bcb4f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 20 Sep 2018 12:30:08 -0700 Subject: [PATCH 177/488] Enable prefer-const in the eslint config (#121) --- packages/google-cloud-language/.eslintrc.yml | 1 + .../smoke-test/language_service_smoke_test.js | 3 ++- .../src/v1/language_service_client.js | 2 +- .../src/v1beta2/language_service_client.js | 2 +- .../system-test/language_service_smoke_test.js | 10 +++++----- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-language/.eslintrc.yml b/packages/google-cloud-language/.eslintrc.yml index 65f1dce6c0c..73eeec27612 100644 --- a/packages/google-cloud-language/.eslintrc.yml +++ b/packages/google-cloud-language/.eslintrc.yml @@ -12,3 +12,4 @@ rules: eqeqeq: error no-warning-comments: warn no-var: error + prefer-const: error diff --git a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js index 8acc7ed10ff..2a3d5f7e2dd 100644 --- a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js +++ b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js @@ -28,7 +28,8 @@ describe('LanguageServiceSmokeTest', () => { content: content, type: type, }; - client.analyzeSentiment({document: document}) + client + .analyzeSentiment({document: document}) .then(responses => { const response = responses[0]; console.log(response); diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 74309f84520..bb988b69079 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -127,7 +127,7 @@ class LanguageServiceClient { 'classifyText', 'annotateText', ]; - for (let methodName of languageServiceStubMethods) { + for (const methodName of languageServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( languageServiceStub.then( stub => diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 75007fe8782..8f15b038512 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -127,7 +127,7 @@ class LanguageServiceClient { 'classifyText', 'annotateText', ]; - for (let methodName of languageServiceStubMethods) { + for (const methodName of languageServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( languageServiceStub.then( stub => diff --git a/packages/google-cloud-language/system-test/language_service_smoke_test.js b/packages/google-cloud-language/system-test/language_service_smoke_test.js index ab60d5b6ab1..7d34a4b3606 100644 --- a/packages/google-cloud-language/system-test/language_service_smoke_test.js +++ b/packages/google-cloud-language/system-test/language_service_smoke_test.js @@ -18,20 +18,20 @@ describe('LanguageServiceSmokeTest', () => { it('successfully makes a call to the service', done => { const language = require('../src'); - let client = new language.v1.LanguageServiceClient({ + const client = new language.v1.LanguageServiceClient({ // optional auth parameters. }); - let content = 'Hello, world!'; - let type = 'PLAIN_TEXT'; - let document = { + const content = 'Hello, world!'; + const type = 'PLAIN_TEXT'; + const document = { content: content, type: type, }; client .analyzeSentiment({document: document}) .then(responses => { - let response = responses[0]; + const response = responses[0]; console.log(response); }) .then(done) From 346c9b5776ccf9d78084a56f96e94d0247d23d66 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 21 Sep 2018 17:38:35 -0700 Subject: [PATCH 178/488] Update the CI config (#123) --- packages/google-cloud-language/.circleci/npm-install-retry.js | 2 +- .../smoke-test/language_service_smoke_test.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/.circleci/npm-install-retry.js b/packages/google-cloud-language/.circleci/npm-install-retry.js index ae3220d7348..3240aa2cbf2 100755 --- a/packages/google-cloud-language/.circleci/npm-install-retry.js +++ b/packages/google-cloud-language/.circleci/npm-install-retry.js @@ -6,7 +6,7 @@ let spawn = require('child_process').spawn; //USE: ./index.js [... NPM ARGS] // -let timeout = process.argv[2] || 60000; +let timeout = process.argv[2] || process.env.NPM_INSTALL_TIMEOUT || 60000; let attempts = process.argv[3] || 3; let args = process.argv.slice(4); if (args.length === 0) { diff --git a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js index 2a3d5f7e2dd..8acc7ed10ff 100644 --- a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js +++ b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js @@ -28,8 +28,7 @@ describe('LanguageServiceSmokeTest', () => { content: content, type: type, }; - client - .analyzeSentiment({document: document}) + client.analyzeSentiment({document: document}) .then(responses => { const response = responses[0]; console.log(response); From 87280aa2280f0209c794f5dbe7c5dfc04421f529 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 24 Sep 2018 17:01:05 -0700 Subject: [PATCH 179/488] test: remove appveyor config (#124) --- packages/google-cloud-language/.appveyor.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 packages/google-cloud-language/.appveyor.yml diff --git a/packages/google-cloud-language/.appveyor.yml b/packages/google-cloud-language/.appveyor.yml deleted file mode 100644 index 24082152655..00000000000 --- a/packages/google-cloud-language/.appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -environment: - matrix: - - nodejs_version: 8 - -install: - - ps: Install-Product node $env:nodejs_version - - npm install -g npm # Force using the latest npm to get dedupe during install - - set PATH=%APPDATA%\npm;%PATH% - - npm install --force --ignore-scripts - -test_script: - - node --version - - npm --version - - npm rebuild - - npm test - -build: off - -matrix: - fast_finish: true From ed01a8d6926a5982c740a0f2848c093dc6b66d9e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 25 Sep 2018 15:45:44 -0700 Subject: [PATCH 180/488] Release v2.0.0 (#127) --- packages/google-cloud-language/CHANGELOG.md | 81 +++++++++++++++++++ packages/google-cloud-language/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-language/CHANGELOG.md diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md new file mode 100644 index 00000000000..ed18fe23fca --- /dev/null +++ b/packages/google-cloud-language/CHANGELOG.md @@ -0,0 +1,81 @@ +# Changelog + +[npm history][1] + +[1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions + +## v2.0.0 + +### Breaking changes +- fix: drop support for node.js 4.x and 9.x ([#73](https://github.com/googleapis/nodejs-language/pull/73)) + +### New Features + +### Dependencies +- fix(deps): update dependency google-gax to ^0.20.0 ([#117](https://github.com/googleapis/nodejs-language/pull/117)) +- fix(deps): update dependency google-gax to ^0.19.0 ([#103](https://github.com/googleapis/nodejs-language/pull/103)) +- fix(deps): update dependency google-gax to ^0.18.0 ([#89](https://github.com/googleapis/nodejs-language/pull/89)) +- fix: update dependencies ([#57](https://github.com/googleapis/nodejs-language/pull/57)) + +### Documentation +- samples: updates all _file_gcs to _gcs ([#102](https://github.com/googleapis/nodejs-language/pull/102)) +- samples: Language region tag update ([#101](https://github.com/googleapis/nodejs-language/pull/101)) +- fix: update sample to use a long enough string for classify-text ([#97](https://github.com/googleapis/nodejs-language/pull/97)) + +### Internal / Testing Changes +- Update kokoro config ([#125](https://github.com/googleapis/nodejs-language/pull/125)) +- test: remove appveyor config ([#124](https://github.com/googleapis/nodejs-language/pull/124)) +- Update the CI config ([#123](https://github.com/googleapis/nodejs-language/pull/123)) +- Enable prefer-const in the eslint config ([#121](https://github.com/googleapis/nodejs-language/pull/121)) +- Enable no-var in eslint ([#120](https://github.com/googleapis/nodejs-language/pull/120)) +- Use mocha for sample tests ([#119](https://github.com/googleapis/nodejs-language/pull/119)) +- Switch to let/const ([#118](https://github.com/googleapis/nodejs-language/pull/118)) +- Update CI config ([#115](https://github.com/googleapis/nodejs-language/pull/115)) +- Update synth and storage ([#113](https://github.com/googleapis/nodejs-language/pull/113)) +- Retry npm install in CI ([#112](https://github.com/googleapis/nodejs-language/pull/112)) +- Update kokoro config ([#108](https://github.com/googleapis/nodejs-language/pull/108)) +- Update kokoro config ([#107](https://github.com/googleapis/nodejs-language/pull/107)) +- chore(deps): update dependency nyc to v13 ([#106](https://github.com/googleapis/nodejs-language/pull/106)) +- Update the CI config ([#105](https://github.com/googleapis/nodejs-language/pull/105)) +- chore: make the CircleCI config consistent +- chore(deps): update dependency eslint-config-prettier to v3 ([#98](https://github.com/googleapis/nodejs-language/pull/98)) +- chore: do not use npm ci ([#96](https://github.com/googleapis/nodejs-language/pull/96)) +- chore: ignore package-lock.json ([#93](https://github.com/googleapis/nodejs-language/pull/93)) +- chore(deps): lock file maintenance ([#92](https://github.com/googleapis/nodejs-language/pull/92)) +- chore: update renovate config ([#91](https://github.com/googleapis/nodejs-language/pull/91)) +- remove that whitespace ([#90](https://github.com/googleapis/nodejs-language/pull/90)) +- Update CircleCI config ([#88](https://github.com/googleapis/nodejs-language/pull/88)) +- chore: add node templates to synth.py ([#84](https://github.com/googleapis/nodejs-language/pull/84)) +- chore(deps): lock file maintenance ([#87](https://github.com/googleapis/nodejs-language/pull/87)) +- chore: move mocha options to mocha.opts ([#85](https://github.com/googleapis/nodejs-language/pull/85)) +- chore: require node 8 for samples ([#86](https://github.com/googleapis/nodejs-language/pull/86)) +- chore(deps): lock file maintenance ([#83](https://github.com/googleapis/nodejs-language/pull/83)) +- chore(deps): update dependency eslint-plugin-node to v7 ([#80](https://github.com/googleapis/nodejs-language/pull/80)) +- test: use strictEqual in tests ([#81](https://github.com/googleapis/nodejs-language/pull/81)) +- chore(deps): lock file maintenance ([#79](https://github.com/googleapis/nodejs-language/pull/79)) +- chore(build): use `npm ci` instead of `npm install` ([#76](https://github.com/googleapis/nodejs-language/pull/76)) +- chore(deps): lock file maintenance ([#75](https://github.com/googleapis/nodejs-language/pull/75)) +- chore(deps): lock file maintenance ([#74](https://github.com/googleapis/nodejs-language/pull/74)) +- chore(deps): lock file maintenance ([#72](https://github.com/googleapis/nodejs-language/pull/72)) +- chore(deps): lock file maintenance ([#71](https://github.com/googleapis/nodejs-language/pull/71)) +- chore(deps): lock file maintenance ([#70](https://github.com/googleapis/nodejs-language/pull/70)) +- chore(deps): lock file maintenance ([#69](https://github.com/googleapis/nodejs-language/pull/69)) +- fix(deps): update dependency yargs to v12 ([#68](https://github.com/googleapis/nodejs-language/pull/68)) +- update google-gax and add synth.py ([#64](https://github.com/googleapis/nodejs-language/pull/64)) +- chore(deps): update dependency sinon to v6.0.1 ([#65](https://github.com/googleapis/nodejs-language/pull/65)) +- Configure Renovate ([#58](https://github.com/googleapis/nodejs-language/pull/58)) +- refactor: drop repo-tool as an exec wrapper ([#62](https://github.com/googleapis/nodejs-language/pull/62)) +- chore: update sample lockfiles ([#61](https://github.com/googleapis/nodejs-language/pull/61)) +- fix: update linking for samples ([#60](https://github.com/googleapis/nodejs-language/pull/60)) +- chore(package): update eslint to version 5.0.0 ([#59](https://github.com/googleapis/nodejs-language/pull/59)) +- chore(package): update nyc to version 12.0.2 ([#55](https://github.com/googleapis/nodejs-language/pull/55)) +- chore: lock files maintenance ([#53](https://github.com/googleapis/nodejs-language/pull/53)) +- chore: timeout for system test ([#51](https://github.com/googleapis/nodejs-language/pull/51)) +- chore: lock files maintenance ([#50](https://github.com/googleapis/nodejs-language/pull/50)) +- chore: test on node10 ([#49](https://github.com/googleapis/nodejs-language/pull/49)) +- chore: lock files maintenance ([#48](https://github.com/googleapis/nodejs-language/pull/48)) +- chore: one more workaround for repo-tools EPERM ([#46](https://github.com/googleapis/nodejs-language/pull/46)) +- chore: workaround for repo-tools EPERM ([#45](https://github.com/googleapis/nodejs-language/pull/45)) +- chore: make samples depend on the current version ([#44](https://github.com/googleapis/nodejs-language/pull/44)) +- chore: setup nighty build in CircleCI ([#43](https://github.com/googleapis/nodejs-language/pull/43)) + diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index d538cd8071d..543f0c1a35f 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "1.2.0", + "version": "2.0.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 08e1551565b..20128ae3ef2 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -11,7 +11,7 @@ "test": "mocha" }, "dependencies": { - "@google-cloud/language": "^1.2.0", + "@google-cloud/language": "^2.0.0", "@google-cloud/storage": "^2.0.0", "yargs": "^12.0.0" }, From 852ec666d01991897ace6667ea34bef207e607cf Mon Sep 17 00:00:00 2001 From: Nirupa Anantha Kumar Date: Thu, 27 Sep 2018 14:55:07 -0700 Subject: [PATCH 181/488] Language Automl samples (#126) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * intial Natural Language commit * fixed input path for skipped model test * removed DS store, attempting linter again * attempted linter fix * removed lodash * package json test directive fix, LLC fix * dependencies for mathjs, automl in sample file added * path fixes, project id fixes, test fixes * comment/test cleanup * fixed tutorial file * manual readme update * readme path fix model * mefailenglishthat'sunmpossible spelling fix * style fix for console statements * Style fixes; thanks Ace! * path fix! * Fix ENV variable for project Id (GCLOUD_PROJECT) * Language AutoML samples * fixing lint issues * Converting test to mocha * Checking if Kokoro failure was a blip --- .../google-cloud-language/samples/README.md | 142 ++++++++++++++++++ .../samples/package.json | 2 + 2 files changed, 144 insertions(+) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index a9cde0ccafa..3622506d237 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -111,3 +111,145 @@ For more information, see https://cloud.google.com/natural-language/docs [shell_img]: //gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md + +### automlNaturalLanguageDataset + +View the [source code][automlNaturalLanguageDataset_code]. + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageDataset.js,samples/README.md) + +__Usage:__ `node automlNaturalLanguageDataset.js --help` + +``` +automlNaturalLanguageDataset.js + +Commands: + automlNaturalLanguageDataset.js create-dataset creates a new Dataset + automlNaturalLanguageDataset.js list-datasets list all Datasets + automlNaturalLanguageDataset.js get-dataset Get a Dataset + automlNaturalLanguageDataset.js delete-dataset Delete a dataset + automlNaturalLanguageDataset.js import-data Import labeled items into dataset + automlNaturalLanguageDataset.js export-data Export a dataset to a Google Cloud Storage Bucket + +Options: + --version Show version number [boolean] + --computeRegion, -c region name e.g. "us-central1" [string] [default: "us-central1"] + --datasetName, -n Name of the Dataset [string] [default: "testDataSet"] + --datasetId, -i Id of the dataset [string] + --filter, -f Name of the Dataset to search for [string] [default: "text_classification_dataset_metadata:*"] + --multilabel, -m Type of the classification problem, False - MULTICLASS, True - MULTILABEL. + [string] [default: false] + --outputUri, -o URI (or local path) to export dataset [string] + --path, -p URI or local path to input .csv, or array of .csv paths + [string] [default: "gs://nodejs-docs-samples-vcm/flowerTraindataMini.csv"] + --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "203278707824"] + --help Show help [boolean] + +Examples: + node automlNaturalLanguageDataset.js create-dataset -n "newDataSet" + node automlNaturalLanguageDataset.js list-datasets -f "imageClassificationDatasetMetadata:*" + node automlNaturalLanguageDataset.js get-dataset -i "DATASETID" + node automlNaturalLanguageDataset.js delete-dataset -i "DATASETID" + node automlNaturalLanguageDataset.js import-data -i "dataSetId" -p "gs://myproject/mytraindata.csv" + node automlNaturalLanguageDataset.js export-data -i "dataSetId" -o "gs://myproject/outputdestination.csv" + +For more information, see https://cloud.google.com/natural-language/docs +``` + +[automlNaturalLanguageDataset_docs]: https://cloud.google.com/natural-language/docs/ +[automlNaturalLanguageDataset_code]: automl/automlNaturalLanguageDataset.js + +[shell_img]: //gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md + +### automlNaturalLanguageModel + +View the [source code][automlNaturalLanguageModel_code]. + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageModel.js,samples/README.md) + +__Usage:__ `node automlNaturalLanguageModel.js --help` + +``` +analyze.v1beta2.js + +Commands: + automlNaturalLanguageModel.js create-model creates a new Model + automlNaturalLanguageModel.js get-operation-status Gets status of current operation + automlNaturalLanguageModel.js list-models list all Models + automlNaturalLanguageModel.js get-model Get a Model + automlNaturalLanguageModel.js list-model-evaluations List model evaluations + automlNaturalLanguageModel.js get-model-evaluation Get model evaluation + automlNaturalLanguageModel.js display-evaluation Display evaluation + automlNaturalLanguageModel.js delete-model Delete a Model + +Options: + --version Show version number [boolean] + --computeRegion, -c region name e.g. "us-central1" [string] [default: "us-central1"] + --datasetId, -i Id of the dataset [string] + --filter, -f Name of the Dataset to search for [string] [default: ""] + --modelName, -m Name of the model [string] [default: false] + --modelId, -a Id of the model [string] [default: ""] + --modelEvaluationId, -e Id of the model evaluation [string] [default: ""] + --operationFullId, -o Full name of an operation [string] [default: ""] + --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "203278707824"] + --trainBudget, -t Budget for training the model [string] [default: ""] + --help Show help [boolean] + +Examples: + node automlNaturalLanguageModel.js create-model -i "DatasetID" -m "myModelName" -t "2" + node automlNaturalLanguageModel.js get-operation-status -i "datasetId" -o "OperationFullID" + node automlNaturalLanguageModel.js list-models -f "textClassificationModelMetadata:*" + node automlNaturalLanguageModel.js get-model -a "ModelID" + node automlNaturalLanguageModel.js list-model-evaluations -a "ModelID" + node automlNaturalLanguageModel.js get-model-evaluation -a "ModelId" -e "ModelEvaluationID" + node automlNaturalLanguageModel.js display-evaluation -a "ModelId" + node automlNaturalLanguageModel.js delete-model -a "ModelID" + +For more information, see https://cloud.google.com/natural-language/docs +``` + +[automlNaturalLanguageModel_docs]: https://cloud.google.com/natural-language/docs/ +[automlNaturalLanguageModel_code]: automl/automlNaturalLanguageModel.js + +[shell_img]: //gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md + +### automlNaturalLanguagePredict + +View the [source code][automlNaturalLanguagePredict_code]. + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguagePredict.js,samples/README.md) + +__Usage:__ `node automlNaturalLanguagePredict.js --help` + +``` +automlNaturalLanguagePredict.js + +Commands: + automlNaturalLanguagePredict.js predict classify the content + +Options: + --version Show version number [boolean] + --computeRegion, -c region name e.g. "us-central1" [string] [default: "us-central1"] + --filePath, -f local text file path of the content to be classified [string] [default: "./resources/test.txt"] + --modelId, -i Id of the model which will be used for text classification [string] + --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "203278707824"] + --scoreThreshold, -s A value from 0.0 to 1.0. When the model makes predictions for an image it willonly produce + results that have at least this confidence score threshold. Default is .5 + [string] [default: "0.5"] + --help Show help [boolean] + +Examples: + node automlNaturalLanguagePredict.js predict -i "modelId" -f "./resources/test.txt" -s "0.5" + +For more information, see https://cloud.google.com/natural-language/docs +``` + +[automlNaturalLanguagePredict_docs]: https://cloud.google.com/natural-language/docs/ +[automlNaturalLanguagePredict_code]: automl/automlNaturalLanguagePredict.js + +[shell_img]: //gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md + + diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 20128ae3ef2..68535b645ba 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -11,6 +11,8 @@ "test": "mocha" }, "dependencies": { + "@google-cloud/automl": "^0.1.1", + "mathjs": "^5.1.0", "@google-cloud/language": "^2.0.0", "@google-cloud/storage": "^2.0.0", "yargs": "^12.0.0" From 98c4767330004713faf4294745313074959dcf42 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 1 Oct 2018 05:02:57 -0700 Subject: [PATCH 182/488] chore(deps): update dependency eslint-plugin-prettier to v3 (#131) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 543f0c1a35f..f2e26a62122 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -69,7 +69,7 @@ "eslint": "^5.0.0", "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^7.0.0", - "eslint-plugin-prettier": "^2.6.0", + "eslint-plugin-prettier": "^3.0.0", "ink-docstrap": "^1.3.2", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", From 99c8768f6ffb60258eded7b6a9bb35f018149763 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 2 Oct 2018 08:15:09 -0700 Subject: [PATCH 183/488] Update kokoro config (#132) --- packages/google-cloud-language/.circleci/config.yml | 2 -- packages/google-cloud-language/codecov.yaml | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-language/codecov.yaml diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 8af6a4d0489..da54155fc57 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -68,8 +68,6 @@ jobs: environment: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test - - run: node_modules/.bin/codecov - node8: docker: - image: 'node:8' diff --git a/packages/google-cloud-language/codecov.yaml b/packages/google-cloud-language/codecov.yaml new file mode 100644 index 00000000000..5724ea9478d --- /dev/null +++ b/packages/google-cloud-language/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com From 7a661d589502c3c7be3845b82a8d6ddbbcf93543 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 28 Oct 2018 08:34:47 -0700 Subject: [PATCH 184/488] chore(deps): update dependency eslint-plugin-node to v8 (#147) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f2e26a62122..66d0345059c 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -68,7 +68,7 @@ "codecov": "^3.0.2", "eslint": "^5.0.0", "eslint-config-prettier": "^3.0.0", - "eslint-plugin-node": "^7.0.0", + "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", "ink-docstrap": "^1.3.2", "intelli-espower-loader": "^1.0.1", From 024d0c918a2ea928ba1cc86e02b8dfaa35d29669 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 30 Oct 2018 10:01:20 -0700 Subject: [PATCH 185/488] chore: include build in eslintignore (#151) --- packages/google-cloud-language/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-language/.eslintignore b/packages/google-cloud-language/.eslintignore index f6fac98b0a8..f08b0fd1c65 100644 --- a/packages/google-cloud-language/.eslintignore +++ b/packages/google-cloud-language/.eslintignore @@ -1,3 +1,4 @@ node_modules/* samples/node_modules/* src/**/doc/* +build/ From d6901f25ea39c0fc5c23b82f0380abedd7ce1eed Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 1 Nov 2018 12:04:00 -0700 Subject: [PATCH 186/488] chore: update CircleCI config (#155) --- packages/google-cloud-language/.circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index da54155fc57..6735ebdaaa1 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -159,7 +159,8 @@ jobs: command: npm run system-test environment: GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json + GOOGLE_APPLICATION_CREDENTIALS: /home/node/project/.circleci/key.json + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Remove unencrypted key. command: | From b1e684abf034491feedb665ddb8c944d2fe7397a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 9 Nov 2018 10:01:23 -0800 Subject: [PATCH 187/488] chore: drop contributors from multiple places (#159) --- packages/google-cloud-language/.mailmap | 4 ---- packages/google-cloud-language/CONTRIBUTORS | 22 --------------------- packages/google-cloud-language/package.json | 19 ------------------ 3 files changed, 45 deletions(-) delete mode 100644 packages/google-cloud-language/.mailmap delete mode 100644 packages/google-cloud-language/CONTRIBUTORS diff --git a/packages/google-cloud-language/.mailmap b/packages/google-cloud-language/.mailmap deleted file mode 100644 index a77040462df..00000000000 --- a/packages/google-cloud-language/.mailmap +++ /dev/null @@ -1,4 +0,0 @@ -Jason Dobry Jason Dobry -Luke Sneeringer Luke Sneeringer -Stephen Sawchuk Stephen Sawchuk -Stephen Sawchuk Stephen Sawchuk \ No newline at end of file diff --git a/packages/google-cloud-language/CONTRIBUTORS b/packages/google-cloud-language/CONTRIBUTORS deleted file mode 100644 index 21228368fb6..00000000000 --- a/packages/google-cloud-language/CONTRIBUTORS +++ /dev/null @@ -1,22 +0,0 @@ -# The names of individuals who have contributed to this project. -# -# Names are formatted as: -# name -# -Ace Nassri -Alexander Fenster -Amy -Dave Gramlich -Eric Uldall -Ernest Landrito -Gus Class -Jason Dobry -Jerjou -Jun Mukai -Luke Sneeringer -Ricky Dunlop -Sawyer Hollenshead -Song Wang -Stephen Sawchuk -Tim Swast -greenkeeper[bot] diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 66d0345059c..79a27010f9e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -29,25 +29,6 @@ "language", "Google Cloud Natural Language API" ], - "contributors": [ - "Ace Nassri ", - "Alexander Fenster ", - "Amy ", - "Dave Gramlich ", - "Eric Uldall ", - "Ernest Landrito ", - "Gus Class ", - "Jason Dobry ", - "Jerjou ", - "Jun Mukai ", - "Luke Sneeringer ", - "Ricky Dunlop ", - "Sawyer Hollenshead ", - "Song Wang ", - "Stephen Sawchuk ", - "Tim Swast ", - "greenkeeper[bot] " - ], "scripts": { "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", From 652d20eaef7379d058547032383059847471c11a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 9 Nov 2018 15:02:46 -0800 Subject: [PATCH 188/488] chore: udpate lint configs (#158) --- packages/google-cloud-language/package.json | 6 +++--- packages/google-cloud-language/samples/package.json | 4 ++++ packages/google-cloud-language/smoke-test/.eslintrc.yml | 5 +++++ .../smoke-test/language_service_smoke_test.js | 3 ++- packages/google-cloud-language/synth.py | 3 ++- packages/google-cloud-language/system-test/.eslintrc.yml | 1 - packages/google-cloud-language/test/.eslintrc.yml | 2 -- 7 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 packages/google-cloud-language/smoke-test/.eslintrc.yml diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 79a27010f9e..1255c801487 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -33,12 +33,12 @@ "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", - "lint": "eslint src/ samples/ system-test/ test/", - "prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", + "lint": "eslint '**/*.js'", "samples-test": "cd samples/ && npm test && cd ../", "system-test": "mocha system-test/*.js --timeout 600000", "test-no-cover": "mocha test/*.js", - "test": "npm run cover" + "test": "npm run cover", + "fix": "eslint --fix '**/*.js'" }, "dependencies": { "google-gax": "^0.20.0", diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 68535b645ba..ffc16763f02 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -7,6 +7,10 @@ }, "repository": "googleapis/nodejs-language", "private": true, + "files": [ + "*.js", + "resources" + ], "scripts": { "test": "mocha" }, diff --git a/packages/google-cloud-language/smoke-test/.eslintrc.yml b/packages/google-cloud-language/smoke-test/.eslintrc.yml new file mode 100644 index 00000000000..f9605165c0f --- /dev/null +++ b/packages/google-cloud-language/smoke-test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +env: + mocha: true +rules: + no-console: off diff --git a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js index 8acc7ed10ff..2a3d5f7e2dd 100644 --- a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js +++ b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js @@ -28,7 +28,8 @@ describe('LanguageServiceSmokeTest', () => { content: content, type: type, }; - client.analyzeSentiment({document: document}) + client + .analyzeSentiment({document: document}) .then(responses => { const response = responses[0]; console.log(response); diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index 49fdaf10e05..e68db5decb8 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -16,10 +16,11 @@ library, excludes=['package.json', 'README.md', 'src/index.js']) +# Update common templates common_templates = gcp.CommonTemplates() templates = common_templates.node_library() s.copy(templates) # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'prettier']) +subprocess.run(['npm', 'run', 'fix']) diff --git a/packages/google-cloud-language/system-test/.eslintrc.yml b/packages/google-cloud-language/system-test/.eslintrc.yml index 2e6882e46d2..f9605165c0f 100644 --- a/packages/google-cloud-language/system-test/.eslintrc.yml +++ b/packages/google-cloud-language/system-test/.eslintrc.yml @@ -2,5 +2,4 @@ env: mocha: true rules: - node/no-unpublished-require: off no-console: off diff --git a/packages/google-cloud-language/test/.eslintrc.yml b/packages/google-cloud-language/test/.eslintrc.yml index 73f7bbc946f..6db2a46c535 100644 --- a/packages/google-cloud-language/test/.eslintrc.yml +++ b/packages/google-cloud-language/test/.eslintrc.yml @@ -1,5 +1,3 @@ --- env: mocha: true -rules: - node/no-unpublished-require: off From 72cc77d5596f5c1b11c2fed67510d2de043a0255 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 10 Nov 2018 10:50:27 -0800 Subject: [PATCH 189/488] chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 (#160) --- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1255c801487..339988017f4 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -45,7 +45,7 @@ "lodash.merge": "^4.6.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.3.0", + "@google-cloud/nodejs-repo-tools": "^3.0.0", "codecov": "^3.0.2", "eslint": "^5.0.0", "eslint-config-prettier": "^3.0.0", diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index ffc16763f02..63c02e645a8 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -22,7 +22,7 @@ "yargs": "^12.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.3.0", + "@google-cloud/nodejs-repo-tools": "^3.0.0", "mocha": "^5.2.0", "uuid": "^3.2.1" } From 5230c6ee876dfcabe5733ed7ccd3482c7d072827 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 12 Nov 2018 15:54:57 -0800 Subject: [PATCH 190/488] chore: update eslintignore config (#161) --- packages/google-cloud-language/.eslintignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.eslintignore b/packages/google-cloud-language/.eslintignore index f08b0fd1c65..2f642cb6044 100644 --- a/packages/google-cloud-language/.eslintignore +++ b/packages/google-cloud-language/.eslintignore @@ -1,4 +1,3 @@ -node_modules/* -samples/node_modules/* +**/node_modules src/**/doc/* build/ From 110b199034dbe0c3d9ad6dc881f8fbc225ee2bc9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 15 Nov 2018 12:13:08 -0800 Subject: [PATCH 191/488] fix(deps): update dependency google-gax to ^0.22.0 (#162) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 339988017f4..413865fceae 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -41,7 +41,7 @@ "fix": "eslint --fix '**/*.js'" }, "dependencies": { - "google-gax": "^0.20.0", + "google-gax": "^0.22.0", "lodash.merge": "^4.6.1" }, "devDependencies": { From d1fd1ad6e5b48fb307f0937d744037bcc5d5a77e Mon Sep 17 00:00:00 2001 From: praveenqlogic <44371467+praveenqlogic@users.noreply.github.com> Date: Fri, 16 Nov 2018 14:20:08 +0530 Subject: [PATCH 192/488] docs(samples): updated samples code to use async await (#154) --- .../samples/quickstart.js | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/packages/google-cloud-language/samples/quickstart.js b/packages/google-cloud-language/samples/quickstart.js index b1b5683bb9f..eaae8c5ecc9 100644 --- a/packages/google-cloud-language/samples/quickstart.js +++ b/packages/google-cloud-language/samples/quickstart.js @@ -16,31 +16,29 @@ 'use strict'; // [START language_quickstart] -// Imports the Google Cloud client library -const language = require('@google-cloud/language'); - -// Instantiates a client -const client = new language.LanguageServiceClient(); - -// The text to analyze -const text = 'Hello, world!'; - -const document = { - content: text, - type: 'PLAIN_TEXT', -}; - -// Detects the sentiment of the text -client - .analyzeSentiment({document: document}) - .then(results => { - const sentiment = results[0].documentSentiment; - - console.log(`Text: ${text}`); - console.log(`Sentiment score: ${sentiment.score}`); - console.log(`Sentiment magnitude: ${sentiment.magnitude}`); - }) - .catch(err => { - console.error('ERROR:', err); - }); +async function main() { + // Imports the Google Cloud client library + const language = require('@google-cloud/language'); + + // Instantiates a client + const client = new language.LanguageServiceClient(); + + // The text to analyze + const text = 'Hello, world!'; + + const document = { + content: text, + type: 'PLAIN_TEXT', + }; + + // Detects the sentiment of the text + const [result] = await client.analyzeSentiment({document: document}); + const sentiment = result.documentSentiment; + + console.log(`Text: ${text}`); + console.log(`Sentiment score: ${sentiment.score}`); + console.log(`Sentiment magnitude: ${sentiment.magnitude}`); +} + +main().catch(console.error); // [END language_quickstart] From 0827ed9ff7a55c2206fd33cb25bdd8dfd4643368 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Mon, 19 Nov 2018 11:00:14 -0800 Subject: [PATCH 193/488] chore: add synth.metadata chore: add synth.metadata --- packages/google-cloud-language/synth.metadata | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 packages/google-cloud-language/synth.metadata diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata new file mode 100644 index 00000000000..f26e69af884 --- /dev/null +++ b/packages/google-cloud-language/synth.metadata @@ -0,0 +1,27 @@ +{ + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "5a57f0c13a358b2b15452bf2d67453774a5f6d4f", + "internalRef": "221837528" + } + }, + { + "git": { + "name": "googleapis-private", + "remote": "https://github.com/googleapis/googleapis-private.git", + "sha": "6aa8e1a447bb8d0367150356a28cb4d3f2332641", + "internalRef": "221340946" + } + }, + { + "generator": { + "name": "artman", + "version": "0.16.0", + "dockerImage": "googleapis/artman@sha256:90f9d15e9bad675aeecd586725bce48f5667ffe7d5fc4d1e96d51ff34304815b" + } + } + ] +} \ No newline at end of file From a7e074d9dbca03e769a76771020b4d226260a1f8 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Sat, 1 Dec 2018 18:42:21 -0800 Subject: [PATCH 194/488] fix(build): fix system key decryption (#169) --- packages/google-cloud-language/.circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml index 6735ebdaaa1..86c63432242 100644 --- a/packages/google-cloud-language/.circleci/config.yml +++ b/packages/google-cloud-language/.circleci/config.yml @@ -116,7 +116,7 @@ jobs: name: Decrypt credentials. command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - openssl aes-256-cbc -d -in .circleci/key.json.enc \ + openssl aes-256-cbc -d -md md5 -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" fi @@ -148,7 +148,7 @@ jobs: command: | if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then for encrypted_key in .circleci/*.json.enc; do - openssl aes-256-cbc -d -in $encrypted_key \ + openssl aes-256-cbc -d -md md5 -in $encrypted_key \ -out $(echo $encrypted_key | sed 's/\.enc//') \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" done From 58cce6a5b600ba984129d70ee13b5341108cda3c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 3 Dec 2018 15:39:09 -0800 Subject: [PATCH 195/488] docs: update readme badges (#171) --- packages/google-cloud-language/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 8373d7cfb0a..e50fe906ec7 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -3,8 +3,7 @@ # [Google Cloud Natural Language API: Node.js Client](https://github.com/googleapis/nodejs-language) [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-language.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-language) -[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-language?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-language) +[![npm version](https://img.shields.io/npm/v/@google-cloud/language.svg)](https://www.npmjs.org/package/@google-cloud/language) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-language/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-language) > Node.js idiomatic client for [Natural Language API][product-docs]. @@ -132,3 +131,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest/ [product-docs]: https://cloud.google.com/natural-language/docs [shell_img]: //gstatic.com/cloudssh/images/open-btn.png + From b7a986bdcb5c18ea5fdd0fd920c83805e0077775 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 3 Dec 2018 16:17:56 -0800 Subject: [PATCH 196/488] docs: update the readme (#172) --- .../.cloud-repo-tools.json | 28 +++++ packages/google-cloud-language/LICENSE | 2 +- packages/google-cloud-language/README.md | 117 ++++++++--------- .../google-cloud-language/samples/README.md | 118 ++++++++++-------- 4 files changed, 145 insertions(+), 120 deletions(-) diff --git a/packages/google-cloud-language/.cloud-repo-tools.json b/packages/google-cloud-language/.cloud-repo-tools.json index 3eaf3caeae1..2c81487b69a 100644 --- a/packages/google-cloud-language/.cloud-repo-tools.json +++ b/packages/google-cloud-language/.cloud-repo-tools.json @@ -5,6 +5,13 @@ "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/language/latest/", "release_quality": "ga", "samples": [ + { + "id": "quickstart", + "name": "Quickstart", + "file": "quickstart.js", + "docs_link": "https://cloud.google.com/natural-language/docs/quickstart-client-libraries", + "usage": "node quickstart.js" + }, { "id": "analyze-v1", "name": "Analyze v1", @@ -18,6 +25,27 @@ "file": "analyze.v1beta2.js", "docs_link": "https://cloud.google.com/natural-language/docs/", "usage": "node analyze.v1beta2.js --help" + }, + { + "id": "automl-nl-dataset", + "name": "AutoML Dataset", + "file": "automl/automlNaturalLanguageDataset.js", + "docs_link": "https://cloud.google.com/natural-language/docs/", + "usage": "node automl/automlNaturalLanguageDataset.js --help" + }, + { + "id": "automl-nl-model", + "name": "AutoML Model", + "file": "automl/automlNaturalLanguageModel.js", + "docs_link": "https://cloud.google.com/natural-language/docs/", + "usage": "node automl/automlNaturalLanguageModel.js --help" + }, + { + "id": "automl-nl-predict", + "name": "AutoML Predict", + "file": "automl/automlNaturalLanguagePredict.js", + "docs_link": "https://cloud.google.com/natural-language/docs/", + "usage": "node automl/automlNaturalLanguagePredict.js --help" } ] } diff --git a/packages/google-cloud-language/LICENSE b/packages/google-cloud-language/LICENSE index 7a4a3ea2424..d6456956733 100644 --- a/packages/google-cloud-language/LICENSE +++ b/packages/google-cloud-language/LICENSE @@ -199,4 +199,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index e50fe906ec7..d0c83b9d4be 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -1,3 +1,5 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `npm run generate-scaffolding`." Google Cloud Platform logo # [Google Cloud Natural Language API: Node.js Client](https://github.com/googleapis/nodejs-language) @@ -6,89 +8,58 @@ [![npm version](https://img.shields.io/npm/v/@google-cloud/language.svg)](https://www.npmjs.org/package/@google-cloud/language) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-language/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-language) -> Node.js idiomatic client for [Natural Language API][product-docs]. - [Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. -* [Natural Language API Node.js Client API Reference][client-docs] -* [github.com/googleapis/nodejs-language](https://github.com/googleapis/nodejs-language) -* [Natural Language API Documentation][product-docs] - -Read more about the client libraries for Cloud APIs, including the older -Google APIs Client Libraries, in [Client Libraries Explained][explained]. - -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained - -**Table of contents:** - -* [Quickstart](#quickstart) - * [Before you begin](#before-you-begin) - * [Installing the client library](#installing-the-client-library) - * [Using the client library](#using-the-client-library) +* [Using the client library](#using-the-client-library) * [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) -## Quickstart +## Using the client library -### Before you begin +1. [Select or create a Cloud Platform project][projects]. -1. Select or create a Cloud Platform project. +1. [Enable billing for your project][billing]. - [Go to the projects page][projects] +1. [Enable the Google Cloud Natural Language API API][enable_api]. -1. Enable billing for your project. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. - [Enable billing][billing] +1. Install the client library: -1. Enable the Google Cloud Natural Language API API. + npm install --save @google-cloud/language - [Enable the API][enable_api] +1. Try an example: -1. [Set up authentication with a service account][auth] so you can access the - API from your local workstation. +```javascript +async function main() { + // Imports the Google Cloud client library + const language = require('@google-cloud/language'); -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=language.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started + // Instantiates a client + const client = new language.LanguageServiceClient(); -### Installing the client library + // The text to analyze + const text = 'Hello, world!'; - npm install --save @google-cloud/language + const document = { + content: text, + type: 'PLAIN_TEXT', + }; -### Using the client library + // Detects the sentiment of the text + const [result] = await client.analyzeSentiment({document: document}); + const sentiment = result.documentSentiment; -```javascript -// Imports the Google Cloud client library -const language = require('@google-cloud/language'); - -// Instantiates a client -const client = new language.LanguageServiceClient(); - -// The text to analyze -const text = 'Hello, world!'; - -const document = { - content: text, - type: 'PLAIN_TEXT', -}; - -// Detects the sentiment of the text -client - .analyzeSentiment({document: document}) - .then(results => { - const sentiment = results[0].documentSentiment; - - console.log(`Text: ${text}`); - console.log(`Sentiment score: ${sentiment.score}`); - console.log(`Sentiment magnitude: ${sentiment.magnitude}`); - }) - .catch(err => { - console.error('ERROR:', err); - }); + console.log(`Text: ${text}`); + console.log(`Sentiment score: ${sentiment.score}`); + console.log(`Sentiment magnitude: ${sentiment.magnitude}`); +} + +main().catch(console.error); ``` ## Samples @@ -98,8 +69,12 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) | | Analyze v1beta2 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) | +| AutoML Dataset | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automl/automlNaturalLanguageDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageDataset.js,samples/README.md) | +| AutoML Model | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automl/automlNaturalLanguageModel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageModel.js,samples/README.md) | +| AutoML Predict | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automl/automlNaturalLanguagePredict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguagePredict.js,samples/README.md) | The [Natural Language API Node.js Client API Reference][client-docs] documentation also contains samples. @@ -128,7 +103,21 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) +## What's Next + +* [Natural Language API Documentation][product-docs] +* [Natural Language API Node.js Client API Reference][client-docs] +* [github.com/googleapis/nodejs-language](https://github.com/googleapis/nodejs-language) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + [client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest/ [product-docs]: https://cloud.google.com/natural-language/docs -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png - +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=language.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 3622506d237..8e5845ffb98 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -1,3 +1,5 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `npm run generate-scaffolding`." Google Cloud Platform logo # Google Cloud Natural Language API: Node.js Samples @@ -10,8 +12,12 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Quickstart](#quickstart) * [Analyze v1](#analyze-v1) * [Analyze v1beta2](#analyze-v1beta2) + * [AutoML Dataset](#auto-ml-dataset) + * [AutoML Model](#auto-ml-model) + * [AutoML Predict](#auto-ml-predict) ## Before you begin @@ -21,9 +27,26 @@ library's README. ## Samples +### Quickstart + +View the [source code][quickstart_0_code]. + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ `node quickstart.js` + +``` +Text: Hello, world! +Sentiment score: 0.30000001192092896 +Sentiment magnitude: 0.30000001192092896 +``` + +[quickstart_0_docs]: https://cloud.google.com/natural-language/docs/quickstart-client-libraries +[quickstart_0_code]: quickstart.js + ### Analyze v1 -View the [source code][analyze-v1_0_code]. +View the [source code][analyze-v1_1_code]. [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) @@ -58,18 +81,19 @@ Examples: node analyze.v1.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt node analyze.v1.js entity-sentiment-text "President Obama is speaking at the White House." node analyze.v1.js entity-sentiment-file my-bucket file.txt Detects sentiment of entities in gs://my-bucket/file.txt - node analyze.v1.js classify-text "Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets." + node analyze.v1.js classify-text "Android is a mobile operating system developed by Google, based on the Linux + kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets." node analyze.v1.js classify-file my-bucket android_text.txt Detects syntax in gs://my-bucket/android_text.txt For more information, see https://cloud.google.com/natural-language/docs ``` -[analyze-v1_0_docs]: https://cloud.google.com/natural-language/docs/ -[analyze-v1_0_code]: analyze.v1.js +[analyze-v1_1_docs]: https://cloud.google.com/natural-language/docs/ +[analyze-v1_1_code]: analyze.v1.js ### Analyze v1beta2 -View the [source code][analyze-v1beta2_1_code]. +View the [source code][analyze-v1beta2_2_code]. [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) @@ -99,26 +123,24 @@ Examples: node analyze.v1beta2.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt node analyze.v1beta2.js syntax-text "President Obama is speaking at the White House." node analyze.v1beta2.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt - node analyze.v1beta2.js classify-text "Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets." + node analyze.v1beta2.js classify-text "Android is a mobile operating system developed by Google, based on the Linux + kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets." node analyze.v1beta2.js classify-file my-bucket Detects syntax in gs://my-bucket/android_text.txt android_text.txt For more information, see https://cloud.google.com/natural-language/docs ``` -[analyze-v1beta2_1_docs]: https://cloud.google.com/natural-language/docs/ -[analyze-v1beta2_1_code]: analyze.v1beta2.js - -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md +[analyze-v1beta2_2_docs]: https://cloud.google.com/natural-language/docs/ +[analyze-v1beta2_2_code]: analyze.v1beta2.js -### automlNaturalLanguageDataset +### AutoML Dataset -View the [source code][automlNaturalLanguageDataset_code]. +View the [source code][automl-nl-dataset_3_code]. [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageDataset.js,samples/README.md) -__Usage:__ `node automlNaturalLanguageDataset.js --help` +__Usage:__ `node automl/automlNaturalLanguageDataset.js --help` ``` automlNaturalLanguageDataset.js @@ -133,16 +155,16 @@ Commands: Options: --version Show version number [boolean] - --computeRegion, -c region name e.g. "us-central1" [string] [default: "us-central1"] + --computeRegion, -c region name e.g. "us-central1" [string] --datasetName, -n Name of the Dataset [string] [default: "testDataSet"] --datasetId, -i Id of the dataset [string] - --filter, -f Name of the Dataset to search for [string] [default: "text_classification_dataset_metadata:*"] + --filter, -f filter expression [string] [default: "text_classification_dataset_metadata:*"] --multilabel, -m Type of the classification problem, False - MULTICLASS, True - MULTILABEL. [string] [default: false] --outputUri, -o URI (or local path) to export dataset [string] --path, -p URI or local path to input .csv, or array of .csv paths [string] [default: "gs://nodejs-docs-samples-vcm/flowerTraindataMini.csv"] - --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "203278707824"] + --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "long-door-651"] --help Show help [boolean] Examples: @@ -152,47 +174,42 @@ Examples: node automlNaturalLanguageDataset.js delete-dataset -i "DATASETID" node automlNaturalLanguageDataset.js import-data -i "dataSetId" -p "gs://myproject/mytraindata.csv" node automlNaturalLanguageDataset.js export-data -i "dataSetId" -o "gs://myproject/outputdestination.csv" - -For more information, see https://cloud.google.com/natural-language/docs ``` -[automlNaturalLanguageDataset_docs]: https://cloud.google.com/natural-language/docs/ -[automlNaturalLanguageDataset_code]: automl/automlNaturalLanguageDataset.js +[automl-nl-dataset_3_docs]: https://cloud.google.com/natural-language/docs/ +[automl-nl-dataset_3_code]: automl/automlNaturalLanguageDataset.js -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md - -### automlNaturalLanguageModel +### AutoML Model -View the [source code][automlNaturalLanguageModel_code]. +View the [source code][automl-nl-model_4_code]. [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageModel.js,samples/README.md) -__Usage:__ `node automlNaturalLanguageModel.js --help` +__Usage:__ `node automl/automlNaturalLanguageModel.js --help` ``` -analyze.v1beta2.js +automlNaturalLanguageModel.js Commands: - automlNaturalLanguageModel.js create-model creates a new Model + automlNaturalLanguageModel.js create-model creates a new Model automlNaturalLanguageModel.js get-operation-status Gets status of current operation - automlNaturalLanguageModel.js list-models list all Models - automlNaturalLanguageModel.js get-model Get a Model + automlNaturalLanguageModel.js list-models list all Models + automlNaturalLanguageModel.js get-model Get a Model automlNaturalLanguageModel.js list-model-evaluations List model evaluations automlNaturalLanguageModel.js get-model-evaluation Get model evaluation - automlNaturalLanguageModel.js display-evaluation Display evaluation - automlNaturalLanguageModel.js delete-model Delete a Model + automlNaturalLanguageModel.js display-evaluation Display evaluation + automlNaturalLanguageModel.js delete-model Delete a Model Options: --version Show version number [boolean] - --computeRegion, -c region name e.g. "us-central1" [string] [default: "us-central1"] + --computeRegion, -c region name e.g. "us-central1" [string] --datasetId, -i Id of the dataset [string] - --filter, -f Name of the Dataset to search for [string] [default: ""] + --filter, -f Name of the Dataset to search for [string] [default: ""] --modelName, -m Name of the model [string] [default: false] --modelId, -a Id of the model [string] [default: ""] --modelEvaluationId, -e Id of the model evaluation [string] [default: ""] --operationFullId, -o Full name of an operation [string] [default: ""] - --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "203278707824"] + --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "long-door-651"] --trainBudget, -t Budget for training the model [string] [default: ""] --help Show help [boolean] @@ -205,23 +222,18 @@ Examples: node automlNaturalLanguageModel.js get-model-evaluation -a "ModelId" -e "ModelEvaluationID" node automlNaturalLanguageModel.js display-evaluation -a "ModelId" node automlNaturalLanguageModel.js delete-model -a "ModelID" - -For more information, see https://cloud.google.com/natural-language/docs ``` -[automlNaturalLanguageModel_docs]: https://cloud.google.com/natural-language/docs/ -[automlNaturalLanguageModel_code]: automl/automlNaturalLanguageModel.js +[automl-nl-model_4_docs]: https://cloud.google.com/natural-language/docs/ +[automl-nl-model_4_code]: automl/automlNaturalLanguageModel.js -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md +### AutoML Predict -### automlNaturalLanguagePredict - -View the [source code][automlNaturalLanguagePredict_code]. +View the [source code][automl-nl-predict_5_code]. [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguagePredict.js,samples/README.md) -__Usage:__ `node automlNaturalLanguagePredict.js --help` +__Usage:__ `node automl/automlNaturalLanguagePredict.js --help` ``` automlNaturalLanguagePredict.js @@ -231,10 +243,10 @@ Commands: Options: --version Show version number [boolean] - --computeRegion, -c region name e.g. "us-central1" [string] [default: "us-central1"] + --computeRegion, -c region name e.g. "us-central1" [string] --filePath, -f local text file path of the content to be classified [string] [default: "./resources/test.txt"] --modelId, -i Id of the model which will be used for text classification [string] - --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "203278707824"] + --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "long-door-651"] --scoreThreshold, -s A value from 0.0 to 1.0. When the model makes predictions for an image it willonly produce results that have at least this confidence score threshold. Default is .5 [string] [default: "0.5"] @@ -242,14 +254,10 @@ Options: Examples: node automlNaturalLanguagePredict.js predict -i "modelId" -f "./resources/test.txt" -s "0.5" - -For more information, see https://cloud.google.com/natural-language/docs ``` -[automlNaturalLanguagePredict_docs]: https://cloud.google.com/natural-language/docs/ -[automlNaturalLanguagePredict_code]: automl/automlNaturalLanguagePredict.js +[automl-nl-predict_5_docs]: https://cloud.google.com/natural-language/docs/ +[automl-nl-predict_5_code]: automl/automlNaturalLanguagePredict.js -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md - - From 9b7be05efad9c0cc6fce1071b032654d3032bffe Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 5 Dec 2018 15:55:31 -0800 Subject: [PATCH 197/488] chore: nyc ignore build/test by default (#174) --- packages/google-cloud-language/.nycrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/.nycrc b/packages/google-cloud-language/.nycrc index a1a8e6920ce..feb032400d4 100644 --- a/packages/google-cloud-language/.nycrc +++ b/packages/google-cloud-language/.nycrc @@ -3,7 +3,8 @@ "exclude": [ "src/*{/*,/**/*}.js", "src/*/v*/*.js", - "test/**/*.js" + "test/**/*.js", + "build/test" ], "watermarks": { "branches": [ From 6ac814cf6d9d5e139108d0809d0e8a013da2ad19 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 10 Dec 2018 13:35:08 -0800 Subject: [PATCH 198/488] build: add Kokoro configs for autorelease (#178) * build: add Kokoro configs for autorelease * build: add Kokoro configs for autorelease * chore: remove CircleCI config --- .../.circleci/config.yml | 179 ------------------ .../.circleci/key.json.enc | Bin 2368 -> 0 bytes .../.circleci/npm-install-retry.js | 60 ------ 3 files changed, 239 deletions(-) delete mode 100644 packages/google-cloud-language/.circleci/config.yml delete mode 100644 packages/google-cloud-language/.circleci/key.json.enc delete mode 100755 packages/google-cloud-language/.circleci/npm-install-retry.js diff --git a/packages/google-cloud-language/.circleci/config.yml b/packages/google-cloud-language/.circleci/config.yml deleted file mode 100644 index 86c63432242..00000000000 --- a/packages/google-cloud-language/.circleci/config.yml +++ /dev/null @@ -1,179 +0,0 @@ -version: 2 -workflows: - version: 2 - tests: - jobs: &workflow_jobs - - node6: - filters: &all_commits - tags: - only: /.*/ - - node8: - filters: *all_commits - - node10: - filters: *all_commits - - lint: - requires: - - node6 - - node8 - - node10 - filters: *all_commits - - docs: - requires: - - node6 - - node8 - - node10 - filters: *all_commits - - system_tests: - requires: - - lint - - docs - filters: &master_and_releases - branches: - only: master - tags: &releases - only: '/^v[\d.]+$/' - - sample_tests: - requires: - - lint - - docs - filters: *master_and_releases - - publish_npm: - requires: - - system_tests - - sample_tests - filters: - branches: - ignore: /.*/ - tags: *releases - nightly: - triggers: - - schedule: - cron: 0 7 * * * - filters: - branches: - only: master - jobs: *workflow_jobs -jobs: - node6: - docker: - - image: 'node:6' - user: node - steps: &unit_tests_steps - - checkout - - run: &npm_install_and_link - name: Install and link the module - command: |- - mkdir -p /home/node/.npm-global - ./.circleci/npm-install-retry.js - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: npm test - node8: - docker: - - image: 'node:8' - user: node - steps: *unit_tests_steps - node10: - docker: - - image: 'node:10' - user: node - steps: *unit_tests_steps - lint: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: *npm_install_and_link - - run: &samples_npm_install_and_link - name: Link the module being tested to the samples. - command: | - cd samples/ - npm link ../ - ./../.circleci/npm-install-retry.js - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: - name: Run linting. - command: npm run lint - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - docs: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: *npm_install_and_link - - run: npm run docs - sample_tests: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: - name: Decrypt credentials. - command: | - if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - openssl aes-256-cbc -d -md md5 -in .circleci/key.json.enc \ - -out .circleci/key.json \ - -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - fi - - run: *npm_install_and_link - - run: *samples_npm_install_and_link - - run: - name: Run sample tests. - command: npm run samples-test - environment: - GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /home/node/samples/.circleci/key.json - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: - name: Remove unencrypted key. - command: | - if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - rm .circleci/key.json - fi - when: always - working_directory: /home/node/samples/ - system_tests: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: - name: Decrypt credentials. - command: | - if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - for encrypted_key in .circleci/*.json.enc; do - openssl aes-256-cbc -d -md md5 -in $encrypted_key \ - -out $(echo $encrypted_key | sed 's/\.enc//') \ - -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - done - fi - - run: *npm_install_and_link - - run: - name: Run system tests. - command: npm run system-test - environment: - GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /home/node/project/.circleci/key.json - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: - name: Remove unencrypted key. - command: | - if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then - rm .circleci/*.json - fi - when: always - publish_npm: - docker: - - image: 'node:8' - user: node - steps: - - checkout - - run: ./.circleci/npm-install-retry.js - - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - - run: npm publish --access=public diff --git a/packages/google-cloud-language/.circleci/key.json.enc b/packages/google-cloud-language/.circleci/key.json.enc deleted file mode 100644 index 730ae94518c0c15819c83e8cf0f547eee2451167..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2368 zcmV-G3BUGJVQh3|WM5y*ae(1-oWWBzr7s19Bs|M(Vg%#u^lkBw^mXu^+r(eIC;i6n zO0__xp@~tl4%V$>yQY-eL9Bx*`62ixv!C;2c*Etlm$iw}3@}3ff1pUXO#$yUKUg`o znxQGa9JBy*rUI>mxF&~^yNQ_*ngxVlBwb2L^{RKHCvdj;d#fLtQgIsVal-o-U%6=>vnP^=I7rE%Ar$syvYm z*>$uaCCx==J-FXupMa>7pIoG({bsCxyOXEm8jg8$m*}Zo*;26ppQiGbP4g=$1PJpG30}r#iGmq`$LEuZ2(+^=9t>e;_dyt2_zv}V# z!AKW*!nnbWq3bprLT_521zBlC3-))L{+Qh>Wfj=n*g{0SW4$K)n59;9c_UyW`|+Mn z2S}S0@&+WA8>EQl3+B;`e9ZPz!sGN)bYa_nkj2rfwZG(Ig9 z?uU--aeCH=@XGD4--!PU;=z;-RtrGO&qWIWEEkr|a3b}I4C%hGD|c^>^Tji4)RFi6 zhP9Rv*}0o46@Ry>NTs6tRMzRw|Jb&?8l)u#7F$F;St5*d3vNW;+DoIvxP-^kqkOp| z6n_MU5f&Zaya@IcXc*vckB#&u9JoD~b0YKfWz9h-r`HxcGAr`o5bC-t z16C7Si*(&ZqOh&FRw+jWM8$yMS%9R7pt}>yr{ooM(j{(Gq)T=IYrKb1iHwzYG0l2w zqrJ%eOY_N_Soo@$fb(J4iBcwBI$AJ-MXfWfxPm%$Eh|Fk7RE_f8><^E81h)B_Bl># zF)s}rS2}8^Z1|f+{t&>`ff}n9UT}r%Uc21;x?-1@zAf-nFXmEMgRaTx$U#_ke?2Qi zFsa5$$CjzYwpjU`g??F1qxWqAD>WL}B93TB_k%|?2;5Lvyky|Gxnrkc!#6%61?b>X zn5@OYbqsDm_>5%+-Xmsw0p*igHlzZtIff1OzX9n82uJqZ8-<@s`Xtmgi)bPj>5@%` zh&}#wUyx{-(p0t(m;f6W9j)Hm=#->CcOt7zYimbclULUbowDL=5W_!?pXg|6NND{) zM!+zAFN=-H)75Ci6F3wxcy z#A|;vgxZ|}PxLdW`B8RMo+>^i&p1s&2ac{d(V+ar<0_t9vV4fvo=~GqB@HmkXqlox zOG!OZVC`bW^-wVxPqqk2e)8KG=cGBh=B479)WW3FhU-~kg|j8v?}+M~4i7N>r+giQ z-~*|iH+7vCx4=Qk9bXBe@)V$H9rrRAg@@mxMcR0HPWifj4s1O5T7^;Vpcz~S&y@m< zOlL)Nw_lPA=gjiO|IEp%xaN9`JluhDOpwvo-%PC-{v9C+W#drk;|vunDsAd2P#Iv{ zl6LkGGc=XOGnB}X6kBt=OLdXUu}Y4Ao~c{x$BbEU8nX&lQ2k%3Y->O;91MJw@w!B% zWHTlH!r~7?OU3wgLp}q5fXtL7Or={Jy=z*iQA{;*=B(9Q9f=^|GDtP}Zm5HY)vea( z?ne%sQW4d~N$M7VHzV=g#1O&=!3r)urm5N{Fq`*!*Fi)Z9=U>bi8t{MxCi7J~A=qaW6smR4@(jlx(BhbBj3q42m&eZXZ=cf7HeuI6 zE}UR`336r{&0*2*Lm5xSh@hQ0rS9iemT0=E=51QoA*GXBHeda-Lp`Vn-1wPamIcY? z@N7i}wSv&3ZU}+Febl@~b$Ori%i;EFR;0J*q}!o}BiswB42o>yo!Jc;;rzQ-N-u-I zjSB^ac!@Ow+djzjdxLc>`b1Hk`Ehya#Z~zFhFeIT@riq-FQ-9k>Ydys3$o>_r4=?) z$GP_qL_pa5bmeL1zm*F~Lcm_MPhGW$EWJ4e4Q>Pk;+&O@&pY{xYPJ?{a{*| zhS`vAWNu0H!UhFMWlG7qB%V82_-(DbQ_v0r|L{DKjDA5Q>PG;4q<8O-SG%=$v^zUY zet+tUANOJMN(5RYVWDkelJ0yT$wT>#uakO74@x7zPFsZ zp>cpOUUaWP9s5UdjQTG$OPvX@+8B%MCI06ks#8cgIENS~PoTcGX$m_XR$$RmPZnU? z>KF)ahdnV6Grke(-dSY9=%->MBSVS*v9G8Y*-bz&ro^YfXZ%4>dx-hfvtK*n!M{D~UMOco*mS2jbqiLj1y9WdBSEDU;Ym2V=`9INe@g_*0axvgxb1FHzsU zS)9wKmCztFTF+-20aeGjX|fMlZlI|~u;=Ixm6Rec=((i%txB@U3sohhjD)i62gvVU m@8YEp(2E [... NPM ARGS] -// - -let timeout = process.argv[2] || process.env.NPM_INSTALL_TIMEOUT || 60000; -let attempts = process.argv[3] || 3; -let args = process.argv.slice(4); -if (args.length === 0) { - args = ['install']; -} - -(function npm() { - let timer; - args.push('--verbose'); - let proc = spawn('npm', args); - proc.stdout.pipe(process.stdout); - proc.stderr.pipe(process.stderr); - proc.stdin.end(); - proc.stdout.on('data', () => { - setTimer(); - }); - proc.stderr.on('data', () => { - setTimer(); - }); - - // side effect: this also restarts when npm exits with a bad code even if it - // didnt timeout - proc.on('close', (code, signal) => { - clearTimeout(timer); - if (code || signal) { - console.log('[npm-are-you-sleeping] npm exited with code ' + code + ''); - - if (--attempts) { - console.log('[npm-are-you-sleeping] restarting'); - npm(); - } else { - console.log('[npm-are-you-sleeping] i tried lots of times. giving up.'); - throw new Error("npm install fails"); - } - } - }); - - function setTimer() { - clearTimeout(timer); - timer = setTimeout(() => { - console.log('[npm-are-you-sleeping] killing npm with SIGTERM'); - proc.kill('SIGTERM'); - // wait a couple seconds - timer = setTimeout(() => { - // its it's still not closed sigkill - console.log('[npm-are-you-sleeping] killing npm with SIGKILL'); - proc.kill('SIGKILL'); - }, 2000); - }, timeout); - } -})(); From c6e12ccb0106f7c106e5ce346f36ac8c92a736f8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 11 Dec 2018 10:34:40 -0800 Subject: [PATCH 199/488] chore: update nyc and eslint configs (#182) --- packages/google-cloud-language/.eslintignore | 1 + packages/google-cloud-language/.nycrc | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/google-cloud-language/.eslintignore b/packages/google-cloud-language/.eslintignore index 2f642cb6044..f0c7aead4bf 100644 --- a/packages/google-cloud-language/.eslintignore +++ b/packages/google-cloud-language/.eslintignore @@ -1,3 +1,4 @@ **/node_modules src/**/doc/* build/ +docs/ diff --git a/packages/google-cloud-language/.nycrc b/packages/google-cloud-language/.nycrc index feb032400d4..88b001cb587 100644 --- a/packages/google-cloud-language/.nycrc +++ b/packages/google-cloud-language/.nycrc @@ -1,5 +1,6 @@ { "report-dir": "./.coverage", + "reporter": "lcov", "exclude": [ "src/*{/*,/**/*}.js", "src/*/v*/*.js", From 20500177f1f88bac3ef8838c1c6a0ab0b573404e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 21 Dec 2018 14:03:22 -0800 Subject: [PATCH 200/488] refactor: modernize the sample tests (#185) * refactor: modernize the sample tests * lintalicious --- .../samples/.eslintrc.yml | 1 + .../samples/package.json | 5 ++-- .../samples/quickstart.js | 6 ++--- .../samples/test/quickstart.test.js | 23 ++++++++----------- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/packages/google-cloud-language/samples/.eslintrc.yml b/packages/google-cloud-language/samples/.eslintrc.yml index 282535f55f6..0aa37ac630e 100644 --- a/packages/google-cloud-language/samples/.eslintrc.yml +++ b/packages/google-cloud-language/samples/.eslintrc.yml @@ -1,3 +1,4 @@ --- rules: no-console: off + node/no-missing-require: off diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 63c02e645a8..aa2c4cb28aa 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -12,7 +12,7 @@ "resources" ], "scripts": { - "test": "mocha" + "test": "mocha --timeout 60000" }, "dependencies": { "@google-cloud/automl": "^0.1.1", @@ -22,7 +22,8 @@ "yargs": "^12.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.0.0", + "chai": "^4.2.0", + "execa": "^1.0.0", "mocha": "^5.2.0", "uuid": "^3.2.1" } diff --git a/packages/google-cloud-language/samples/quickstart.js b/packages/google-cloud-language/samples/quickstart.js index eaae8c5ecc9..858c30b011a 100644 --- a/packages/google-cloud-language/samples/quickstart.js +++ b/packages/google-cloud-language/samples/quickstart.js @@ -16,7 +16,7 @@ 'use strict'; // [START language_quickstart] -async function main() { +async function quickstart() { // Imports the Google Cloud client library const language = require('@google-cloud/language'); @@ -39,6 +39,6 @@ async function main() { console.log(`Sentiment score: ${sentiment.score}`); console.log(`Sentiment magnitude: ${sentiment.magnitude}`); } - -main().catch(console.error); // [END language_quickstart] + +quickstart().catch(console.error); diff --git a/packages/google-cloud-language/samples/test/quickstart.test.js b/packages/google-cloud-language/samples/test/quickstart.test.js index 12dd4f193d7..e4fa6f8bd17 100644 --- a/packages/google-cloud-language/samples/test/quickstart.test.js +++ b/packages/google-cloud-language/samples/test/quickstart.test.js @@ -15,19 +15,14 @@ 'use strict'; -const path = require(`path`); -const assert = require('assert'); -const tools = require(`@google-cloud/nodejs-repo-tools`); +const {assert} = require('chai'); +const execa = require('execa'); -const cmd = `node quickstart.js`; -const cwd = path.join(__dirname, `..`); - -beforeEach(async () => tools.stubConsole); -afterEach(async () => tools.restoreConsole); - -it(`should analyze sentiment in text`, async () => { - const output = await tools.runAsync(cmd, cwd); - assert(RegExp('Text: Hello, world!').test(output)); - assert(RegExp('Sentiment score: ').test(output)); - assert(RegExp('Sentiment magnitude: ').test(output)); +describe('quickstart', () => { + it('should analyze sentiment in text', async () => { + const {stdout} = await execa.shell('node quickstart.js'); + assert(stdout, /Text: Hello, world!/); + assert(stdout, /Sentiment score: /); + assert(stdout, /Sentiment magnitude: /); + }); }); From 84463d95d0c3fffb1d418fe693193b5e198e2f14 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 4 Jan 2019 15:09:56 -0800 Subject: [PATCH 201/488] nit: reordered gRPC message types nit: reordered gRPC message types --- .../cloud/language/v1/doc_language_service.js | 158 +++++++++--------- .../language/v1beta2/doc_language_service.js | 158 +++++++++--------- packages/google-cloud-language/synth.metadata | 44 +++-- 3 files changed, 191 insertions(+), 169 deletions(-) diff --git a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js index 4800b74a832..777c426affa 100644 --- a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js @@ -320,85 +320,6 @@ const Sentiment = { const PartOfSpeech = { // This is for documentation. Actual contents will be loaded by gRPC. - /** - * The part of speech tags enum. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Tag: { - - /** - * Unknown - */ - UNKNOWN: 0, - - /** - * Adjective - */ - ADJ: 1, - - /** - * Adposition (preposition and postposition) - */ - ADP: 2, - - /** - * Adverb - */ - ADV: 3, - - /** - * Conjunction - */ - CONJ: 4, - - /** - * Determiner - */ - DET: 5, - - /** - * Noun (common and proper) - */ - NOUN: 6, - - /** - * Cardinal number - */ - NUM: 7, - - /** - * Pronoun - */ - PRON: 8, - - /** - * Particle or other function word - */ - PRT: 9, - - /** - * Punctuation - */ - PUNCT: 10, - - /** - * Verb (all tenses and modes) - */ - VERB: 11, - - /** - * Other: foreign words, typos, abbreviations - */ - X: 12, - - /** - * Affix - */ - AFFIX: 13 - }, - /** * The characteristic of a verb that expresses time flow during an event. * @@ -771,6 +692,85 @@ const PartOfSpeech = { NON_RECIPROCAL: 2 }, + /** + * The part of speech tags enum. + * + * @enum {number} + * @memberof google.cloud.language.v1 + */ + Tag: { + + /** + * Unknown + */ + UNKNOWN: 0, + + /** + * Adjective + */ + ADJ: 1, + + /** + * Adposition (preposition and postposition) + */ + ADP: 2, + + /** + * Adverb + */ + ADV: 3, + + /** + * Conjunction + */ + CONJ: 4, + + /** + * Determiner + */ + DET: 5, + + /** + * Noun (common and proper) + */ + NOUN: 6, + + /** + * Cardinal number + */ + NUM: 7, + + /** + * Pronoun + */ + PRON: 8, + + /** + * Particle or other function word + */ + PRT: 9, + + /** + * Punctuation + */ + PUNCT: 10, + + /** + * Verb (all tenses and modes) + */ + VERB: 11, + + /** + * Other: foreign words, typos, abbreviations + */ + X: 12, + + /** + * Affix + */ + AFFIX: 13 + }, + /** * Time reference. * diff --git a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js index ccf06a7244d..c9e0c85df02 100644 --- a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js +++ b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js @@ -318,85 +318,6 @@ const Sentiment = { const PartOfSpeech = { // This is for documentation. Actual contents will be loaded by gRPC. - /** - * The part of speech tags enum. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Tag: { - - /** - * Unknown - */ - UNKNOWN: 0, - - /** - * Adjective - */ - ADJ: 1, - - /** - * Adposition (preposition and postposition) - */ - ADP: 2, - - /** - * Adverb - */ - ADV: 3, - - /** - * Conjunction - */ - CONJ: 4, - - /** - * Determiner - */ - DET: 5, - - /** - * Noun (common and proper) - */ - NOUN: 6, - - /** - * Cardinal number - */ - NUM: 7, - - /** - * Pronoun - */ - PRON: 8, - - /** - * Particle or other function word - */ - PRT: 9, - - /** - * Punctuation - */ - PUNCT: 10, - - /** - * Verb (all tenses and modes) - */ - VERB: 11, - - /** - * Other: foreign words, typos, abbreviations - */ - X: 12, - - /** - * Affix - */ - AFFIX: 13 - }, - /** * The characteristic of a verb that expresses time flow during an event. * @@ -769,6 +690,85 @@ const PartOfSpeech = { NON_RECIPROCAL: 2 }, + /** + * The part of speech tags enum. + * + * @enum {number} + * @memberof google.cloud.language.v1beta2 + */ + Tag: { + + /** + * Unknown + */ + UNKNOWN: 0, + + /** + * Adjective + */ + ADJ: 1, + + /** + * Adposition (preposition and postposition) + */ + ADP: 2, + + /** + * Adverb + */ + ADV: 3, + + /** + * Conjunction + */ + CONJ: 4, + + /** + * Determiner + */ + DET: 5, + + /** + * Noun (common and proper) + */ + NOUN: 6, + + /** + * Cardinal number + */ + NUM: 7, + + /** + * Pronoun + */ + PRON: 8, + + /** + * Particle or other function word + */ + PRT: 9, + + /** + * Punctuation + */ + PUNCT: 10, + + /** + * Verb (all tenses and modes) + */ + VERB: 11, + + /** + * Other: foreign words, typos, abbreviations + */ + X: 12, + + /** + * Affix + */ + AFFIX: 13 + }, + /** * Time reference. * diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index f26e69af884..0636fdbb2cd 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,26 +1,48 @@ { + "updateTime": "2019-01-03T17:51:15.328736Z", "sources": [ + { + "generator": { + "name": "artman", + "version": "0.16.4", + "dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857" + } + }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5a57f0c13a358b2b15452bf2d67453774a5f6d4f", - "internalRef": "221837528" + "sha": "2a5caab4315cb5ab3d5c97c90c6d4e9441052b16", + "internalRef": "227195651" } }, { - "git": { - "name": "googleapis-private", - "remote": "https://github.com/googleapis/googleapis-private.git", - "sha": "6aa8e1a447bb8d0367150356a28cb4d3f2332641", - "internalRef": "221340946" + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2018.12.6" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "language", + "apiVersion": "v1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/language/artman_language_v1.yaml" } }, { - "generator": { - "name": "artman", - "version": "0.16.0", - "dockerImage": "googleapis/artman@sha256:90f9d15e9bad675aeecd586725bce48f5667ffe7d5fc4d1e96d51ff34304815b" + "client": { + "source": "googleapis", + "apiName": "language", + "apiVersion": "v1beta2", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/language/artman_language_v1beta2.yaml" } } ] From 0c2b006a87aecfed0f4c156c1f2a9365b5715e4e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 14 Jan 2019 11:45:33 -0800 Subject: [PATCH 202/488] fix(deps): update dependency google-gax to ^0.23.0 (#189) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 413865fceae..aa5f2cb31bf 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -41,7 +41,7 @@ "fix": "eslint --fix '**/*.js'" }, "dependencies": { - "google-gax": "^0.22.0", + "google-gax": "^0.23.0", "lodash.merge": "^4.6.1" }, "devDependencies": { From 1ed95f8cfa69c94c53857670d08840d780965866 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 14 Jan 2019 18:30:21 -0800 Subject: [PATCH 203/488] build: check broken links in generated docs (#187) * build: check dead links on Kokoro * recursive crawl local links --- packages/google-cloud-language/.jsdoc.js | 2 +- packages/google-cloud-language/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index 0e95c7cbd1d..dcafb9d64d5 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -20,7 +20,7 @@ module.exports = { opts: { readme: './README.md', package: './package.json', - template: './node_modules/ink-docstrap/template', + template: './node_modules/jsdoc-baseline', recurse: true, verbose: true, destination: './docs/' diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index aa5f2cb31bf..47957e1e08e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -51,7 +51,7 @@ "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", - "ink-docstrap": "^1.3.2", + "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.2.0", From c4cba0e8c9206a0ef5790be3da8bfc77b0bfc73f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 17 Jan 2019 06:38:23 -0800 Subject: [PATCH 204/488] chore: sync gapic files --- .../smoke-test/language_service_smoke_test.js | 2 +- .../google/cloud/language/v1/doc_language_service.js | 2 +- packages/google-cloud-language/src/v1/index.js | 2 +- .../src/v1/language_service_client.js | 2 +- .../cloud/language/v1beta2/doc_language_service.js | 2 +- packages/google-cloud-language/src/v1beta2/index.js | 2 +- .../src/v1beta2/language_service_client.js | 2 +- packages/google-cloud-language/synth.metadata | 12 ++++++------ packages/google-cloud-language/test/gapic-v1.js | 2 +- packages/google-cloud-language/test/gapic-v1beta2.js | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js index 2a3d5f7e2dd..50f18735062 100644 --- a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js +++ b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js index 777c426affa..5c7ccad9447 100644 --- a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1/index.js b/packages/google-cloud-language/src/v1/index.js index d46e29acca5..5b03a4daa9e 100644 --- a/packages/google-cloud-language/src/v1/index.js +++ b/packages/google-cloud-language/src/v1/index.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index bb988b69079..7ad9169fead 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js index c9e0c85df02..996bd5a89f6 100644 --- a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js +++ b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1beta2/index.js b/packages/google-cloud-language/src/v1beta2/index.js index d46e29acca5..5b03a4daa9e 100644 --- a/packages/google-cloud-language/src/v1beta2/index.js +++ b/packages/google-cloud-language/src/v1beta2/index.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 8f15b038512..52da1e6e182 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 0636fdbb2cd..3df5807e4b4 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-01-03T17:51:15.328736Z", + "updateTime": "2019-01-17T12:53:21.843626Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.4", - "dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857" + "version": "0.16.6", + "dockerImage": "googleapis/artman@sha256:12722f2ca3fbc3b53cc6aa5f0e569d7d221b46bd876a2136497089dec5e3634e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2a5caab4315cb5ab3d5c97c90c6d4e9441052b16", - "internalRef": "227195651" + "sha": "0ac60e21a1aa86c07c1836865b35308ba8178b05", + "internalRef": "229626798" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2018.12.6" + "version": "2019.1.16" } } ], diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js index d68be1a6fe7..853c9753c6e 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-v1beta2.js index 59535945504..d6ab5151c4a 100644 --- a/packages/google-cloud-language/test/gapic-v1beta2.js +++ b/packages/google-cloud-language/test/gapic-v1beta2.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 4cf50850712940c01b674d9d61f31b8a9a6462ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 25 Jan 2019 09:51:18 -0800 Subject: [PATCH 205/488] fix(deps): update dependency google-gax to ^0.24.0 (#193) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 47957e1e08e..8d2f847b80e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -41,7 +41,7 @@ "fix": "eslint --fix '**/*.js'" }, "dependencies": { - "google-gax": "^0.23.0", + "google-gax": "^0.24.0", "lodash.merge": "^4.6.1" }, "devDependencies": { From 8b1d6d9acfb866b0803baf886941cc04c04a1ea8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 26 Jan 2019 12:53:02 -0500 Subject: [PATCH 206/488] chore(deps): update dependency eslint-config-prettier to v4 (#194) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 8d2f847b80e..c18c26749ac 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -48,7 +48,7 @@ "@google-cloud/nodejs-repo-tools": "^3.0.0", "codecov": "^3.0.2", "eslint": "^5.0.0", - "eslint-config-prettier": "^3.0.0", + "eslint-config-prettier": "^4.0.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", From b83210808200ba25c7ef7328431b595424160312 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 30 Jan 2019 12:19:11 -0800 Subject: [PATCH 207/488] fix(deps): update dependency google-gax to ^0.25.0 (#195) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index c18c26749ac..3dd3ba36cb8 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -41,7 +41,7 @@ "fix": "eslint --fix '**/*.js'" }, "dependencies": { - "google-gax": "^0.24.0", + "google-gax": "^0.25.0", "lodash.merge": "^4.6.1" }, "devDependencies": { From d7960095287e951a263e5f4eca24ec1389c4b8ca Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 1 Feb 2019 10:33:51 -0800 Subject: [PATCH 208/488] Release v2.0.1 (#196) --- packages/google-cloud-language/CHANGELOG.md | 53 +++++++++++++++++++ packages/google-cloud-language/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index ed18fe23fca..d56069e2ea7 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,59 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## v2.0.1 + +01-31-2019 23:11 PST + +### Implementation Changes +- refactor: reordered gRPC message types + +### Dependencies +- fix(deps): update dependency google-gax to ^0.25.0 ([#195](https://github.com/googleapis/nodejs-language/pull/195)) +- fix(deps): update dependency google-gax to ^0.24.0 ([#193](https://github.com/googleapis/nodejs-language/pull/193)) +- fix(deps): update dependency google-gax to ^0.23.0 ([#189](https://github.com/googleapis/nodejs-language/pull/189)) +- fix(deps): update dependency google-gax to ^0.22.0 ([#162](https://github.com/googleapis/nodejs-language/pull/162)) + +### Documentation +- docs: update the readme ([#172](https://github.com/googleapis/nodejs-language/pull/172)) +- docs: update readme badges ([#171](https://github.com/googleapis/nodejs-language/pull/171)) +- docs(samples): updated samples code to use async await ([#154](https://github.com/googleapis/nodejs-language/pull/154)) +- Language Automl samples ([#126](https://github.com/googleapis/nodejs-language/pull/126)) + +### Internal / Testing Changes +- chore(deps): update dependency eslint-config-prettier to v4 ([#194](https://github.com/googleapis/nodejs-language/pull/194)) +- build: ignore googleapis.com in doc link check ([#192](https://github.com/googleapis/nodejs-language/pull/192)) +- chore: sync gapic files +- build: check broken links in generated docs ([#187](https://github.com/googleapis/nodejs-language/pull/187)) +- refactor: modernize the sample tests ([#185](https://github.com/googleapis/nodejs-language/pull/185)) +- chore(build): inject yoshi automation key ([#183](https://github.com/googleapis/nodejs-language/pull/183)) +- chore: update nyc and eslint configs ([#182](https://github.com/googleapis/nodejs-language/pull/182)) +- chore: fix publish.sh permission +x ([#180](https://github.com/googleapis/nodejs-language/pull/180)) +- fix(build): fix Kokoro release script ([#179](https://github.com/googleapis/nodejs-language/pull/179)) +- build: add Kokoro configs for autorelease ([#178](https://github.com/googleapis/nodejs-language/pull/178)) +- chore: always nyc report before calling codecov ([#175](https://github.com/googleapis/nodejs-language/pull/175)) +- chore: nyc ignore build/test by default ([#174](https://github.com/googleapis/nodejs-language/pull/174)) +- fix(build): fix system key decryption ([#169](https://github.com/googleapis/nodejs-language/pull/169)) +- chore: add synth.metadata +- chore: update eslintignore config ([#161](https://github.com/googleapis/nodejs-language/pull/161)) +- chore(deps): update @google-cloud/nodejs-repo-tools to v3 ([#160](https://github.com/googleapis/nodejs-language/pull/160)) +- chore: udpate lint configs ([#158](https://github.com/googleapis/nodejs-language/pull/158)) +- chore: drop contributors from multiple places ([#159](https://github.com/googleapis/nodejs-language/pull/159)) +- chore: use latest npm on Windows ([#156](https://github.com/googleapis/nodejs-language/pull/156)) +- chore: update CircleCI config ([#155](https://github.com/googleapis/nodejs-language/pull/155)) +- chore: include build in eslintignore ([#151](https://github.com/googleapis/nodejs-language/pull/151)) +- chore(deps): update dependency eslint-plugin-node to v8 ([#147](https://github.com/googleapis/nodejs-language/pull/147)) +- chore: update issue templates ([#146](https://github.com/googleapis/nodejs-language/pull/146)) +- chore: remove old issue template ([#144](https://github.com/googleapis/nodejs-language/pull/144)) +- build: run tests on node11 ([#143](https://github.com/googleapis/nodejs-language/pull/143)) +- chores(build): do not collect sponge.xml from windows builds ([#142](https://github.com/googleapis/nodejs-language/pull/142)) +- chores(build): run codecov on continuous builds ([#141](https://github.com/googleapis/nodejs-language/pull/141)) +- chore: update new issue template ([#140](https://github.com/googleapis/nodejs-language/pull/140)) +- chore(deps): update dependency sinon to v7 ([#134](https://github.com/googleapis/nodejs-language/pull/134)) +- build: fix codecov uploading on Kokoro ([#135](https://github.com/googleapis/nodejs-language/pull/135)) +- Update kokoro config ([#132](https://github.com/googleapis/nodejs-language/pull/132)) +- chore(deps): update dependency eslint-plugin-prettier to v3 ([#131](https://github.com/googleapis/nodejs-language/pull/131)) + ## v2.0.0 ### Breaking changes diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 3dd3ba36cb8..2c456dd3045 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "2.0.0", + "version": "2.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index aa2c4cb28aa..d2992e402fb 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^0.1.1", "mathjs": "^5.1.0", - "@google-cloud/language": "^2.0.0", + "@google-cloud/language": "^2.0.1", "@google-cloud/storage": "^2.0.0", "yargs": "^12.0.0" }, From 3932e438aa3ec408f01821632d2930656ea3233a Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 7 Feb 2019 15:39:22 -0800 Subject: [PATCH 209/488] chore: move CONTRIBUTING.md to root (#199) --- .../google-cloud-language/CONTRIBUTING.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 packages/google-cloud-language/CONTRIBUTING.md diff --git a/packages/google-cloud-language/CONTRIBUTING.md b/packages/google-cloud-language/CONTRIBUTING.md new file mode 100644 index 00000000000..b958f235007 --- /dev/null +++ b/packages/google-cloud-language/CONTRIBUTING.md @@ -0,0 +1,57 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA] + (https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA] + (https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Submit a pull request. + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + npm test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup From 0b02d6864bdc801b4fc8fa2aed6cacbc340d3ec8 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 7 Feb 2019 18:47:14 -0800 Subject: [PATCH 210/488] docs: update contributing path in README (#200) --- packages/google-cloud-language/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index d0c83b9d4be..6759d89111d 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -95,7 +95,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-language/blob/master/.github/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-language/blob/master/CONTRIBUTING.md). ## License From 4b2a25f0ee60d65081e9dcb51fd23d5ce8e6258e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 10 Feb 2019 20:53:44 -0800 Subject: [PATCH 211/488] build: create docs test npm scripts (#202) --- packages/google-cloud-language/package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 2c456dd3045..071c95912b5 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -38,7 +38,9 @@ "system-test": "mocha system-test/*.js --timeout 600000", "test-no-cover": "mocha test/*.js", "test": "npm run cover", - "fix": "eslint --fix '**/*.js'" + "fix": "eslint --fix '**/*.js'", + "docs-test": "blcl docs -r --exclude www.googleapis.com", + "predocs-test": "npm run docs" }, "dependencies": { "google-gax": "^0.25.0", @@ -57,6 +59,7 @@ "mocha": "^5.2.0", "nyc": "^13.0.0", "power-assert": "^1.6.0", - "prettier": "^1.13.5" + "prettier": "^1.13.5", + "broken-link-checker-local": "^0.2.0" } } From c30f0957a6b00faed4a55fe8f80099ddd517f7fc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 12 Feb 2019 12:07:42 -0500 Subject: [PATCH 212/488] fix(deps): update dependency yargs to v13 (#203) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index d2992e402fb..a95b499f9c7 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -19,7 +19,7 @@ "mathjs": "^5.1.0", "@google-cloud/language": "^2.0.1", "@google-cloud/storage": "^2.0.0", - "yargs": "^12.0.0" + "yargs": "^13.0.0" }, "devDependencies": { "chai": "^4.2.0", From 3a83e3d644d76c3293eda3add39f9cb66d2751b1 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Feb 2019 08:49:31 -0800 Subject: [PATCH 213/488] docs: update links in contrib guide (#206) --- packages/google-cloud-language/CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/CONTRIBUTING.md b/packages/google-cloud-language/CONTRIBUTING.md index b958f235007..78aaa61b269 100644 --- a/packages/google-cloud-language/CONTRIBUTING.md +++ b/packages/google-cloud-language/CONTRIBUTING.md @@ -16,11 +16,9 @@ Please fill out either the individual or corporate Contributor License Agreement (CLA). * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual CLA] - (https://developers.google.com/open-source/cla/individual). + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA] - (https://developers.google.com/open-source/cla/corporate). + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to From 416a6df64c00becbf7cd9111c97081f98424c734 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Feb 2019 12:22:15 -0800 Subject: [PATCH 214/488] build: use linkinator for docs test (#205) --- packages/google-cloud-language/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 071c95912b5..3c30b7f9c03 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -39,7 +39,7 @@ "test-no-cover": "mocha test/*.js", "test": "npm run cover", "fix": "eslint --fix '**/*.js'", - "docs-test": "blcl docs -r --exclude www.googleapis.com", + "docs-test": "linkinator docs -r --skip www.googleapis.com", "predocs-test": "npm run docs" }, "dependencies": { @@ -60,6 +60,6 @@ "nyc": "^13.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.5", - "broken-link-checker-local": "^0.2.0" + "linkinator": "^1.1.2" } } From 3d06bd0c3758bcd99ddbcf958aa4ea98ce0bf914 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 14 Feb 2019 14:30:50 -0800 Subject: [PATCH 215/488] fix: throw on invalid credentials (#204) --- .../src/v1/language_service_client.js | 4 ++++ .../src/v1beta2/language_service_client.js | 4 ++++ packages/google-cloud-language/synth.metadata | 10 +++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 7ad9169fead..429ec619405 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -134,6 +134,10 @@ class LanguageServiceClient { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 52da1e6e182..7a0990fe08d 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -134,6 +134,10 @@ class LanguageServiceClient { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 3df5807e4b4..09e3e0586ac 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-01-17T12:53:21.843626Z", + "updateTime": "2019-02-13T12:18:41.370289Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.6", - "dockerImage": "googleapis/artman@sha256:12722f2ca3fbc3b53cc6aa5f0e569d7d221b46bd876a2136497089dec5e3634e" + "version": "0.16.13", + "dockerImage": "googleapis/artman@sha256:5fd9aee1d82a00cebf425c8fa431f5457539562f5867ad9c54370f0ec9a7ccaa" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0ac60e21a1aa86c07c1836865b35308ba8178b05", - "internalRef": "229626798" + "sha": "ca61898878f0926dd9dcc68ba90764f17133efe4", + "internalRef": "233680013" } }, { From 917f83d98838573bed09b0d562fb354f092c464e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 19 Feb 2019 15:41:45 -0500 Subject: [PATCH 216/488] chore(deps): update dependency mocha to v6 (#207) --- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 3c30b7f9c03..fedd97e1950 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -56,7 +56,7 @@ "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^5.2.0", + "mocha": "^6.0.0", "nyc": "^13.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.5", diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index a95b499f9c7..fc3061669f6 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -24,7 +24,7 @@ "devDependencies": { "chai": "^4.2.0", "execa": "^1.0.0", - "mocha": "^5.2.0", + "mocha": "^6.0.0", "uuid": "^3.2.1" } } From 1d761d45ebbcbd5afd337313789bd3f7260986f4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 1 Mar 2019 08:56:34 -0800 Subject: [PATCH 217/488] docs: update comments on protos (#208) --- .../cloud/language/v1/language_service.proto | 81 +++++++++++++------ .../language/v1beta2/language_service.proto | 81 +++++++++++++------ .../cloud/language/v1/doc_language_service.js | 35 ++++---- .../src/v1/language_service_client.js | 6 +- .../language/v1beta2/doc_language_service.js | 35 ++++---- .../src/v1beta2/language_service_client.js | 6 +- packages/google-cloud-language/synth.metadata | 12 +-- 7 files changed, 166 insertions(+), 90 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index 6895b0d82d4..f9893385ffc 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -23,44 +23,66 @@ option java_multiple_files = true; option java_outer_classname = "LanguageServiceProto"; option java_package = "com.google.cloud.language.v1"; - // Provides text analysis operations such as sentiment analysis and entity // recognition. service LanguageService { // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { - option (google.api.http) = { post: "/v1/documents:analyzeSentiment" body: "*" }; + rpc AnalyzeSentiment(AnalyzeSentimentRequest) + returns (AnalyzeSentimentResponse) { + option (google.api.http) = { + post: "/v1/documents:analyzeSentiment" + body: "*" + }; } // Finds named entities (currently proper names and common nouns) in the text // along with entity types, salience, mentions for each entity, and // other properties. - rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { - option (google.api.http) = { post: "/v1/documents:analyzeEntities" body: "*" }; + rpc AnalyzeEntities(AnalyzeEntitiesRequest) + returns (AnalyzeEntitiesResponse) { + option (google.api.http) = { + post: "/v1/documents:analyzeEntities" + body: "*" + }; } - // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes - // sentiment associated with each entity and its mentions. - rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { - option (google.api.http) = { post: "/v1/documents:analyzeEntitySentiment" body: "*" }; + // Finds entities, similar to + // [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] + // in the text and analyzes sentiment associated with each entity and its + // mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) + returns (AnalyzeEntitySentimentResponse) { + option (google.api.http) = { + post: "/v1/documents:analyzeEntitySentiment" + body: "*" + }; } // Analyzes the syntax of the text and provides sentence boundaries and // tokenization along with part of speech tags, dependency trees, and other // properties. rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) { - option (google.api.http) = { post: "/v1/documents:analyzeSyntax" body: "*" }; + option (google.api.http) = { + post: "/v1/documents:analyzeSyntax" + body: "*" + }; } // Classifies a document into categories. rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) { - option (google.api.http) = { post: "/v1/documents:classifyText" body: "*" }; + option (google.api.http) = { + post: "/v1/documents:classifyText" + body: "*" + }; } // A convenience method that provides all the features that analyzeSentiment, // analyzeEntities, and analyzeSyntax provide in one call. rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) { - option (google.api.http) = { post: "/v1/documents:annotateText" body: "*" }; + option (google.api.http) = { + post: "/v1/documents:annotateText" + body: "*" + }; } } @@ -114,8 +136,8 @@ message Sentence { TextSpan text = 1; // For calls to [AnalyzeSentiment][] or if - // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to - // true, this field will contain the sentiment for the sentence. + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] + // is set to true, this field will contain the sentiment for the sentence. Sentiment sentiment = 2; } @@ -175,9 +197,9 @@ message Entity { repeated EntityMention mentions = 5; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - // true, this field will contain the aggregate sentiment expressed for this - // entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] + // is set to true, this field will contain the aggregate sentiment expressed + // for this entity in the provided document. Sentiment sentiment = 6; } @@ -828,9 +850,9 @@ message EntityMention { Type type = 2; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - // true, this field will contain the sentiment expressed for this mention of - // the entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] + // is set to true, this field will contain the sentiment expressed for this + // mention of the entity in the provided document. Sentiment sentiment = 3; } @@ -840,7 +862,9 @@ message TextSpan { string content = 1; // The API calculates the beginning offset of the content in the original - // document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. + // document according to the + // [EncodingType][google.cloud.language.v1.EncodingType] specified in the API + // request. int32 begin_offset = 2; } @@ -870,7 +894,8 @@ message AnalyzeSentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 2; // The sentiment for all the sentences in the document. @@ -893,7 +918,8 @@ message AnalyzeEntitySentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 2; } @@ -913,7 +939,8 @@ message AnalyzeEntitiesResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 2; } @@ -936,7 +963,8 @@ message AnalyzeSyntaxResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 3; } @@ -1006,7 +1034,8 @@ message AnnotateTextResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 5; // Categories identified in the input document. diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto index 54c6638cd88..0263be04aed 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -26,44 +26,66 @@ option java_multiple_files = true; option java_outer_classname = "LanguageServiceProto"; option java_package = "com.google.cloud.language.v1beta2"; - // Provides text analysis operations such as sentiment analysis and entity // recognition. service LanguageService { // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { - option (google.api.http) = { post: "/v1beta2/documents:analyzeSentiment" body: "*" }; + rpc AnalyzeSentiment(AnalyzeSentimentRequest) + returns (AnalyzeSentimentResponse) { + option (google.api.http) = { + post: "/v1beta2/documents:analyzeSentiment" + body: "*" + }; } // Finds named entities (currently proper names and common nouns) in the text // along with entity types, salience, mentions for each entity, and // other properties. - rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { - option (google.api.http) = { post: "/v1beta2/documents:analyzeEntities" body: "*" }; + rpc AnalyzeEntities(AnalyzeEntitiesRequest) + returns (AnalyzeEntitiesResponse) { + option (google.api.http) = { + post: "/v1beta2/documents:analyzeEntities" + body: "*" + }; } - // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes - // sentiment associated with each entity and its mentions. - rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { - option (google.api.http) = { post: "/v1beta2/documents:analyzeEntitySentiment" body: "*" }; + // Finds entities, similar to + // [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] + // in the text and analyzes sentiment associated with each entity and its + // mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) + returns (AnalyzeEntitySentimentResponse) { + option (google.api.http) = { + post: "/v1beta2/documents:analyzeEntitySentiment" + body: "*" + }; } // Analyzes the syntax of the text and provides sentence boundaries and // tokenization along with part of speech tags, dependency trees, and other // properties. rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) { - option (google.api.http) = { post: "/v1beta2/documents:analyzeSyntax" body: "*" }; + option (google.api.http) = { + post: "/v1beta2/documents:analyzeSyntax" + body: "*" + }; } // Classifies a document into categories. rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) { - option (google.api.http) = { post: "/v1beta2/documents:classifyText" body: "*" }; + option (google.api.http) = { + post: "/v1beta2/documents:classifyText" + body: "*" + }; } // A convenience method that provides all syntax, sentiment, entity, and // classification features in one call. rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) { - option (google.api.http) = { post: "/v1beta2/documents:annotateText" body: "*" }; + option (google.api.http) = { + post: "/v1beta2/documents:annotateText" + body: "*" + }; } } @@ -117,8 +139,8 @@ message Sentence { TextSpan text = 1; // For calls to [AnalyzeSentiment][] or if - // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to - // true, this field will contain the sentiment for the sentence. + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] + // is set to true, this field will contain the sentiment for the sentence. Sentiment sentiment = 2; } @@ -178,9 +200,9 @@ message Entity { repeated EntityMention mentions = 5; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - // true, this field will contain the aggregate sentiment expressed for this - // entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] + // is set to true, this field will contain the aggregate sentiment expressed + // for this entity in the provided document. Sentiment sentiment = 6; } @@ -827,9 +849,9 @@ message EntityMention { Type type = 2; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - // true, this field will contain the sentiment expressed for this mention of - // the entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] + // is set to true, this field will contain the sentiment expressed for this + // mention of the entity in the provided document. Sentiment sentiment = 3; } @@ -839,7 +861,9 @@ message TextSpan { string content = 1; // The API calculates the beginning offset of the content in the original - // document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. + // document according to the + // [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the + // API request. int32 begin_offset = 2; } @@ -870,7 +894,8 @@ message AnalyzeSentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] + // field for more details. string language = 2; // The sentiment for all the sentences in the document. @@ -893,7 +918,8 @@ message AnalyzeEntitySentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] + // field for more details. string language = 2; } @@ -913,7 +939,8 @@ message AnalyzeEntitiesResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] + // field for more details. string language = 2; } @@ -936,7 +963,8 @@ message AnalyzeSyntaxResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] + // field for more details. string language = 3; } @@ -1006,7 +1034,8 @@ message AnnotateTextResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] + // field for more details. string language = 5; // Categories identified in the input document. diff --git a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js index 5c7ccad9447..ac2a0f21e3b 100644 --- a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js @@ -87,8 +87,8 @@ const Document = { * * @property {Object} sentiment * For calls to AnalyzeSentiment or if - * AnnotateTextRequest.Features.extract_document_sentiment is set to - * true, this field will contain the sentiment for the sentence. + * AnnotateTextRequest.Features.extract_document_sentiment + * is set to true, this field will contain the sentiment for the sentence. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * @@ -135,9 +135,9 @@ const Sentence = { * * @property {Object} sentiment * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. + * AnnotateTextRequest.Features.extract_entity_sentiment + * is set to true, this field will contain the aggregate sentiment expressed + * for this entity in the provided document. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * @@ -1311,9 +1311,9 @@ const DependencyEdge = { * * @property {Object} sentiment * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. + * AnnotateTextRequest.Features.extract_entity_sentiment + * is set to true, this field will contain the sentiment expressed for this + * mention of the entity in the provided document. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * @@ -1357,7 +1357,9 @@ const EntityMention = { * * @property {number} beginOffset * The API calculates the beginning offset of the content in the original - * document according to the EncodingType specified in the API request. + * document according to the + * EncodingType specified in the API + * request. * * @typedef TextSpan * @memberof google.cloud.language.v1 @@ -1417,7 +1419,8 @@ const AnalyzeSentimentRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language field + * for more details. * * @property {Object[]} sentences * The sentiment for all the sentences in the document. @@ -1464,7 +1467,8 @@ const AnalyzeEntitySentimentRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language field + * for more details. * * @typedef AnalyzeEntitySentimentResponse * @memberof google.cloud.language.v1 @@ -1506,7 +1510,8 @@ const AnalyzeEntitiesRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language field + * for more details. * * @typedef AnalyzeEntitiesResponse * @memberof google.cloud.language.v1 @@ -1553,7 +1558,8 @@ const AnalyzeSyntaxRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language field + * for more details. * * @typedef AnalyzeSyntaxResponse * @memberof google.cloud.language.v1 @@ -1681,7 +1687,8 @@ const AnnotateTextRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language field + * for more details. * * @property {Object[]} categories * Categories identified in the input document. diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 429ec619405..2da332ec5cf 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -288,8 +288,10 @@ class LanguageServiceClient { } /** - * Finds entities, similar to AnalyzeEntities in the text and analyzes - * sentiment associated with each entity and its mentions. + * Finds entities, similar to + * AnalyzeEntities + * in the text and analyzes sentiment associated with each entity and its + * mentions. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js index 996bd5a89f6..522c395332a 100644 --- a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js +++ b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js @@ -87,8 +87,8 @@ const Document = { * * @property {Object} sentiment * For calls to AnalyzeSentiment or if - * AnnotateTextRequest.Features.extract_document_sentiment is set to - * true, this field will contain the sentiment for the sentence. + * AnnotateTextRequest.Features.extract_document_sentiment + * is set to true, this field will contain the sentiment for the sentence. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * @@ -135,9 +135,9 @@ const Sentence = { * * @property {Object} sentiment * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. + * AnnotateTextRequest.Features.extract_entity_sentiment + * is set to true, this field will contain the aggregate sentiment expressed + * for this entity in the provided document. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * @@ -1307,9 +1307,9 @@ const DependencyEdge = { * * @property {Object} sentiment * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. + * AnnotateTextRequest.Features.extract_entity_sentiment + * is set to true, this field will contain the sentiment expressed for this + * mention of the entity in the provided document. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * @@ -1353,7 +1353,9 @@ const EntityMention = { * * @property {number} beginOffset * The API calculates the beginning offset of the content in the original - * document according to the EncodingType specified in the API request. + * document according to the + * EncodingType specified in the + * API request. * * @typedef TextSpan * @memberof google.cloud.language.v1beta2 @@ -1414,7 +1416,8 @@ const AnalyzeSentimentRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language + * field for more details. * * @property {Object[]} sentences * The sentiment for all the sentences in the document. @@ -1461,7 +1464,8 @@ const AnalyzeEntitySentimentRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language + * field for more details. * * @typedef AnalyzeEntitySentimentResponse * @memberof google.cloud.language.v1beta2 @@ -1503,7 +1507,8 @@ const AnalyzeEntitiesRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language + * field for more details. * * @typedef AnalyzeEntitiesResponse * @memberof google.cloud.language.v1beta2 @@ -1550,7 +1555,8 @@ const AnalyzeSyntaxRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language + * field for more details. * * @typedef AnalyzeSyntaxResponse * @memberof google.cloud.language.v1beta2 @@ -1678,7 +1684,8 @@ const AnnotateTextRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. + * See Document.language + * field for more details. * * @property {Object[]} categories * Categories identified in the input document. diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 7a0990fe08d..0289a173342 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -289,8 +289,10 @@ class LanguageServiceClient { } /** - * Finds entities, similar to AnalyzeEntities in the text and analyzes - * sentiment associated with each entity and its mentions. + * Finds entities, similar to + * AnalyzeEntities + * in the text and analyzes sentiment associated with each entity and its + * mentions. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 09e3e0586ac..96449b0f609 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-02-13T12:18:41.370289Z", + "updateTime": "2019-03-01T12:15:10.730781Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.13", - "dockerImage": "googleapis/artman@sha256:5fd9aee1d82a00cebf425c8fa431f5457539562f5867ad9c54370f0ec9a7ccaa" + "version": "0.16.14", + "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ca61898878f0926dd9dcc68ba90764f17133efe4", - "internalRef": "233680013" + "sha": "41d72d444fbe445f4da89e13be02078734fb7875", + "internalRef": "236230004" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.1.16" + "version": "2019.2.26" } } ], From 920febbd94d89ce66e558f584ea01f2b490a25f1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 5 Mar 2019 05:40:07 -0800 Subject: [PATCH 218/488] build: update release configuration This PR was generated using Autosynth. :rainbow: Here's the log from Synthtool: ``` synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. synthtool > Ensuring dependencies. synthtool > Pulling artman image. latest: Pulling from googleapis/artman Digest: sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7 Status: Image is up to date for googleapis/artman:latest synthtool > Cloning googleapis. synthtool > Running generator for google/cloud/language/artman_language_v1.yaml. synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/language-v1. synthtool > Running generator for google/cloud/language/artman_language_v1beta2.yaml. synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/language-v1beta2. .eslintignore .eslintrc.yml .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .jsdoc.js .kokoro/common.cfg .kokoro/continuous/node10/common.cfg .kokoro/continuous/node10/test.cfg .kokoro/continuous/node11/common.cfg .kokoro/continuous/node11/test.cfg .kokoro/continuous/node6/common.cfg .kokoro/continuous/node6/test.cfg .kokoro/continuous/node8/common.cfg .kokoro/continuous/node8/docs.cfg .kokoro/continuous/node8/lint.cfg .kokoro/continuous/node8/samples-test.cfg .kokoro/continuous/node8/system-test-grpcjs.cfg .kokoro/continuous/node8/system-test.cfg .kokoro/continuous/node8/test.cfg .kokoro/docs.sh .kokoro/lint.sh .kokoro/presubmit/node10/common.cfg .kokoro/presubmit/node10/test.cfg .kokoro/presubmit/node11/common.cfg .kokoro/presubmit/node11/test.cfg .kokoro/presubmit/node6/common.cfg .kokoro/presubmit/node6/test.cfg .kokoro/presubmit/node8/common.cfg .kokoro/presubmit/node8/docs.cfg .kokoro/presubmit/node8/lint.cfg .kokoro/presubmit/node8/samples-test.cfg .kokoro/presubmit/node8/system-test-grpcjs.cfg .kokoro/presubmit/node8/system-test.cfg .kokoro/presubmit/node8/test.cfg .kokoro/presubmit/windows/common.cfg .kokoro/presubmit/windows/test.cfg .kokoro/publish.sh .kokoro/release/publish.cfg .kokoro/samples-test.sh .kokoro/system-test.sh .kokoro/test.bat .kokoro/test.sh .kokoro/trampoline.sh .nycrc .prettierignore .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE codecov.yaml renovate.json > grpc@1.19.0 install /tmpfs/src/git/autosynth/working_repo/node_modules/grpc > node-pre-gyp install --fallback-to-build --library=static_library node-pre-gyp WARN Using needle for node-pre-gyp https download [grpc] Success: "/tmpfs/src/git/autosynth/working_repo/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node" is installed via remote > protobufjs@6.8.8 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs > node scripts/postinstall npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 1107 packages from 1300 contributors and audited 6722 packages in 24.726s found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details > @google-cloud/language@2.0.1 fix /tmpfs/src/git/autosynth/working_repo > eslint --fix '**/*.js' synthtool > Cleaned up 2 temporary directories. synthtool > Wrote metadata to synth.metadata. ``` --- packages/google-cloud-language/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 96449b0f609..b771b92dd9e 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-03-01T12:15:10.730781Z", + "updateTime": "2019-03-05T12:17:27.660597Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "41d72d444fbe445f4da89e13be02078734fb7875", - "internalRef": "236230004" + "sha": "b4a22569c88f1f0444e889d8139ddacb799f287c", + "internalRef": "236712632" } }, { From e5b90079859517183b5b36e83790056b05517cac Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 7 Mar 2019 18:05:05 -0800 Subject: [PATCH 219/488] build: Add docuploader credentials to node publish jobs (#211) --- packages/google-cloud-language/synth.metadata | 38 ++----------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index b771b92dd9e..2b03b162b92 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,48 +1,18 @@ { - "updateTime": "2019-03-05T12:17:27.660597Z", + "updateTime": "2019-03-08T00:45:41.935415Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.14", - "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" + "version": "0.16.15", + "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b4a22569c88f1f0444e889d8139ddacb799f287c", - "internalRef": "236712632" - } - }, - { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2019.2.26" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "language", - "apiVersion": "v1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/language/artman_language_v1.yaml" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "language", - "apiVersion": "v1beta2", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/language/artman_language_v1beta2.yaml" + "sha": "c986e1d9618ac41343962b353d136201d72626ae" } } ] From 3234d7d5d9bd58cae8d075df37fb3769377883a7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 12 Mar 2019 06:42:48 -0700 Subject: [PATCH 220/488] chore: update require statement code style This PR was generated using Autosynth. :rainbow: Here's the log from Synthtool: ``` synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. synthtool > Ensuring dependencies. synthtool > Pulling artman image. latest: Pulling from googleapis/artman Digest: sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319 Status: Image is up to date for googleapis/artman:latest synthtool > Cloning googleapis. synthtool > Running generator for google/cloud/language/artman_language_v1.yaml. synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/language-v1. synthtool > Running generator for google/cloud/language/artman_language_v1beta2.yaml. synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/language-v1beta2. .eslintignore .eslintrc.yml .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .jsdoc.js .kokoro/common.cfg .kokoro/continuous/node10/common.cfg .kokoro/continuous/node10/docs.cfg .kokoro/continuous/node10/lint.cfg .kokoro/continuous/node10/samples-test.cfg .kokoro/continuous/node10/system-test-grpcjs.cfg .kokoro/continuous/node10/system-test.cfg .kokoro/continuous/node10/test.cfg .kokoro/continuous/node11/common.cfg .kokoro/continuous/node11/test.cfg .kokoro/continuous/node6/common.cfg .kokoro/continuous/node6/test.cfg .kokoro/continuous/node8/common.cfg .kokoro/continuous/node8/test.cfg .kokoro/docs.sh .kokoro/lint.sh .kokoro/presubmit/node10/common.cfg .kokoro/presubmit/node10/docs.cfg .kokoro/presubmit/node10/lint.cfg .kokoro/presubmit/node10/samples-test.cfg .kokoro/presubmit/node10/system-test-grpcjs.cfg .kokoro/presubmit/node10/system-test.cfg .kokoro/presubmit/node10/test.cfg .kokoro/presubmit/node11/common.cfg .kokoro/presubmit/node11/test.cfg .kokoro/presubmit/node6/common.cfg .kokoro/presubmit/node6/test.cfg .kokoro/presubmit/node8/common.cfg .kokoro/presubmit/node8/test.cfg .kokoro/presubmit/windows/common.cfg .kokoro/presubmit/windows/test.cfg .kokoro/publish.sh .kokoro/release/publish.cfg .kokoro/samples-test.sh .kokoro/system-test.sh .kokoro/test.bat .kokoro/test.sh .kokoro/trampoline.sh .nycrc .prettierignore .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE codecov.yaml renovate.json > grpc@1.19.0 install /tmpfs/src/git/autosynth/working_repo/node_modules/grpc > node-pre-gyp install --fallback-to-build --library=static_library node-pre-gyp WARN Using needle for node-pre-gyp https download [grpc] Success: "/tmpfs/src/git/autosynth/working_repo/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node" is installed via remote > protobufjs@6.8.8 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs > node scripts/postinstall npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 1104 packages from 1301 contributors and audited 6723 packages in 23.612s found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details > @google-cloud/language@2.0.1 fix /tmpfs/src/git/autosynth/working_repo > eslint --fix '**/*.js' synthtool > Cleaned up 2 temporary directories. synthtool > Wrote metadata to synth.metadata. ``` --- .../src/v1/language_service_client.js | 2 +- .../src/v1beta2/language_service_client.js | 2 +- packages/google-cloud-language/synth.metadata | 38 +++++++++++++++++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 2da332ec5cf..b1c4872eda8 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./language_service_client_config'); +const gapicConfig = require('./language_service_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 0289a173342..ccb306d9f70 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./language_service_client_config'); +const gapicConfig = require('./language_service_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 2b03b162b92..a1b7ad57abf 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,18 +1,48 @@ { - "updateTime": "2019-03-08T00:45:41.935415Z", + "updateTime": "2019-03-12T11:17:30.419888Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.15", - "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" + "version": "0.16.16", + "dockerImage": "googleapis/artman@sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c986e1d9618ac41343962b353d136201d72626ae" + "sha": "abd1c9a99c5cd7179d8e5e0c8d4c8e761054cc78", + "internalRef": "237945492" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.2.26" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "language", + "apiVersion": "v1", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/language/artman_language_v1.yaml" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "language", + "apiVersion": "v1beta2", + "language": "nodejs", + "generator": "gapic", + "config": "google/cloud/language/artman_language_v1beta2.yaml" } } ] From 6930a9eb3b76c15fa0d5b8f320bc104fdc937cd8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Mar 2019 10:21:59 -0700 Subject: [PATCH 221/488] Release @google-cloud/language v2.0.2 (#215) This pull request was generated using releasetool. --- packages/google-cloud-language/CHANGELOG.md | 25 +++++++++++++++++++ packages/google-cloud-language/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index d56069e2ea7..c453c20e5cb 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,31 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## v2.0.2 + +03-14-2019 07:43 PDT + +### Bug Fixes +- fix: throw on invalid credentials ([#204](https://github.com/googleapis/nodejs-language/pull/204)) + +### Documentation +- docs: update comments on protos ([#208](https://github.com/googleapis/nodejs-language/pull/208)) +- docs: update links in contrib guide ([#206](https://github.com/googleapis/nodejs-language/pull/206)) +- docs: update contributing path in README ([#200](https://github.com/googleapis/nodejs-language/pull/200)) +- docs: move CONTRIBUTING.md to root ([#199](https://github.com/googleapis/nodejs-language/pull/199)) +- docs: add lint/fix example to contributing guide ([#197](https://github.com/googleapis/nodejs-language/pull/197)) + +### Internal / Testing Changes +- chore: update require statement code style +- build: Add docuploader credentials to node publish jobs ([#211](https://github.com/googleapis/nodejs-language/pull/211)) +- build: use node10 to run samples-test, system-test etc ([#210](https://github.com/googleapis/nodejs-language/pull/210)) +- build: update release configuration +- chore(deps): update dependency mocha to v6 ([#207](https://github.com/googleapis/nodejs-language/pull/207)) +- build: use linkinator for docs test ([#205](https://github.com/googleapis/nodejs-language/pull/205)) +- fix(deps): update dependency yargs to v13 ([#203](https://github.com/googleapis/nodejs-language/pull/203)) +- build: create docs test npm scripts ([#202](https://github.com/googleapis/nodejs-language/pull/202)) +- build: test using @grpc/grpc-js in CI ([#201](https://github.com/googleapis/nodejs-language/pull/201)) + ## v2.0.1 01-31-2019 23:11 PST diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index fedd97e1950..58ea655f389 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "2.0.1", + "version": "2.0.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index fc3061669f6..7492c19179d 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^0.1.1", "mathjs": "^5.1.0", - "@google-cloud/language": "^2.0.1", + "@google-cloud/language": "^2.0.2", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" }, From 2cd6ab52629a5d170dd9030fa642edf3825d6834 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 22 Mar 2019 10:29:33 -0700 Subject: [PATCH 222/488] feat: add additional entity types (#220) --- .../cloud/language/v1/language_service.proto | 73 ++++++++++++------- .../cloud/language/v1/doc_language_service.js | 32 +++++++- .../src/v1/language_service_client.js | 5 +- .../v1/language_service_client_config.json | 16 ++-- packages/google-cloud-language/synth.metadata | 10 +-- 5 files changed, 91 insertions(+), 45 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index f9893385ffc..7a15c8bf14c 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; @@ -170,6 +171,21 @@ message Entity { // Other types OTHER = 7; + + // Phone number + PHONE_NUMBER = 9; + + // Address + ADDRESS = 10; + + // Date + DATE = 11; + + // Number + NUMBER = 12; + + // Price + PRICE = 13; } // The representative name for the entity. @@ -203,6 +219,32 @@ message Entity { Sentiment sentiment = 6; } +// Represents the text encoding that the caller uses to process the output. +// Providing an `EncodingType` is recommended because the API provides the +// beginning offsets for various outputs, such as tokens and mentions, and +// languages that natively use different text encodings may access offsets +// differently. +enum EncodingType { + // If `EncodingType` is not specified, encoding-dependent information (such as + // `begin_offset`) will be set at `-1`. + NONE = 0; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-8 encoding of the input. C++ and Go are examples of languages + // that use this encoding natively. + UTF8 = 1; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-16 encoding of the input. Java and JavaScript are examples of + // languages that use this encoding natively. + UTF16 = 2; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-32 encoding of the input. Python is an example of a language + // that uses this encoding natively. + UTF32 = 3; +} + // Represents the smallest syntactic building block of the text. message Token { // The token text. @@ -870,7 +912,8 @@ message TextSpan { // Represents a category returned from the text classifier. message ClassificationCategory { - // The name of the category representing the document. + // The name of the category representing the document, from the [predefined + // taxonomy](/natural-language/docs/categories). string name = 1; // The classifier's confidence of the category. Number represents how certain @@ -1041,29 +1084,3 @@ message AnnotateTextResponse { // Categories identified in the input document. repeated ClassificationCategory categories = 6; } - -// Represents the text encoding that the caller uses to process the output. -// Providing an `EncodingType` is recommended because the API provides the -// beginning offsets for various outputs, such as tokens and mentions, and -// languages that natively use different text encodings may access offsets -// differently. -enum EncodingType { - // If `EncodingType` is not specified, encoding-dependent information (such as - // `begin_offset`) will be set at `-1`. - NONE = 0; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-8 encoding of the input. C++ and Go are examples of languages - // that use this encoding natively. - UTF8 = 1; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-16 encoding of the input. Java and Javascript are examples of - // languages that use this encoding natively. - UTF16 = 2; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-32 encoding of the input. Python is an example of a language - // that uses this encoding natively. - UTF32 = 3; -} diff --git a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js index ac2a0f21e3b..0b77e711c24 100644 --- a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js @@ -194,7 +194,32 @@ const Entity = { /** * Other types */ - OTHER: 7 + OTHER: 7, + + /** + * Phone number + */ + PHONE_NUMBER: 9, + + /** + * Address + */ + ADDRESS: 10, + + /** + * Date + */ + DATE: 11, + + /** + * Number + */ + NUMBER: 12, + + /** + * Price + */ + PRICE: 13 } }; @@ -1373,7 +1398,8 @@ const TextSpan = { * Represents a category returned from the text classifier. * * @property {string} name - * The name of the category representing the document. + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). * * @property {number} confidence * The classifier's confidence of the category. Number represents how certain @@ -1730,7 +1756,7 @@ const EncodingType = { /** * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-16 encoding of the input. Java and Javascript are examples of + * on the UTF-16 encoding of the input. Java and JavaScript are examples of * languages that use this encoding natively. */ UTF16: 2, diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index b1c4872eda8..c06ac2f8de8 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -165,7 +165,10 @@ class LanguageServiceClient { * in this service. */ static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; + return [ + 'https://www.googleapis.com/auth/cloud-language', + 'https://www.googleapis.com/auth/cloud-platform', + ]; } /** diff --git a/packages/google-cloud-language/src/v1/language_service_client_config.json b/packages/google-cloud-language/src/v1/language_service_client_config.json index 0f2f69be6c1..d370c9322e7 100644 --- a/packages/google-cloud-language/src/v1/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1/language_service_client_config.json @@ -13,40 +13,40 @@ "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, + "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000 } }, "methods": { "AnalyzeSentiment": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnalyzeEntities": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnalyzeEntitySentiment": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnalyzeSyntax": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ClassifyText": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnnotateText": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index a1b7ad57abf..3642d502c07 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-12T11:17:30.419888Z", + "updateTime": "2019-03-22T11:16:51.183804Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.16", - "dockerImage": "googleapis/artman@sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319" + "version": "0.16.18", + "dockerImage": "googleapis/artman@sha256:e8ac9200640e76d54643f370db71a1556bf254f565ce46b45a467bbcbacbdb37" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "abd1c9a99c5cd7179d8e5e0c8d4c8e761054cc78", - "internalRef": "237945492" + "sha": "e2a116ac081210002ec2e634f1f840a453ebd182", + "internalRef": "239695990" } }, { From d6f1688eb5d1ee5028c2ee966b660d304ffeafb5 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 22 Mar 2019 14:30:38 -0700 Subject: [PATCH 223/488] Release v2.1.0 (#221) --- packages/google-cloud-language/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index c453c20e5cb..5cc76fa6fdb 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,17 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## v2.1.0 + +03-22-2019 10:34 PDT + +### New Features +- feat: add additional entity types ([#220](https://github.com/googleapis/nodejs-language/pull/220)) + +### Internal / Testing Changes +- chore: publish to npm using wombat ([#218](https://github.com/googleapis/nodejs-language/pull/218)) +- build: use per-repo npm publish token ([#216](https://github.com/googleapis/nodejs-language/pull/216)) + ## v2.0.2 03-14-2019 07:43 PDT diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 58ea655f389..b4461eb452e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "2.0.2", + "version": "2.1.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 7492c19179d..f6b81997e1f 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^0.1.1", "mathjs": "^5.1.0", - "@google-cloud/language": "^2.0.2", + "@google-cloud/language": "^2.1.0", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" }, From 43117186ed33bdb735438041a85e80fb3d4317f6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 4 Apr 2019 08:26:25 -0700 Subject: [PATCH 224/488] fix: improve docstrings, and add more field validation (#224) fix: improve docstrings, and add more field validation --- .../cloud/language/v1/language_service.proto | 134 +++++++++++------- .../cloud/language/v1/doc_language_service.js | 87 +++++++----- .../src/v1/language_service_client.js | 6 +- packages/google-cloud-language/synth.metadata | 10 +- 4 files changed, 147 insertions(+), 90 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index 7a15c8bf14c..41d92f344c7 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -18,45 +18,53 @@ syntax = "proto3"; package google.cloud.language.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1;language"; option java_multiple_files = true; option java_outer_classname = "LanguageServiceProto"; option java_package = "com.google.cloud.language.v1"; + // Provides text analysis operations such as sentiment analysis and entity // recognition. service LanguageService { + option (google.api.default_host) = "language.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-language," + "https://www.googleapis.com/auth/cloud-platform"; // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) - returns (AnalyzeSentimentResponse) { + rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { option (google.api.http) = { post: "/v1/documents:analyzeSentiment" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Finds named entities (currently proper names and common nouns) in the text // along with entity types, salience, mentions for each entity, and // other properties. - rpc AnalyzeEntities(AnalyzeEntitiesRequest) - returns (AnalyzeEntitiesResponse) { + rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { option (google.api.http) = { post: "/v1/documents:analyzeEntities" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } - // Finds entities, similar to - // [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] - // in the text and analyzes sentiment associated with each entity and its - // mentions. - rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) - returns (AnalyzeEntitySentimentResponse) { + // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes + // sentiment associated with each entity and its mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { option (google.api.http) = { post: "/v1/documents:analyzeEntitySentiment" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Analyzes the syntax of the text and provides sentence boundaries and @@ -67,6 +75,8 @@ service LanguageService { post: "/v1/documents:analyzeSyntax" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Classifies a document into categories. @@ -75,6 +85,7 @@ service LanguageService { post: "/v1/documents:classifyText" body: "*" }; + option (google.api.method_signature) = "document"; } // A convenience method that provides all the features that analyzeSentiment, @@ -84,6 +95,8 @@ service LanguageService { post: "/v1/documents:annotateText" body: "*" }; + option (google.api.method_signature) = "document,features,encoding_type"; + option (google.api.method_signature) = "document,features"; } } @@ -111,6 +124,7 @@ message Document { // Google Cloud Storage URI. oneof source { // The content of the input in string format. + // Cloud audit logging exempt since it is based on user data. string content = 2; // The Google Cloud Storage URI where the file content is located. @@ -137,8 +151,8 @@ message Sentence { TextSpan text = 1; // For calls to [AnalyzeSentiment][] or if - // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] - // is set to true, this field will contain the sentiment for the sentence. + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to + // true, this field will contain the sentiment for the sentence. Sentiment sentiment = 2; } @@ -146,7 +160,10 @@ message Sentence { // a person, an organization, or location. The API associates information, such // as salience and mentions, with entities. message Entity { - // The type of the entity. + // The type of the entity. For most entity types, the associated metadata is a + // Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table + // below lists the associated fields for entities that have different + // metadata. enum Type { // Unknown UNKNOWN = 0; @@ -163,28 +180,53 @@ message Entity { // Event EVENT = 4; - // Work of art + // Artwork WORK_OF_ART = 5; - // Consumer goods + // Consumer product CONSUMER_GOOD = 6; - // Other types + // Other types of entities OTHER = 7; - // Phone number + // Phone number

+ // The metadata lists the phone number, formatted according to local + // convention, plus whichever additional elements appear in the text:
    + //
  • number – the actual number, broken down into + // sections as per local convention
  • national_prefix + // – country code, if detected
  • area_code – + // region or area code, if detected
  • extension – + // phone extension (to be dialed after connection), if detected
PHONE_NUMBER = 9; - // Address + // Address

+ // The metadata identifies the street number and locality plus whichever + // additional elements appear in the text:
    + //
  • street_number – street number
  • + //
  • locality – city or town
  • + //
  • street_name – street/route name, if detected
  • + //
  • postal_code – postal code, if detected
  • + //
  • country – country, if detected
  • + //
  • broad_region – administrative area, such as the + // state, if detected
  • narrow_region – smaller + // administrative area, such as county, if detected
  • + //
  • sublocality – used in Asian addresses to demark a + // district within a city, if detected
ADDRESS = 10; - // Date + // Date

+ // The metadata identifies the components of the date:
    + //
  • year – four digit year, if detected
  • + //
  • month – two digit month number, if detected
  • + //
  • day – two digit day number, if detected
DATE = 11; - // Number + // Number

+ // The metadata is the number itself. NUMBER = 12; - // Price + // Price

+ // The metadata identifies the value and currency. PRICE = 13; } @@ -196,8 +238,9 @@ message Entity { // Metadata associated with the entity. // - // Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if - // available. The associated keys are "wikipedia_url" and "mid", respectively. + // For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + // and Knowledge Graph MID (`mid`), if they are available. For the metadata + // associated with other entity types, see the Type table below. map metadata = 3; // The salience score associated with the entity in the [0, 1.0] range. @@ -213,9 +256,9 @@ message Entity { repeated EntityMention mentions = 5; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - // is set to true, this field will contain the aggregate sentiment expressed - // for this entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the aggregate sentiment expressed for this + // entity in the provided document. Sentiment sentiment = 6; } @@ -892,9 +935,9 @@ message EntityMention { Type type = 2; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - // is set to true, this field will contain the sentiment expressed for this - // mention of the entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the sentiment expressed for this mention of + // the entity in the provided document. Sentiment sentiment = 3; } @@ -904,9 +947,7 @@ message TextSpan { string content = 1; // The API calculates the beginning offset of the content in the original - // document according to the - // [EncodingType][google.cloud.language.v1.EncodingType] specified in the API - // request. + // document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. int32 begin_offset = 2; } @@ -924,7 +965,7 @@ message ClassificationCategory { // The sentiment analysis request message. message AnalyzeSentimentRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate sentence offsets. EncodingType encoding_type = 2; @@ -937,8 +978,7 @@ message AnalyzeSentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 2; // The sentiment for all the sentences in the document. @@ -948,7 +988,7 @@ message AnalyzeSentimentResponse { // The entity-level sentiment analysis request message. message AnalyzeEntitySentimentRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -961,15 +1001,14 @@ message AnalyzeEntitySentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 2; } // The entity analysis request message. message AnalyzeEntitiesRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -982,15 +1021,14 @@ message AnalyzeEntitiesResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 2; } // The syntax analysis request message. message AnalyzeSyntaxRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -1006,15 +1044,14 @@ message AnalyzeSyntaxResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 3; } // The document classification request message. message ClassifyTextRequest { // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; } // The document classification response message. @@ -1046,10 +1083,10 @@ message AnnotateTextRequest { } // Input document. - Document document = 1; + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The enabled features. - Features features = 2; + Features features = 2 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 3; @@ -1077,8 +1114,7 @@ message AnnotateTextResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 5; // Categories identified in the input document. diff --git a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js index 0b77e711c24..bb6be889493 100644 --- a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js +++ b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js @@ -28,6 +28,7 @@ * * @property {string} content * The content of the input in string format. + * Cloud audit logging exempt since it is based on user data. * * @property {string} gcsContentUri * The Google Cloud Storage URI where the file content is located. @@ -87,8 +88,8 @@ const Document = { * * @property {Object} sentiment * For calls to AnalyzeSentiment or if - * AnnotateTextRequest.Features.extract_document_sentiment - * is set to true, this field will contain the sentiment for the sentence. + * AnnotateTextRequest.Features.extract_document_sentiment is set to + * true, this field will contain the sentiment for the sentence. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * @@ -116,8 +117,9 @@ const Sentence = { * @property {Object.} metadata * Metadata associated with the entity. * - * Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if - * available. The associated keys are "wikipedia_url" and "mid", respectively. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. * * @property {number} salience * The salience score associated with the entity in the [0, 1.0] range. @@ -135,9 +137,9 @@ const Sentence = { * * @property {Object} sentiment * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. + * AnnotateTextRequest.Features.extract_entity_sentiment is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * @@ -149,7 +151,10 @@ const Entity = { // This is for documentation. Actual contents will be loaded by gRPC. /** - * The type of the entity. + * The type of the entity. For most entity types, the associated metadata is a + * Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table + * below lists the associated fields for entities that have different + * metadata. * * @enum {number} * @memberof google.cloud.language.v1 @@ -182,42 +187,67 @@ const Entity = { EVENT: 4, /** - * Work of art + * Artwork */ WORK_OF_ART: 5, /** - * Consumer goods + * Consumer product */ CONSUMER_GOOD: 6, /** - * Other types + * Other types of entities */ OTHER: 7, /** - * Phone number + * Phone number

+ * The metadata lists the phone number, formatted according to local + * convention, plus whichever additional elements appear in the text:
    + *
  • number – the actual number, broken down into + * sections as per local convention
  • national_prefix + * – country code, if detected
  • area_code – + * region or area code, if detected
  • extension – + * phone extension (to be dialed after connection), if detected
*/ PHONE_NUMBER: 9, /** - * Address + * Address

+ * The metadata identifies the street number and locality plus whichever + * additional elements appear in the text:
    + *
  • street_number – street number
  • + *
  • locality – city or town
  • + *
  • street_name – street/route name, if detected
  • + *
  • postal_code – postal code, if detected
  • + *
  • country – country, if detected
  • + *
  • broad_region – administrative area, such as the + * state, if detected
  • narrow_region – smaller + * administrative area, such as county, if detected
  • + *
  • sublocality – used in Asian addresses to demark a + * district within a city, if detected
*/ ADDRESS: 10, /** - * Date + * Date

+ * The metadata identifies the components of the date:
    + *
  • year – four digit year, if detected
  • + *
  • month – two digit month number, if detected
  • + *
  • day – two digit day number, if detected
*/ DATE: 11, /** - * Number + * Number

+ * The metadata is the number itself. */ NUMBER: 12, /** - * Price + * Price

+ * The metadata identifies the value and currency. */ PRICE: 13 } @@ -1336,9 +1366,9 @@ const DependencyEdge = { * * @property {Object} sentiment * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. + * AnnotateTextRequest.Features.extract_entity_sentiment is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} * @@ -1382,9 +1412,7 @@ const EntityMention = { * * @property {number} beginOffset * The API calculates the beginning offset of the content in the original - * document according to the - * EncodingType specified in the API - * request. + * document according to the EncodingType specified in the API request. * * @typedef TextSpan * @memberof google.cloud.language.v1 @@ -1445,8 +1473,7 @@ const AnalyzeSentimentRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field - * for more details. + * See Document.language field for more details. * * @property {Object[]} sentences * The sentiment for all the sentences in the document. @@ -1493,8 +1520,7 @@ const AnalyzeEntitySentimentRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field - * for more details. + * See Document.language field for more details. * * @typedef AnalyzeEntitySentimentResponse * @memberof google.cloud.language.v1 @@ -1536,8 +1562,7 @@ const AnalyzeEntitiesRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field - * for more details. + * See Document.language field for more details. * * @typedef AnalyzeEntitiesResponse * @memberof google.cloud.language.v1 @@ -1584,8 +1609,7 @@ const AnalyzeSyntaxRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field - * for more details. + * See Document.language field for more details. * * @typedef AnalyzeSyntaxResponse * @memberof google.cloud.language.v1 @@ -1713,8 +1737,7 @@ const AnnotateTextRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language field - * for more details. + * See Document.language field for more details. * * @property {Object[]} categories * Categories identified in the input document. diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index c06ac2f8de8..994ea7d362a 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -291,10 +291,8 @@ class LanguageServiceClient { } /** - * Finds entities, similar to - * AnalyzeEntities - * in the text and analyzes sentiment associated with each entity and its - * mentions. + * Finds entities, similar to AnalyzeEntities in the text and analyzes + * sentiment associated with each entity and its mentions. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 3642d502c07..81398c4b8a7 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-22T11:16:51.183804Z", + "updateTime": "2019-04-04T11:16:12.440846Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.18", - "dockerImage": "googleapis/artman@sha256:e8ac9200640e76d54643f370db71a1556bf254f565ce46b45a467bbcbacbdb37" + "version": "0.16.23", + "dockerImage": "googleapis/artman@sha256:f3a3f88000dc1cd1b4826104c5574aa5c534f6793fbf66e888d11c0d7ef5762e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e2a116ac081210002ec2e634f1f840a453ebd182", - "internalRef": "239695990" + "sha": "04193ea2f8121388c998ab49c382f2c03417dcce", + "internalRef": "241828309" } }, { From a8a0dfe21cd6bb99baa3bbab285a3573521a1835 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 4 Apr 2019 08:39:34 -0700 Subject: [PATCH 225/488] fix(deps): update dependency @google-cloud/automl to ^0.2.0 (#223) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index f6b81997e1f..2143f003afc 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 60000" }, "dependencies": { - "@google-cloud/automl": "^0.1.1", + "@google-cloud/automl": "^0.2.0", "mathjs": "^5.1.0", "@google-cloud/language": "^2.1.0", "@google-cloud/storage": "^2.0.0", From 385c64d924c4f9d6882fae319b06f67940b58802 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 4 Apr 2019 14:05:02 -0700 Subject: [PATCH 226/488] refactor: use execSync for tests refactor: use execSync for tests #225 automerged by dpebot --- packages/google-cloud-language/samples/package.json | 1 - .../google-cloud-language/samples/test/quickstart.test.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 2143f003afc..50e114b4095 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -23,7 +23,6 @@ }, "devDependencies": { "chai": "^4.2.0", - "execa": "^1.0.0", "mocha": "^6.0.0", "uuid": "^3.2.1" } diff --git a/packages/google-cloud-language/samples/test/quickstart.test.js b/packages/google-cloud-language/samples/test/quickstart.test.js index e4fa6f8bd17..be26e4228de 100644 --- a/packages/google-cloud-language/samples/test/quickstart.test.js +++ b/packages/google-cloud-language/samples/test/quickstart.test.js @@ -16,11 +16,11 @@ 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); describe('quickstart', () => { it('should analyze sentiment in text', async () => { - const {stdout} = await execa.shell('node quickstart.js'); + const stdout = execSync('node quickstart.js'); assert(stdout, /Text: Hello, world!/); assert(stdout, /Sentiment score: /); assert(stdout, /Sentiment magnitude: /); From 015be8bdd99c9d9ef17e62c523cb72103e3d32c8 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 4 Apr 2019 18:39:53 -0700 Subject: [PATCH 227/488] refactor: wrap execSync with encoding: utf-8 (#226) --- .../google-cloud-language/samples/test/quickstart.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/test/quickstart.test.js b/packages/google-cloud-language/samples/test/quickstart.test.js index be26e4228de..b2e879dc9b3 100644 --- a/packages/google-cloud-language/samples/test/quickstart.test.js +++ b/packages/google-cloud-language/samples/test/quickstart.test.js @@ -16,7 +16,9 @@ 'use strict'; const {assert} = require('chai'); -const {execSync} = require('child_process'); +const cp = require('child_process'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); describe('quickstart', () => { it('should analyze sentiment in text', async () => { From c440f670b254dcb6a643e3d0f073dfc5b9ac7e56 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 26 Apr 2019 12:54:24 -0700 Subject: [PATCH 228/488] chore(deps): update dependency nyc to v14 (#227) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index b4461eb452e..8d10b32e547 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -57,7 +57,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^6.0.0", - "nyc": "^13.0.0", + "nyc": "^14.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.5", "linkinator": "^1.1.2" From 96f160543024af76da27948b5b96c91186681ba3 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 29 Apr 2019 15:03:56 -0700 Subject: [PATCH 229/488] update to .nycrc with --all enabled (#229) --- packages/google-cloud-language/.nycrc | 40 ++++++++++++--------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-language/.nycrc b/packages/google-cloud-language/.nycrc index 88b001cb587..bfe4073a6ab 100644 --- a/packages/google-cloud-language/.nycrc +++ b/packages/google-cloud-language/.nycrc @@ -1,28 +1,22 @@ { "report-dir": "./.coverage", - "reporter": "lcov", + "reporter": ["text", "lcov"], "exclude": [ - "src/*{/*,/**/*}.js", - "src/*/v*/*.js", - "test/**/*.js", - "build/test" + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/docs", + "**/samples", + "**/scripts", + "**/src/**/v*/**/*.js", + "**/test", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" ], - "watermarks": { - "branches": [ - 95, - 100 - ], - "functions": [ - 95, - 100 - ], - "lines": [ - 95, - 100 - ], - "statements": [ - 95, - 100 - ] - } + "exclude-after-remap": false, + "all": true } From f36fd5791bff58e96ac2b5c15b6b24b54022caf4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 2 May 2019 09:15:41 -0700 Subject: [PATCH 230/488] fix(deps): update dependency google-gax to ^0.26.0 (#230) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 8d10b32e547..6f4a4fca463 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -43,7 +43,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^0.25.0", + "google-gax": "^0.26.0", "lodash.merge": "^4.6.1" }, "devDependencies": { From f6a732d0ea882924ba968b2ac47a885f8442874f Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 2 May 2019 11:30:01 -0700 Subject: [PATCH 231/488] build!: upgrade engines field to >=8.10.0 (#232) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6f4a4fca463..1dc350773ba 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc", "engines": { - "node": ">=6.0.0" + "node": ">=8.10.0" }, "repository": "googleapis/nodejs-language", "main": "src/index.js", From d96a59c4a3ed709b852dbf39a321cb9a495cd15a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 3 May 2019 08:20:35 -0700 Subject: [PATCH 232/488] chore(deps): update dependency eslint-plugin-node to v9 (#234) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1dc350773ba..6325fd6b443 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -51,7 +51,7 @@ "codecov": "^3.0.2", "eslint": "^5.0.0", "eslint-config-prettier": "^4.0.0", - "eslint-plugin-node": "^8.0.0", + "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", From 247d23749de0e16b9270c2fcff04c27c1fcc68fc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 7 May 2019 10:36:57 -0700 Subject: [PATCH 233/488] build: only pipe to codecov if tests run on Node 10 (#235) --- packages/google-cloud-language/synth.metadata | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 81398c4b8a7..c99a4382602 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-04-04T11:16:12.440846Z", + "updateTime": "2019-05-04T11:16:55.883865Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.23", - "dockerImage": "googleapis/artman@sha256:f3a3f88000dc1cd1b4826104c5574aa5c534f6793fbf66e888d11c0d7ef5762e" + "version": "0.18.0", + "dockerImage": "googleapis/artman@sha256:29bd82cc42c43825fde408e63fc955f3f9d07ff9989243d7aa0f91a35c7884dc" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "04193ea2f8121388c998ab49c382f2c03417dcce", - "internalRef": "241828309" + "sha": "39c876cca5403e7e8282ce2229033cc3cc02962c", + "internalRef": "246561601" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.2.26" + "version": "2019.5.2" } } ], From e287e088b5d771cb0b030edbaefe8ad8e702b43f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Wed, 8 May 2019 17:15:37 -0700 Subject: [PATCH 234/488] fix: DEADLINE_EXCEEDED error is no longer retried --- .../src/v1/language_service_client_config.json | 1 - .../src/v1beta2/language_service_client_config.json | 1 - packages/google-cloud-language/synth.metadata | 10 +++++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client_config.json b/packages/google-cloud-language/src/v1/language_service_client_config.json index d370c9322e7..9320f5530a2 100644 --- a/packages/google-cloud-language/src/v1/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1/language_service_client_config.json @@ -3,7 +3,6 @@ "google.cloud.language.v1.LanguageService": { "retry_codes": { "idempotent": [ - "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json index 100eba5ffde..5d9a0fed80c 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json @@ -3,7 +3,6 @@ "google.cloud.language.v1beta2.LanguageService": { "retry_codes": { "idempotent": [ - "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index c99a4382602..2509a6ade4f 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-05-04T11:16:55.883865Z", + "updateTime": "2019-05-08T12:01:56.878681Z", "sources": [ { "generator": { "name": "artman", - "version": "0.18.0", - "dockerImage": "googleapis/artman@sha256:29bd82cc42c43825fde408e63fc955f3f9d07ff9989243d7aa0f91a35c7884dc" + "version": "0.19.0", + "dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "39c876cca5403e7e8282ce2229033cc3cc02962c", - "internalRef": "246561601" + "sha": "51145ff7812d2bb44c1219d0b76dac92a8bd94b2", + "internalRef": "247143125" } }, { From 2dffb6ecbb82322ba1c54337f7dabe4195e531d9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 10 May 2019 15:00:42 -0700 Subject: [PATCH 235/488] fix: DEADLINE_EXCEEDED is idempotent (#241) --- .../src/v1/language_service_client_config.json | 1 + .../src/v1beta2/language_service_client_config.json | 1 + packages/google-cloud-language/synth.metadata | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client_config.json b/packages/google-cloud-language/src/v1/language_service_client_config.json index 9320f5530a2..d370c9322e7 100644 --- a/packages/google-cloud-language/src/v1/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1/language_service_client_config.json @@ -3,6 +3,7 @@ "google.cloud.language.v1.LanguageService": { "retry_codes": { "idempotent": [ + "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json index 5d9a0fed80c..100eba5ffde 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json @@ -3,6 +3,7 @@ "google.cloud.language.v1beta2.LanguageService": { "retry_codes": { "idempotent": [ + "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 2509a6ade4f..0ac2f694e67 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-08T12:01:56.878681Z", + "updateTime": "2019-05-10T12:06:37.250798Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "51145ff7812d2bb44c1219d0b76dac92a8bd94b2", - "internalRef": "247143125" + "sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a", + "internalRef": "247530843" } }, { From 41cb6f3624a279a8423e5a066231f2c2fccb3058 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 10 May 2019 15:09:26 -0700 Subject: [PATCH 236/488] fix(deps): update dependency google-gax to v1 (#240) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6325fd6b443..a2446b32c12 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -43,7 +43,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^0.26.0", + "google-gax": "^1.0.0", "lodash.merge": "^4.6.1" }, "devDependencies": { From b691e8c861eacb029028f6b489f84dfa7081c009 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 14 May 2019 09:56:58 -0700 Subject: [PATCH 237/488] fix(deps): update dependency @google-cloud/automl to v1 (#242) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 50e114b4095..a27224da380 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 60000" }, "dependencies": { - "@google-cloud/automl": "^0.2.0", + "@google-cloud/automl": "^1.0.0", "mathjs": "^5.1.0", "@google-cloud/language": "^2.1.0", "@google-cloud/storage": "^2.0.0", From 0406f996c1d40a251a51ce29dcfe68958ebd7255 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 17 May 2019 08:18:09 -0700 Subject: [PATCH 238/488] build: add new kokoro config for coverage and release-please (#243) --- packages/google-cloud-language/synth.metadata | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 0ac2f694e67..aa52c315ddf 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-10T12:06:37.250798Z", + "updateTime": "2019-05-17T01:07:38.598596Z", "sources": [ { "generator": { @@ -12,15 +12,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a", - "internalRef": "247530843" + "sha": "03269e767cff9dd644d7784a4d4350b2ba6daf69", + "internalRef": "248524261" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.4.10" } } ], From ff4809902f616a9063e53cc8edfea0ba6a4c2f8e Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 17 May 2019 16:49:25 -0700 Subject: [PATCH 239/488] build: updated kokoro config for coverage and release-please (#244) --- packages/google-cloud-language/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index aa52c315ddf..c3f2c6feeed 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-17T01:07:38.598596Z", + "updateTime": "2019-05-17T19:47:08.343656Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "03269e767cff9dd644d7784a4d4350b2ba6daf69", - "internalRef": "248524261" + "sha": "99efb1441b7c2aeb75c69f8baf9b61d4221bb744", + "internalRef": "248724297" } }, { From 5dbd6480ae60b34b3a8e1a19da0694713ee4c5a4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 20 May 2019 07:51:53 -0700 Subject: [PATCH 240/488] chore: release 3.0.0 (#248) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-language/CHANGELOG.md | 23 ++++++++++++++++++- packages/google-cloud-language/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 5cc76fa6fdb..4263c9b9fe9 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,28 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [3.0.0](https://www.github.com/googleapis/nodejs-language/compare/v2.1.0...v3.0.0) (2019-05-20) + + +### ⚠ BREAKING CHANGES + +* upgrade engines field to >=8.10.0 (#232) + +### Bug Fixes + +* **deps:** update dependency @google-cloud/automl to ^0.2.0 ([#223](https://www.github.com/googleapis/nodejs-language/issues/223)) ([1fe903a](https://www.github.com/googleapis/nodejs-language/commit/1fe903a)) +* DEADLINE_EXCEEDED error is no longer retried ([a32713f](https://www.github.com/googleapis/nodejs-language/commit/a32713f)) +* DEADLINE_EXCEEDED is idempotent ([#241](https://www.github.com/googleapis/nodejs-language/issues/241)) ([dbd417f](https://www.github.com/googleapis/nodejs-language/commit/dbd417f)) +* improve docstrings, and add more field validation ([#224](https://www.github.com/googleapis/nodejs-language/issues/224)) ([ed2c692](https://www.github.com/googleapis/nodejs-language/commit/ed2c692)) +* **deps:** update dependency @google-cloud/automl to v1 ([#242](https://www.github.com/googleapis/nodejs-language/issues/242)) ([c7e4797](https://www.github.com/googleapis/nodejs-language/commit/c7e4797)) +* **deps:** update dependency google-gax to ^0.26.0 ([#230](https://www.github.com/googleapis/nodejs-language/issues/230)) ([5b8af98](https://www.github.com/googleapis/nodejs-language/commit/5b8af98)) +* **deps:** update dependency google-gax to v1 ([#240](https://www.github.com/googleapis/nodejs-language/issues/240)) ([54660e1](https://www.github.com/googleapis/nodejs-language/commit/54660e1)) + + +### Build System + +* upgrade engines field to >=8.10.0 ([#232](https://www.github.com/googleapis/nodejs-language/issues/232)) ([ec540f3](https://www.github.com/googleapis/nodejs-language/commit/ec540f3)) + ## v2.1.0 03-22-2019 10:34 PDT @@ -167,4 +189,3 @@ - chore: workaround for repo-tools EPERM ([#45](https://github.com/googleapis/nodejs-language/pull/45)) - chore: make samples depend on the current version ([#44](https://github.com/googleapis/nodejs-language/pull/44)) - chore: setup nighty build in CircleCI ([#43](https://github.com/googleapis/nodejs-language/pull/43)) - diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index a2446b32c12..704aa3dfe55 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "2.1.0", + "version": "3.0.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index a27224da380..19bd7f56e2c 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^5.1.0", - "@google-cloud/language": "^2.1.0", + "@google-cloud/language": "^3.0.0", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" }, From 4865f6e46430cc448d7d5df1dc794cf11e3387d1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 May 2019 10:15:14 -0700 Subject: [PATCH 241/488] refactor: drop dependency on lodash.merge and update links (#249) --- .../src/v1/language_service_client.js | 22 ++++++++----------- .../src/v1beta2/language_service_client.js | 22 ++++++++----------- packages/google-cloud-language/synth.metadata | 12 +++++----- 3 files changed, 24 insertions(+), 32 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 994ea7d362a..367879c8fca 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./language_service_client_config.json'); const gax = require('google-gax'); -const merge = require('lodash.merge'); const path = require('path'); const VERSION = require('../../package.json').version; @@ -89,12 +88,9 @@ class LanguageServiceClient { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/cloud/language/v1/language_service.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/cloud/language/v1/language_service.proto'] ); // Put together the default options sent with requests. @@ -199,7 +195,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -253,7 +249,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -306,7 +302,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -364,7 +360,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -412,7 +408,7 @@ class LanguageServiceClient { * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -469,7 +465,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index ccb306d9f70..9f31bc9e298 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./language_service_client_config.json'); const gax = require('google-gax'); -const merge = require('lodash.merge'); const path = require('path'); const VERSION = require('../../package.json').version; @@ -89,12 +88,9 @@ class LanguageServiceClient { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/cloud/language/v1beta2/language_service.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/cloud/language/v1beta2/language_service.proto'] ); // Put together the default options sent with requests. @@ -197,7 +193,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -251,7 +247,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -306,7 +302,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -364,7 +360,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -412,7 +408,7 @@ class LanguageServiceClient { * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * @@ -469,7 +465,7 @@ class LanguageServiceClient { * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index c3f2c6feeed..b1a477caaf3 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-05-17T19:47:08.343656Z", + "updateTime": "2019-05-21T11:17:54.880717Z", "sources": [ { "generator": { "name": "artman", - "version": "0.19.0", - "dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e" + "version": "0.20.0", + "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "99efb1441b7c2aeb75c69f8baf9b61d4221bb744", - "internalRef": "248724297" + "sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160", + "internalRef": "249058354" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.4.10" + "version": "2019.5.2" } } ], From 11caeec2f07d0199de3a2a95550f7b37a2860655 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 May 2019 02:38:52 +0000 Subject: [PATCH 242/488] chore: use published jsdoc-baseline package (#250) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 704aa3dfe55..758078494ac 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -53,7 +53,7 @@ "eslint-config-prettier": "^4.0.0", "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", - "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", + "jsdoc-baseline": "^0.1.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^6.0.0", From 29682eda3bf5cce075679cf81ffecd8ae298d426 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 28 May 2019 20:39:20 +0000 Subject: [PATCH 243/488] build: ignore proto files in test coverage (#252) --- packages/google-cloud-language/.nycrc | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-language/.nycrc b/packages/google-cloud-language/.nycrc index bfe4073a6ab..83a421a0628 100644 --- a/packages/google-cloud-language/.nycrc +++ b/packages/google-cloud-language/.nycrc @@ -10,6 +10,7 @@ "**/samples", "**/scripts", "**/src/**/v*/**/*.js", + "**/protos", "**/test", ".jsdoc.js", "**/.jsdoc.js", From 5e9bc5a70043e7c7a33bf47b4bc1fbac46d4a805 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 5 Jun 2019 09:58:59 -0700 Subject: [PATCH 244/488] feat: support apiEndpoint override in client constructor (#256) --- .../src/v1/language_service_client.js | 14 ++++++++++- .../src/v1beta2/language_service_client.js | 14 ++++++++++- packages/google-cloud-language/synth.metadata | 10 ++++---- .../google-cloud-language/test/gapic-v1.js | 21 +++++++++++++++++ .../test/gapic-v1beta2.js | 23 +++++++++++++++++++ 5 files changed, 75 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 367879c8fca..dbd900faafb 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -56,14 +56,18 @@ class LanguageServiceClient { * API remote host. */ constructor(opts) { + opts = opts || {}; this._descriptors = {}; + const servicePath = + opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; + // Ensure that options include the service address and port. opts = Object.assign( { clientConfig: {}, port: this.constructor.port, - servicePath: this.constructor.servicePath, + servicePath, }, opts ); @@ -149,6 +153,14 @@ class LanguageServiceClient { return 'language.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'language.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 9f31bc9e298..868dfe172f2 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -56,14 +56,18 @@ class LanguageServiceClient { * API remote host. */ constructor(opts) { + opts = opts || {}; this._descriptors = {}; + const servicePath = + opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; + // Ensure that options include the service address and port. opts = Object.assign( { clientConfig: {}, port: this.constructor.port, - servicePath: this.constructor.servicePath, + servicePath, }, opts ); @@ -149,6 +153,14 @@ class LanguageServiceClient { return 'language.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'language.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index b1a477caaf3..2ff517d8b8c 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-05-21T11:17:54.880717Z", + "updateTime": "2019-06-05T14:20:03.832982Z", "sources": [ { "generator": { "name": "artman", - "version": "0.20.0", - "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec" + "version": "0.23.1", + "dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160", - "internalRef": "249058354" + "sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b", + "internalRef": "251635729" } }, { diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js index 853c9753c6e..d2d93821669 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -23,6 +23,27 @@ const error = new Error(); error.code = FAKE_STATUS_CODE; describe('LanguageServiceClient', () => { + it('has servicePath', () => { + const servicePath = languageModule.v1.LanguageServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = languageModule.v1.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = languageModule.v1.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new languageModule.v1.LanguageServiceClient(); + assert(client); + }); + describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { const client = new languageModule.v1.LanguageServiceClient({ diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-v1beta2.js index d6ab5151c4a..bab852198bc 100644 --- a/packages/google-cloud-language/test/gapic-v1beta2.js +++ b/packages/google-cloud-language/test/gapic-v1beta2.js @@ -23,6 +23,29 @@ const error = new Error(); error.code = FAKE_STATUS_CODE; describe('LanguageServiceClient', () => { + it('has servicePath', () => { + const servicePath = + languageModule.v1beta2.LanguageServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + languageModule.v1beta2.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = languageModule.v1beta2.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new languageModule.v1beta2.LanguageServiceClient(); + assert(client); + }); + describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { const client = new languageModule.v1beta2.LanguageServiceClient({ From 49571ba8f628e3eb875d8318475539511ce9da63 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 5 Jun 2019 10:11:32 -0700 Subject: [PATCH 245/488] chore: release 3.1.0 (#257) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 4263c9b9fe9..fcc29d307fa 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [3.1.0](https://www.github.com/googleapis/nodejs-language/compare/v3.0.0...v3.1.0) (2019-06-05) + + +### Features + +* support apiEndpoint override in client constructor ([#256](https://www.github.com/googleapis/nodejs-language/issues/256)) ([48ac8fd](https://www.github.com/googleapis/nodejs-language/commit/48ac8fd)) + ## [3.0.0](https://www.github.com/googleapis/nodejs-language/compare/v2.1.0...v3.0.0) (2019-05-20) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 758078494ac..d371c66c29b 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.0.0", + "version": "3.1.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 19bd7f56e2c..b0c2fcb3080 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^5.1.0", - "@google-cloud/language": "^3.0.0", + "@google-cloud/language": "^3.1.0", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" }, From a01efa007aeac54754f61dd9e516bc712c7fd5f7 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 6 Jun 2019 18:27:22 +0200 Subject: [PATCH 246/488] feat: add .repo-metadata.json and generate README (#255) --- .../.cloud-repo-tools.json | 51 --- packages/google-cloud-language/.gitignore | 1 + .../.readme-partials.yml | 4 + .../google-cloud-language/.repo-metadata.json | 14 + packages/google-cloud-language/README.md | 85 +++-- packages/google-cloud-language/package.json | 4 +- .../google-cloud-language/samples/README.md | 299 ++++-------------- 7 files changed, 139 insertions(+), 319 deletions(-) delete mode 100644 packages/google-cloud-language/.cloud-repo-tools.json create mode 100644 packages/google-cloud-language/.readme-partials.yml create mode 100644 packages/google-cloud-language/.repo-metadata.json diff --git a/packages/google-cloud-language/.cloud-repo-tools.json b/packages/google-cloud-language/.cloud-repo-tools.json deleted file mode 100644 index 2c81487b69a..00000000000 --- a/packages/google-cloud-language/.cloud-repo-tools.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "product": "nl", - "requiresKeyFile": true, - "requiresProjectId": true, - "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/language/latest/", - "release_quality": "ga", - "samples": [ - { - "id": "quickstart", - "name": "Quickstart", - "file": "quickstart.js", - "docs_link": "https://cloud.google.com/natural-language/docs/quickstart-client-libraries", - "usage": "node quickstart.js" - }, - { - "id": "analyze-v1", - "name": "Analyze v1", - "file": "analyze.v1.js", - "docs_link": "https://cloud.google.com/natural-language/docs/", - "usage": "node analyze.v1.js --help" - }, - { - "id": "analyze-v1beta2", - "name": "Analyze v1beta2", - "file": "analyze.v1beta2.js", - "docs_link": "https://cloud.google.com/natural-language/docs/", - "usage": "node analyze.v1beta2.js --help" - }, - { - "id": "automl-nl-dataset", - "name": "AutoML Dataset", - "file": "automl/automlNaturalLanguageDataset.js", - "docs_link": "https://cloud.google.com/natural-language/docs/", - "usage": "node automl/automlNaturalLanguageDataset.js --help" - }, - { - "id": "automl-nl-model", - "name": "AutoML Model", - "file": "automl/automlNaturalLanguageModel.js", - "docs_link": "https://cloud.google.com/natural-language/docs/", - "usage": "node automl/automlNaturalLanguageModel.js --help" - }, - { - "id": "automl-nl-predict", - "name": "AutoML Predict", - "file": "automl/automlNaturalLanguagePredict.js", - "docs_link": "https://cloud.google.com/natural-language/docs/", - "usage": "node automl/automlNaturalLanguagePredict.js --help" - } - ] -} diff --git a/packages/google-cloud-language/.gitignore b/packages/google-cloud-language/.gitignore index 6b002b948bd..7320a52910d 100644 --- a/packages/google-cloud-language/.gitignore +++ b/packages/google-cloud-language/.gitignore @@ -8,3 +8,4 @@ system-test/secrets.js system-test/*key.json *.lock package-lock.json +__pycache__/ diff --git a/packages/google-cloud-language/.readme-partials.yml b/packages/google-cloud-language/.readme-partials.yml new file mode 100644 index 00000000000..972b7ecd609 --- /dev/null +++ b/packages/google-cloud-language/.readme-partials.yml @@ -0,0 +1,4 @@ +introduction: |- + [Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural + language understanding technologies to developers, including sentiment analysis, entity + analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. diff --git a/packages/google-cloud-language/.repo-metadata.json b/packages/google-cloud-language/.repo-metadata.json new file mode 100644 index 00000000000..5f2c8fe467e --- /dev/null +++ b/packages/google-cloud-language/.repo-metadata.json @@ -0,0 +1,14 @@ +{ + "name": "language", + "name_pretty": "Natural Language", + "product_documentation": "https://cloud.google.com/natural-language/docs/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/language/latest/", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559753", + "release_level": "ga", + "language": "nodejs", + "repo": "googleapis/nodejs-language", + "distribution_name": "@google-cloud/language", + "api_id": "language.googleapis.com", + "requires_billing": true +} + diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 6759d89111d..3aa9bb0ecd2 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -1,41 +1,63 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "To regenerate it, use `npm run generate-scaffolding`." +[//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Natural Language API: Node.js Client](https://github.com/googleapis/nodejs-language) +# [Natural Language: Node.js Client](https://github.com/googleapis/nodejs-language) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/language.svg)](https://www.npmjs.org/package/@google-cloud/language) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-language/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-language) -[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. -* [Using the client library](#using-the-client-library) + +[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural +language understanding technologies to developers, including sentiment analysis, entity +analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. + + +* [Natural Language Node.js Client API Reference][client-docs] +* [Natural Language Documentation][product-docs] +* [github.com/googleapis/nodejs-language](https://github.com/googleapis/nodejs-language) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) * [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) -## Using the client library +## Quickstart -1. [Select or create a Cloud Platform project][projects]. +### Before you begin +1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. - -1. [Enable the Google Cloud Natural Language API API][enable_api]. - +1. [Enable the Natural Language API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. -1. Install the client library: +### Installing the client library + +```bash +npm install @google-cloud/language +``` - npm install --save @google-cloud/language -1. Try an example: +### Using the client library ```javascript -async function main() { +async function quickstart() { // Imports the Google Cloud client library const language = require('@google-cloud/language'); @@ -59,9 +81,10 @@ async function main() { console.log(`Sentiment magnitude: ${sentiment.magnitude}`); } -main().catch(console.error); ``` + + ## Samples Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/tree/master/samples) directory. The samples' `README.md` @@ -69,26 +92,31 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Automl Natural Language Dataset | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageDataset.js,samples/README.md) | +| Automl Natural Language Model | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageModel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageModel.js,samples/README.md) | +| Automl Natural Language Predict | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguagePredict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguagePredict.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | -| Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) | -| Analyze v1beta2 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) | -| AutoML Dataset | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automl/automlNaturalLanguageDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageDataset.js,samples/README.md) | -| AutoML Model | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automl/automlNaturalLanguageModel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageModel.js,samples/README.md) | -| AutoML Predict | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automl/automlNaturalLanguagePredict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguagePredict.js,samples/README.md) | -The [Natural Language API Node.js Client API Reference][client-docs] documentation + + +The [Natural Language Node.js Client API Reference][client-docs] documentation also contains samples. ## Versioning This library follows [Semantic Versioning](http://semver.org/). + This library is considered to be **General Availability (GA)**. This means it is stable; the code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against **GA** libraries are addressed with the highest priority. + + + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages @@ -103,21 +131,10 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) -## What's Next - -* [Natural Language API Documentation][product-docs] -* [Natural Language API Node.js Client API Reference][client-docs] -* [github.com/googleapis/nodejs-language](https://github.com/googleapis/nodejs-language) - -Read more about the client libraries for Cloud APIs, including the older -Google APIs Client Libraries, in [Client Libraries Explained][explained]. - -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained - [client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest/ -[product-docs]: https://cloud.google.com/natural-language/docs +[product-docs]: https://cloud.google.com/natural-language/docs/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=language.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index d371c66c29b..6b26feb9349 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -32,14 +32,13 @@ "scripts": { "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", - "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "eslint '**/*.js'", "samples-test": "cd samples/ && npm test && cd ../", "system-test": "mocha system-test/*.js --timeout 600000", "test-no-cover": "mocha test/*.js", "test": "npm run cover", "fix": "eslint --fix '**/*.js'", - "docs-test": "linkinator docs -r --skip www.googleapis.com", + "docs-test": "linkinator docs -r --skip https://github.com/googleapis/nodejs-language/blob/master/samples/.+", "predocs-test": "npm run docs" }, "dependencies": { @@ -47,7 +46,6 @@ "lodash.merge": "^4.6.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.0.0", "codecov": "^3.0.2", "eslint": "^5.0.0", "eslint-config-prettier": "^4.0.0", diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 8e5845ffb98..154129b3463 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -1,263 +1,100 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "To regenerate it, use `npm run generate-scaffolding`." +[//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# Google Cloud Natural Language API: Node.js Samples +# [Natural Language: Node.js Samples](https://github.com/googleapis/nodejs-language) [![Open in Cloud Shell][shell_img]][shell_link] -[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. +[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural +language understanding technologies to developers, including sentiment analysis, entity +analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. ## Table of Contents * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Automl Natural Language Dataset](#automl-natural-language-dataset) + * [Automl Natural Language Model](#automl-natural-language-model) + * [Automl Natural Language Predict](#automl-natural-language-predict) * [Quickstart](#quickstart) - * [Analyze v1](#analyze-v1) - * [Analyze v1beta2](#analyze-v1beta2) - * [AutoML Dataset](#auto-ml-dataset) - * [AutoML Model](#auto-ml-model) - * [AutoML Predict](#auto-ml-predict) ## Before you begin -Before running the samples, make sure you've followed the steps in the -[Before you begin section](../README.md#before-you-begin) of the client -library's README. +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-language#using-the-client-library). ## Samples + + +### Automl Natural Language Dataset + +View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageDataset.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageDataset.js,samples/README.md) + +__Usage:__ + + +`node automlNaturalLanguageDataset.js` + + +----- + + + + +### Automl Natural Language Model + +View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageModel.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageModel.js,samples/README.md) + +__Usage:__ + + +`node automlNaturalLanguageModel.js` + + +----- + + + + +### Automl Natural Language Predict + +View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguagePredict.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguagePredict.js,samples/README.md) + +__Usage:__ + + +`node automlNaturalLanguagePredict.js` + + +----- + + + + ### Quickstart -View the [source code][quickstart_0_code]. +View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/quickstart.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) -__Usage:__ `node quickstart.js` - -``` -Text: Hello, world! -Sentiment score: 0.30000001192092896 -Sentiment magnitude: 0.30000001192092896 -``` +__Usage:__ + -[quickstart_0_docs]: https://cloud.google.com/natural-language/docs/quickstart-client-libraries -[quickstart_0_code]: quickstart.js +`node quickstart.js` -### Analyze v1 -View the [source code][analyze-v1_1_code]. -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) -__Usage:__ `node analyze.v1.js --help` - -``` -analyze.v1.js -Commands: - analyze.v1.js sentiment-text Detects sentiment of a string. - analyze.v1.js sentiment-file Detects sentiment in a file in Google Cloud Storage. - analyze.v1.js entities-text Detects entities in a string. - analyze.v1.js entities-file Detects entities in a file in Google Cloud Storage. - analyze.v1.js syntax-text Detects syntax of a string. - analyze.v1.js syntax-file Detects syntax in a file in Google Cloud Storage. - analyze.v1.js entity-sentiment-text Detects sentiment of the entities in a string. - analyze.v1.js entity-sentiment-file Detects sentiment of the entities in a file in Google - Cloud Storage. - analyze.v1.js classify-text Classifies text of a string. - analyze.v1.js classify-file Classifies text in a file in Google Cloud Storage. - -Options: - --version Show version number [boolean] - --help Show help [boolean] - -Examples: - node analyze.v1.js sentiment-text "President Obama is speaking at the White House." - node analyze.v1.js sentiment-file my-bucket file.txt Detects sentiment in gs://my-bucket/file.txt - node analyze.v1.js entities-text "President Obama is speaking at the White House." - node analyze.v1.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt - node analyze.v1.js syntax-text "President Obama is speaking at the White House." - node analyze.v1.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt - node analyze.v1.js entity-sentiment-text "President Obama is speaking at the White House." - node analyze.v1.js entity-sentiment-file my-bucket file.txt Detects sentiment of entities in gs://my-bucket/file.txt - node analyze.v1.js classify-text "Android is a mobile operating system developed by Google, based on the Linux - kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets." - node analyze.v1.js classify-file my-bucket android_text.txt Detects syntax in gs://my-bucket/android_text.txt - -For more information, see https://cloud.google.com/natural-language/docs -``` - -[analyze-v1_1_docs]: https://cloud.google.com/natural-language/docs/ -[analyze-v1_1_code]: analyze.v1.js - -### Analyze v1beta2 - -View the [source code][analyze-v1beta2_2_code]. - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) - -__Usage:__ `node analyze.v1beta2.js --help` - -``` -analyze.v1beta2.js - -Commands: - analyze.v1beta2.js sentiment-text Detects sentiment of a string. - analyze.v1beta2.js sentiment-file Detects sentiment in a file in Google Cloud Storage. - analyze.v1beta2.js entities-text Detects entities in a string. - analyze.v1beta2.js entities-file Detects entities in a file in Google Cloud Storage. - analyze.v1beta2.js syntax-text Detects syntax of a string. - analyze.v1beta2.js syntax-file Detects syntax in a file in Google Cloud Storage. - analyze.v1beta2.js classify-text Classifies text of a string. - analyze.v1beta2.js classify-file Classifies text in a file in Google Cloud Storage. - -Options: - --version Show version number [boolean] - --help Show help [boolean] - -Examples: - node analyze.v1beta2.js sentiment-text "President Obama is speaking at the White House." - node analyze.v1beta2.js sentiment-file my-bucket file.txt Detects sentiment in gs://my-bucket/file.txt - node analyze.v1beta2.js entities-text "President Obama is speaking at the White House." - node analyze.v1beta2.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt - node analyze.v1beta2.js syntax-text "President Obama is speaking at the White House." - node analyze.v1beta2.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt - node analyze.v1beta2.js classify-text "Android is a mobile operating system developed by Google, based on the Linux - kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets." - node analyze.v1beta2.js classify-file my-bucket Detects syntax in gs://my-bucket/android_text.txt - android_text.txt - -For more information, see https://cloud.google.com/natural-language/docs -``` - -[analyze-v1beta2_2_docs]: https://cloud.google.com/natural-language/docs/ -[analyze-v1beta2_2_code]: analyze.v1beta2.js - -### AutoML Dataset - -View the [source code][automl-nl-dataset_3_code]. - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageDataset.js,samples/README.md) - -__Usage:__ `node automl/automlNaturalLanguageDataset.js --help` - -``` -automlNaturalLanguageDataset.js - -Commands: - automlNaturalLanguageDataset.js create-dataset creates a new Dataset - automlNaturalLanguageDataset.js list-datasets list all Datasets - automlNaturalLanguageDataset.js get-dataset Get a Dataset - automlNaturalLanguageDataset.js delete-dataset Delete a dataset - automlNaturalLanguageDataset.js import-data Import labeled items into dataset - automlNaturalLanguageDataset.js export-data Export a dataset to a Google Cloud Storage Bucket - -Options: - --version Show version number [boolean] - --computeRegion, -c region name e.g. "us-central1" [string] - --datasetName, -n Name of the Dataset [string] [default: "testDataSet"] - --datasetId, -i Id of the dataset [string] - --filter, -f filter expression [string] [default: "text_classification_dataset_metadata:*"] - --multilabel, -m Type of the classification problem, False - MULTICLASS, True - MULTILABEL. - [string] [default: false] - --outputUri, -o URI (or local path) to export dataset [string] - --path, -p URI or local path to input .csv, or array of .csv paths - [string] [default: "gs://nodejs-docs-samples-vcm/flowerTraindataMini.csv"] - --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "long-door-651"] - --help Show help [boolean] - -Examples: - node automlNaturalLanguageDataset.js create-dataset -n "newDataSet" - node automlNaturalLanguageDataset.js list-datasets -f "imageClassificationDatasetMetadata:*" - node automlNaturalLanguageDataset.js get-dataset -i "DATASETID" - node automlNaturalLanguageDataset.js delete-dataset -i "DATASETID" - node automlNaturalLanguageDataset.js import-data -i "dataSetId" -p "gs://myproject/mytraindata.csv" - node automlNaturalLanguageDataset.js export-data -i "dataSetId" -o "gs://myproject/outputdestination.csv" -``` - -[automl-nl-dataset_3_docs]: https://cloud.google.com/natural-language/docs/ -[automl-nl-dataset_3_code]: automl/automlNaturalLanguageDataset.js - -### AutoML Model - -View the [source code][automl-nl-model_4_code]. - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageModel.js,samples/README.md) - -__Usage:__ `node automl/automlNaturalLanguageModel.js --help` - -``` -automlNaturalLanguageModel.js - -Commands: - automlNaturalLanguageModel.js create-model creates a new Model - automlNaturalLanguageModel.js get-operation-status Gets status of current operation - automlNaturalLanguageModel.js list-models list all Models - automlNaturalLanguageModel.js get-model Get a Model - automlNaturalLanguageModel.js list-model-evaluations List model evaluations - automlNaturalLanguageModel.js get-model-evaluation Get model evaluation - automlNaturalLanguageModel.js display-evaluation Display evaluation - automlNaturalLanguageModel.js delete-model Delete a Model - -Options: - --version Show version number [boolean] - --computeRegion, -c region name e.g. "us-central1" [string] - --datasetId, -i Id of the dataset [string] - --filter, -f Name of the Dataset to search for [string] [default: ""] - --modelName, -m Name of the model [string] [default: false] - --modelId, -a Id of the model [string] [default: ""] - --modelEvaluationId, -e Id of the model evaluation [string] [default: ""] - --operationFullId, -o Full name of an operation [string] [default: ""] - --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "long-door-651"] - --trainBudget, -t Budget for training the model [string] [default: ""] - --help Show help [boolean] - -Examples: - node automlNaturalLanguageModel.js create-model -i "DatasetID" -m "myModelName" -t "2" - node automlNaturalLanguageModel.js get-operation-status -i "datasetId" -o "OperationFullID" - node automlNaturalLanguageModel.js list-models -f "textClassificationModelMetadata:*" - node automlNaturalLanguageModel.js get-model -a "ModelID" - node automlNaturalLanguageModel.js list-model-evaluations -a "ModelID" - node automlNaturalLanguageModel.js get-model-evaluation -a "ModelId" -e "ModelEvaluationID" - node automlNaturalLanguageModel.js display-evaluation -a "ModelId" - node automlNaturalLanguageModel.js delete-model -a "ModelID" -``` - -[automl-nl-model_4_docs]: https://cloud.google.com/natural-language/docs/ -[automl-nl-model_4_code]: automl/automlNaturalLanguageModel.js - -### AutoML Predict - -View the [source code][automl-nl-predict_5_code]. - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguagePredict.js,samples/README.md) - -__Usage:__ `node automl/automlNaturalLanguagePredict.js --help` - -``` -automlNaturalLanguagePredict.js - -Commands: - automlNaturalLanguagePredict.js predict classify the content - -Options: - --version Show version number [boolean] - --computeRegion, -c region name e.g. "us-central1" [string] - --filePath, -f local text file path of the content to be classified [string] [default: "./resources/test.txt"] - --modelId, -i Id of the model which will be used for text classification [string] - --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "long-door-651"] - --scoreThreshold, -s A value from 0.0 to 1.0. When the model makes predictions for an image it willonly produce - results that have at least this confidence score threshold. Default is .5 - [string] [default: "0.5"] - --help Show help [boolean] - -Examples: - node automlNaturalLanguagePredict.js predict -i "modelId" -f "./resources/test.txt" -s "0.5" -``` - -[automl-nl-predict_5_docs]: https://cloud.google.com/natural-language/docs/ -[automl-nl-predict_5_code]: automl/automlNaturalLanguagePredict.js [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/natural-language/docs/ \ No newline at end of file From e273113a9d3f8ed7195839851dd08246bd2cbf3b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 6 Jun 2019 10:18:03 -0700 Subject: [PATCH 247/488] chore: release 3.2.0 (#258) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index fcc29d307fa..32589cc83c3 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [3.2.0](https://www.github.com/googleapis/nodejs-language/compare/v3.1.0...v3.2.0) (2019-06-06) + + +### Features + +* add .repo-metadata.json and generate README ([#255](https://www.github.com/googleapis/nodejs-language/issues/255)) ([0853696](https://www.github.com/googleapis/nodejs-language/commit/0853696)) + ## [3.1.0](https://www.github.com/googleapis/nodejs-language/compare/v3.0.0...v3.1.0) (2019-06-05) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6b26feb9349..828926fe733 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.1.0", + "version": "3.2.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index b0c2fcb3080..e2385f41e26 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^5.1.0", - "@google-cloud/language": "^3.1.0", + "@google-cloud/language": "^3.2.0", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" }, From 799c5b7dd39e200031dfa47273cb858092603756 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 7 Jun 2019 07:25:41 -0700 Subject: [PATCH 248/488] refactor: changes formatting of various statements --- packages/google-cloud-language/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 2ff517d8b8c..2f56ccc1f49 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-06-05T14:20:03.832982Z", + "updateTime": "2019-06-07T11:16:44.115246Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b", - "internalRef": "251635729" + "sha": "15fdbe57306e3a56069af5e2595e9b1bb33b6123", + "internalRef": "251960694" } }, { From 078346dc51f62b17b8a90961780b24fa7f58f291 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 11 Jun 2019 05:23:11 -0700 Subject: [PATCH 249/488] docs: add v1 and v1beta2 samples to README (#260) --- packages/google-cloud-language/README.md | 2 ++ .../google-cloud-language/samples/README.md | 36 +++++++++++++++++++ packages/google-cloud-language/synth.metadata | 10 +++--- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 3aa9bb0ecd2..120d6f9d5ed 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -92,6 +92,8 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) | +| Analyze v1beta2 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) | | Automl Natural Language Dataset | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageDataset.js,samples/README.md) | | Automl Natural Language Model | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageModel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageModel.js,samples/README.md) | | Automl Natural Language Predict | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguagePredict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguagePredict.js,samples/README.md) | diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 154129b3463..472cf7b82f8 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -14,6 +14,8 @@ analysis, and syntax analysis. This API is part of the larger Cloud Machine Lear * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Analyze v1](#analyze-v1) + * [Analyze v1beta2](#analyze-v1beta2) * [Automl Natural Language Dataset](#automl-natural-language-dataset) * [Automl Natural Language Model](#automl-natural-language-model) * [Automl Natural Language Predict](#automl-natural-language-predict) @@ -28,6 +30,40 @@ Before running the samples, make sure you've followed the steps outlined in +### Analyze v1 + +View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) + +__Usage:__ + + +`node analyze.v1.js` + + +----- + + + + +### Analyze v1beta2 + +View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) + +__Usage:__ + + +`node analyze.v1beta2.js` + + +----- + + + + ### Automl Natural Language Dataset View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageDataset.js). diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 2f56ccc1f49..6e1439ca38f 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-07T11:16:44.115246Z", + "updateTime": "2019-06-11T11:16:43.608753Z", "sources": [ { "generator": { "name": "artman", - "version": "0.23.1", - "dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0" + "version": "0.24.0", + "dockerImage": "googleapis/artman@sha256:ce425884865f57f18307e597bca1a74a3619b7098688d4995261f3ffb3488681" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "15fdbe57306e3a56069af5e2595e9b1bb33b6123", - "internalRef": "251960694" + "sha": "744feb9660b3194fcde37dea50038bde204f3573", + "internalRef": "252553801" } }, { From 8dabcba2e5d097e7dbe3e7e00f75b137d13b5bb6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 11 Jun 2019 09:54:58 -0700 Subject: [PATCH 250/488] fix(deps): update dependency mathjs to v6 (#261) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index e2385f41e26..36554c65256 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/automl": "^1.0.0", - "mathjs": "^5.1.0", + "mathjs": "^6.0.0", "@google-cloud/language": "^3.2.0", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" From 6a5b775b57809df8bd29eb166cda9bd5e08dd657 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 11 Jun 2019 10:02:42 -0700 Subject: [PATCH 251/488] chore: release 3.2.1 (#262) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 32589cc83c3..a497293b3d9 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.2.1](https://www.github.com/googleapis/nodejs-language/compare/v3.2.0...v3.2.1) (2019-06-11) + + +### Bug Fixes + +* **deps:** update dependency mathjs to v6 ([#261](https://www.github.com/googleapis/nodejs-language/issues/261)) ([eeb2847](https://www.github.com/googleapis/nodejs-language/commit/eeb2847)) + ## [3.2.0](https://www.github.com/googleapis/nodejs-language/compare/v3.1.0...v3.2.0) (2019-06-06) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 828926fe733..6d851fc11f9 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.2.0", + "version": "3.2.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 36554c65256..b65597cde81 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.2.0", + "@google-cloud/language": "^3.2.1", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" }, From 4268e55c0ba8ba501b20174570b0eab20f5fb850 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 12 Jun 2019 22:10:16 -0700 Subject: [PATCH 252/488] fix(docs): move to new client docs URL (#263) --- packages/google-cloud-language/.repo-metadata.json | 5 ++--- packages/google-cloud-language/README.md | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/.repo-metadata.json b/packages/google-cloud-language/.repo-metadata.json index 5f2c8fe467e..95f6bc936a9 100644 --- a/packages/google-cloud-language/.repo-metadata.json +++ b/packages/google-cloud-language/.repo-metadata.json @@ -2,7 +2,7 @@ "name": "language", "name_pretty": "Natural Language", "product_documentation": "https://cloud.google.com/natural-language/docs/", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/language/latest/", + "client_documentation": "https://googleapis.dev/nodejs/language/latest", "issue_tracker": "https://issuetracker.google.com/savedsearches/559753", "release_level": "ga", "language": "nodejs", @@ -10,5 +10,4 @@ "distribution_name": "@google-cloud/language", "api_id": "language.googleapis.com", "requires_billing": true -} - +} \ No newline at end of file diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 120d6f9d5ed..77967fa8ff6 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -133,7 +133,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest/ +[client-docs]: https://googleapis.dev/nodejs/language/latest [product-docs]: https://cloud.google.com/natural-language/docs/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 3c5d7e7c535c76413cb4ac9984320515c9e10b85 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 14 Jun 2019 07:44:09 -0700 Subject: [PATCH 253/488] chore: release 3.2.2 (#264) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index a497293b3d9..b72aa45b7d9 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.2.2](https://www.github.com/googleapis/nodejs-language/compare/v3.2.1...v3.2.2) (2019-06-14) + + +### Bug Fixes + +* **docs:** move to new client docs URL ([#263](https://www.github.com/googleapis/nodejs-language/issues/263)) ([7bbc8a2](https://www.github.com/googleapis/nodejs-language/commit/7bbc8a2)) + ### [3.2.1](https://www.github.com/googleapis/nodejs-language/compare/v3.2.0...v3.2.1) (2019-06-11) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6d851fc11f9..307f29cb4a5 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.2.1", + "version": "3.2.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index b65597cde81..7d073488026 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.2.1", + "@google-cloud/language": "^3.2.2", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" }, From 8d893007652eb4736aff391765aa22281f9947d4 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 18 Jun 2019 14:22:13 -0700 Subject: [PATCH 254/488] build: switch to GitHub magic proxy, for release-please (#266) --- packages/google-cloud-language/synth.metadata | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 6e1439ca38f..bfe070ca243 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-11T11:16:43.608753Z", + "updateTime": "2019-06-18T01:02:04.325447Z", "sources": [ { "generator": { "name": "artman", - "version": "0.24.0", - "dockerImage": "googleapis/artman@sha256:ce425884865f57f18307e597bca1a74a3619b7098688d4995261f3ffb3488681" + "version": "0.26.0", + "dockerImage": "googleapis/artman@sha256:6db0735b0d3beec5b887153a2a7c7411fc7bb53f73f6f389a822096bd14a3a15" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "744feb9660b3194fcde37dea50038bde204f3573", - "internalRef": "252553801" + "sha": "384aa843867c4d17756d14a01f047b6368494d32", + "internalRef": "253675319" } }, { From cac9e841cb0092c010ea3a6e6068e782261fa703 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 25 Jun 2019 16:42:28 -0700 Subject: [PATCH 255/488] fix(docs): link to reference docs section on googleapis.dev (#267) * fix(docs): reference docs should link to section of googleapis.dev with API reference * fix(docs): make anchors work in jsdoc --- packages/google-cloud-language/.jsdoc.js | 3 +++ packages/google-cloud-language/README.md | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index dcafb9d64d5..db69c417bfe 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -41,5 +41,8 @@ module.exports = { sourceFiles: false, systemName: '@google-cloud/language', theme: 'lumen' + }, + markdown: { + idInHeadings: true } }; diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 77967fa8ff6..37047e8f437 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -133,10 +133,12 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/language/latest +[client-docs]: https://googleapis.dev/nodejs/language/latest#reference [product-docs]: https://cloud.google.com/natural-language/docs/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=language.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file +[auth]: https://cloud.google.com/docs/authentication/getting-started + + From df4de9f0f1dd5222a986d7d4008b7fb537eee604 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 26 Jun 2019 15:11:10 -0700 Subject: [PATCH 256/488] chore: release 3.2.3 (#268) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index b72aa45b7d9..e00754b3c42 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.2.3](https://www.github.com/googleapis/nodejs-language/compare/v3.2.2...v3.2.3) (2019-06-26) + + +### Bug Fixes + +* **docs:** link to reference docs section on googleapis.dev ([#267](https://www.github.com/googleapis/nodejs-language/issues/267)) ([d7d8440](https://www.github.com/googleapis/nodejs-language/commit/d7d8440)) + ### [3.2.2](https://www.github.com/googleapis/nodejs-language/compare/v3.2.1...v3.2.2) (2019-06-14) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 307f29cb4a5..fe7f10958d8 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.2.2", + "version": "3.2.3", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 7d073488026..1d1d7bc9518 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.2.2", + "@google-cloud/language": "^3.2.3", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" }, From 1f576ba313e4b39b0631ac0f2811db93094df9d2 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 28 Jun 2019 10:06:29 -0700 Subject: [PATCH 257/488] build: use config file for linkinator (#269) --- packages/google-cloud-language/linkinator.config.json | 7 +++++++ packages/google-cloud-language/package.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-language/linkinator.config.json diff --git a/packages/google-cloud-language/linkinator.config.json b/packages/google-cloud-language/linkinator.config.json new file mode 100644 index 00000000000..d780d6bfff5 --- /dev/null +++ b/packages/google-cloud-language/linkinator.config.json @@ -0,0 +1,7 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com" + ] +} diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index fe7f10958d8..186dd9f8082 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -38,7 +38,7 @@ "test-no-cover": "mocha test/*.js", "test": "npm run cover", "fix": "eslint --fix '**/*.js'", - "docs-test": "linkinator docs -r --skip https://github.com/googleapis/nodejs-language/blob/master/samples/.+", + "docs-test": "linkinator docs", "predocs-test": "npm run docs" }, "dependencies": { @@ -58,6 +58,6 @@ "nyc": "^14.0.0", "power-assert": "^1.6.0", "prettier": "^1.13.5", - "linkinator": "^1.1.2" + "linkinator": "^1.5.0" } } From 791ced831af71d03fad9f6a193eddd2de4c69372 Mon Sep 17 00:00:00 2001 From: Cyd La Luz Date: Tue, 23 Jul 2019 13:32:01 -0700 Subject: [PATCH 258/488] fix(deps): drop unused dependency lodash.merge --- packages/google-cloud-language/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 186dd9f8082..4b86cc1247f 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -42,8 +42,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^1.0.0", - "lodash.merge": "^4.6.1" + "google-gax": "^1.0.0" }, "devDependencies": { "codecov": "^3.0.2", From 85b5f366f27bfa2d2b1b4425aa38023ca5dfc32e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 23 Jul 2019 13:50:01 -0700 Subject: [PATCH 259/488] chore: release 3.2.4 (#272) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index e00754b3c42..226d7958e62 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.2.4](https://www.github.com/googleapis/nodejs-language/compare/v3.2.3...v3.2.4) (2019-07-23) + + +### Bug Fixes + +* **deps:** drop unused dependency lodash.merge ([2e53ead](https://www.github.com/googleapis/nodejs-language/commit/2e53ead)) + ### [3.2.3](https://www.github.com/googleapis/nodejs-language/compare/v3.2.2...v3.2.3) (2019-06-26) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 4b86cc1247f..f6e7c94459d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.2.3", + "version": "3.2.4", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 1d1d7bc9518..935aac87283 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.2.3", + "@google-cloud/language": "^3.2.4", "@google-cloud/storage": "^2.0.0", "yargs": "^13.0.0" }, From defe4bec07e82ffb67dd87b0f04a212b3ae916f1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Jul 2019 18:58:25 +0300 Subject: [PATCH 260/488] chore(deps): update linters (#274) --- packages/google-cloud-language/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f6e7c94459d..0214aa7c017 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -46,8 +46,8 @@ }, "devDependencies": { "codecov": "^3.0.2", - "eslint": "^5.0.0", - "eslint-config-prettier": "^4.0.0", + "eslint": "^6.0.0", + "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", "jsdoc-baseline": "^0.1.0", From c3b25ec2921448bfd51220fa27fd128120c29157 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Jul 2019 20:57:44 +0300 Subject: [PATCH 261/488] fix(deps): update dependency @google-cloud/storage to v3 (#275) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 935aac87283..aabef5d7a8b 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -18,7 +18,7 @@ "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", "@google-cloud/language": "^3.2.4", - "@google-cloud/storage": "^2.0.0", + "@google-cloud/storage": "^3.0.0", "yargs": "^13.0.0" }, "devDependencies": { From d54e81b8b2e85a7e3d5f390c77401bc3b44072c9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 26 Jul 2019 11:21:51 -0700 Subject: [PATCH 262/488] chore: release 3.2.5 (#276) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 226d7958e62..26491e99e78 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.2.5](https://www.github.com/googleapis/nodejs-language/compare/v3.2.4...v3.2.5) (2019-07-26) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/storage to v3 ([#275](https://www.github.com/googleapis/nodejs-language/issues/275)) ([aa7eeaa](https://www.github.com/googleapis/nodejs-language/commit/aa7eeaa)) + ### [3.2.4](https://www.github.com/googleapis/nodejs-language/compare/v3.2.3...v3.2.4) (2019-07-23) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 0214aa7c017..548613421bb 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.2.4", + "version": "3.2.5", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index aabef5d7a8b..721b6e640ad 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.2.4", + "@google-cloud/language": "^3.2.5", "@google-cloud/storage": "^3.0.0", "yargs": "^13.0.0" }, From 7e4eb80b84b6c49064c797b5464e736024a66e46 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Jul 2019 08:42:34 -0700 Subject: [PATCH 263/488] docs: use the jsdoc-fresh theme (#278) --- packages/google-cloud-language/.jsdoc.js | 2 +- packages/google-cloud-language/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index db69c417bfe..d6289080b88 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -20,7 +20,7 @@ module.exports = { opts: { readme: './README.md', package: './package.json', - template: './node_modules/jsdoc-baseline', + template: './node_modules/jsdoc-fresh', recurse: true, verbose: true, destination: './docs/' diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 548613421bb..8f7a50ccb12 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -50,7 +50,7 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", - "jsdoc-baseline": "^0.1.0", + "jsdoc-fresh": "^1.0.1", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^6.0.0", From e57e64122c7e4c4645d9ce8dc8eba54abbd799e8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Jul 2019 16:07:06 -0700 Subject: [PATCH 264/488] docs: document apiEndpoint over servicePath (#279) --- .../google-cloud-language/src/v1/language_service_client.js | 2 +- .../src/v1beta2/language_service_client.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index dbd900faafb..f6776fc5a6a 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -52,7 +52,7 @@ class LanguageServiceClient { * your project ID will be detected automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string} [options.servicePath] - The domain name of the + * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. */ constructor(opts) { diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 868dfe172f2..0368b8f4eca 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -52,7 +52,7 @@ class LanguageServiceClient { * your project ID will be detected automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. - * @param {string} [options.servicePath] - The domain name of the + * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. */ constructor(opts) { From a4d3109a14942b5f7c462f939116fe55decab1f9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 3 Aug 2019 16:00:39 -0700 Subject: [PATCH 265/488] fix: allow calls with no request, add JSON proto (#282) --- .../google-cloud-language/protos/protos.json | 1972 +++++++++++++++++ .../src/service_proto_list.json | 1 + .../src/v1/language_service_client.js | 6 + .../src/v1beta2/language_service_client.js | 6 + packages/google-cloud-language/synth.metadata | 10 +- 5 files changed, 1990 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-language/protos/protos.json create mode 100644 packages/google-cloud-language/src/service_proto_list.json diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json new file mode 100644 index 00000000000..a1afe81bf42 --- /dev/null +++ b/packages/google-cloud-language/protos/protos.json @@ -0,0 +1,1972 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "language": { + "nested": { + "v1beta2": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/language/v1beta2;language", + "java_multiple_files": true, + "java_outer_classname": "LanguageServiceProto", + "java_package": "com.google.cloud.language.v1beta2" + }, + "nested": { + "LanguageService": { + "methods": { + "AnalyzeSentiment": { + "requestType": "AnalyzeSentimentRequest", + "responseType": "AnalyzeSentimentResponse", + "options": { + "(google.api.http).post": "/v1beta2/documents:analyzeSentiment", + "(google.api.http).body": "*" + } + }, + "AnalyzeEntities": { + "requestType": "AnalyzeEntitiesRequest", + "responseType": "AnalyzeEntitiesResponse", + "options": { + "(google.api.http).post": "/v1beta2/documents:analyzeEntities", + "(google.api.http).body": "*" + } + }, + "AnalyzeEntitySentiment": { + "requestType": "AnalyzeEntitySentimentRequest", + "responseType": "AnalyzeEntitySentimentResponse", + "options": { + "(google.api.http).post": "/v1beta2/documents:analyzeEntitySentiment", + "(google.api.http).body": "*" + } + }, + "AnalyzeSyntax": { + "requestType": "AnalyzeSyntaxRequest", + "responseType": "AnalyzeSyntaxResponse", + "options": { + "(google.api.http).post": "/v1beta2/documents:analyzeSyntax", + "(google.api.http).body": "*" + } + }, + "ClassifyText": { + "requestType": "ClassifyTextRequest", + "responseType": "ClassifyTextResponse", + "options": { + "(google.api.http).post": "/v1beta2/documents:classifyText", + "(google.api.http).body": "*" + } + }, + "AnnotateText": { + "requestType": "AnnotateTextRequest", + "responseType": "AnnotateTextResponse", + "options": { + "(google.api.http).post": "/v1beta2/documents:annotateText", + "(google.api.http).body": "*" + } + } + } + }, + "Document": { + "oneofs": { + "source": { + "oneof": [ + "content", + "gcsContentUri" + ] + } + }, + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "content": { + "type": "string", + "id": 2 + }, + "gcsContentUri": { + "type": "string", + "id": 3 + }, + "language": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "PLAIN_TEXT": 1, + "HTML": 2 + } + } + } + }, + "Sentence": { + "fields": { + "text": { + "type": "TextSpan", + "id": 1 + }, + "sentiment": { + "type": "Sentiment", + "id": 2 + } + } + }, + "Entity": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "salience": { + "type": "float", + "id": 4 + }, + "mentions": { + "rule": "repeated", + "type": "EntityMention", + "id": 5 + }, + "sentiment": { + "type": "Sentiment", + "id": 6 + } + }, + "nested": { + "Type": { + "values": { + "UNKNOWN": 0, + "PERSON": 1, + "LOCATION": 2, + "ORGANIZATION": 3, + "EVENT": 4, + "WORK_OF_ART": 5, + "CONSUMER_GOOD": 6, + "OTHER": 7 + } + } + } + }, + "Token": { + "fields": { + "text": { + "type": "TextSpan", + "id": 1 + }, + "partOfSpeech": { + "type": "PartOfSpeech", + "id": 2 + }, + "dependencyEdge": { + "type": "DependencyEdge", + "id": 3 + }, + "lemma": { + "type": "string", + "id": 4 + } + } + }, + "Sentiment": { + "fields": { + "magnitude": { + "type": "float", + "id": 2 + }, + "score": { + "type": "float", + "id": 3 + } + } + }, + "PartOfSpeech": { + "fields": { + "tag": { + "type": "Tag", + "id": 1 + }, + "aspect": { + "type": "Aspect", + "id": 2 + }, + "case": { + "type": "Case", + "id": 3 + }, + "form": { + "type": "Form", + "id": 4 + }, + "gender": { + "type": "Gender", + "id": 5 + }, + "mood": { + "type": "Mood", + "id": 6 + }, + "number": { + "type": "Number", + "id": 7 + }, + "person": { + "type": "Person", + "id": 8 + }, + "proper": { + "type": "Proper", + "id": 9 + }, + "reciprocity": { + "type": "Reciprocity", + "id": 10 + }, + "tense": { + "type": "Tense", + "id": 11 + }, + "voice": { + "type": "Voice", + "id": 12 + } + }, + "nested": { + "Tag": { + "values": { + "UNKNOWN": 0, + "ADJ": 1, + "ADP": 2, + "ADV": 3, + "CONJ": 4, + "DET": 5, + "NOUN": 6, + "NUM": 7, + "PRON": 8, + "PRT": 9, + "PUNCT": 10, + "VERB": 11, + "X": 12, + "AFFIX": 13 + } + }, + "Aspect": { + "values": { + "ASPECT_UNKNOWN": 0, + "PERFECTIVE": 1, + "IMPERFECTIVE": 2, + "PROGRESSIVE": 3 + } + }, + "Case": { + "values": { + "CASE_UNKNOWN": 0, + "ACCUSATIVE": 1, + "ADVERBIAL": 2, + "COMPLEMENTIVE": 3, + "DATIVE": 4, + "GENITIVE": 5, + "INSTRUMENTAL": 6, + "LOCATIVE": 7, + "NOMINATIVE": 8, + "OBLIQUE": 9, + "PARTITIVE": 10, + "PREPOSITIONAL": 11, + "REFLEXIVE_CASE": 12, + "RELATIVE_CASE": 13, + "VOCATIVE": 14 + } + }, + "Form": { + "values": { + "FORM_UNKNOWN": 0, + "ADNOMIAL": 1, + "AUXILIARY": 2, + "COMPLEMENTIZER": 3, + "FINAL_ENDING": 4, + "GERUND": 5, + "REALIS": 6, + "IRREALIS": 7, + "SHORT": 8, + "LONG": 9, + "ORDER": 10, + "SPECIFIC": 11 + } + }, + "Gender": { + "values": { + "GENDER_UNKNOWN": 0, + "FEMININE": 1, + "MASCULINE": 2, + "NEUTER": 3 + } + }, + "Mood": { + "values": { + "MOOD_UNKNOWN": 0, + "CONDITIONAL_MOOD": 1, + "IMPERATIVE": 2, + "INDICATIVE": 3, + "INTERROGATIVE": 4, + "JUSSIVE": 5, + "SUBJUNCTIVE": 6 + } + }, + "Number": { + "values": { + "NUMBER_UNKNOWN": 0, + "SINGULAR": 1, + "PLURAL": 2, + "DUAL": 3 + } + }, + "Person": { + "values": { + "PERSON_UNKNOWN": 0, + "FIRST": 1, + "SECOND": 2, + "THIRD": 3, + "REFLEXIVE_PERSON": 4 + } + }, + "Proper": { + "values": { + "PROPER_UNKNOWN": 0, + "PROPER": 1, + "NOT_PROPER": 2 + } + }, + "Reciprocity": { + "values": { + "RECIPROCITY_UNKNOWN": 0, + "RECIPROCAL": 1, + "NON_RECIPROCAL": 2 + } + }, + "Tense": { + "values": { + "TENSE_UNKNOWN": 0, + "CONDITIONAL_TENSE": 1, + "FUTURE": 2, + "PAST": 3, + "PRESENT": 4, + "IMPERFECT": 5, + "PLUPERFECT": 6 + } + }, + "Voice": { + "values": { + "VOICE_UNKNOWN": 0, + "ACTIVE": 1, + "CAUSATIVE": 2, + "PASSIVE": 3 + } + } + } + }, + "DependencyEdge": { + "fields": { + "headTokenIndex": { + "type": "int32", + "id": 1 + }, + "label": { + "type": "Label", + "id": 2 + } + }, + "nested": { + "Label": { + "values": { + "UNKNOWN": 0, + "ABBREV": 1, + "ACOMP": 2, + "ADVCL": 3, + "ADVMOD": 4, + "AMOD": 5, + "APPOS": 6, + "ATTR": 7, + "AUX": 8, + "AUXPASS": 9, + "CC": 10, + "CCOMP": 11, + "CONJ": 12, + "CSUBJ": 13, + "CSUBJPASS": 14, + "DEP": 15, + "DET": 16, + "DISCOURSE": 17, + "DOBJ": 18, + "EXPL": 19, + "GOESWITH": 20, + "IOBJ": 21, + "MARK": 22, + "MWE": 23, + "MWV": 24, + "NEG": 25, + "NN": 26, + "NPADVMOD": 27, + "NSUBJ": 28, + "NSUBJPASS": 29, + "NUM": 30, + "NUMBER": 31, + "P": 32, + "PARATAXIS": 33, + "PARTMOD": 34, + "PCOMP": 35, + "POBJ": 36, + "POSS": 37, + "POSTNEG": 38, + "PRECOMP": 39, + "PRECONJ": 40, + "PREDET": 41, + "PREF": 42, + "PREP": 43, + "PRONL": 44, + "PRT": 45, + "PS": 46, + "QUANTMOD": 47, + "RCMOD": 48, + "RCMODREL": 49, + "RDROP": 50, + "REF": 51, + "REMNANT": 52, + "REPARANDUM": 53, + "ROOT": 54, + "SNUM": 55, + "SUFF": 56, + "TMOD": 57, + "TOPIC": 58, + "VMOD": 59, + "VOCATIVE": 60, + "XCOMP": 61, + "SUFFIX": 62, + "TITLE": 63, + "ADVPHMOD": 64, + "AUXCAUS": 65, + "AUXVV": 66, + "DTMOD": 67, + "FOREIGN": 68, + "KW": 69, + "LIST": 70, + "NOMC": 71, + "NOMCSUBJ": 72, + "NOMCSUBJPASS": 73, + "NUMC": 74, + "COP": 75, + "DISLOCATED": 76, + "ASP": 77, + "GMOD": 78, + "GOBJ": 79, + "INFMOD": 80, + "MES": 81, + "NCOMP": 82 + } + } + } + }, + "EntityMention": { + "fields": { + "text": { + "type": "TextSpan", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + }, + "sentiment": { + "type": "Sentiment", + "id": 3 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNKNOWN": 0, + "PROPER": 1, + "COMMON": 2 + } + } + } + }, + "TextSpan": { + "fields": { + "content": { + "type": "string", + "id": 1 + }, + "beginOffset": { + "type": "int32", + "id": 2 + } + } + }, + "ClassificationCategory": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "confidence": { + "type": "float", + "id": 2 + } + } + }, + "AnalyzeSentimentRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1 + }, + "encodingType": { + "type": "EncodingType", + "id": 2 + } + } + }, + "AnalyzeSentimentResponse": { + "fields": { + "documentSentiment": { + "type": "Sentiment", + "id": 1 + }, + "language": { + "type": "string", + "id": 2 + }, + "sentences": { + "rule": "repeated", + "type": "Sentence", + "id": 3 + } + } + }, + "AnalyzeEntitySentimentRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1 + }, + "encodingType": { + "type": "EncodingType", + "id": 2 + } + } + }, + "AnalyzeEntitySentimentResponse": { + "fields": { + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 1 + }, + "language": { + "type": "string", + "id": 2 + } + } + }, + "AnalyzeEntitiesRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1 + }, + "encodingType": { + "type": "EncodingType", + "id": 2 + } + } + }, + "AnalyzeEntitiesResponse": { + "fields": { + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 1 + }, + "language": { + "type": "string", + "id": 2 + } + } + }, + "AnalyzeSyntaxRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1 + }, + "encodingType": { + "type": "EncodingType", + "id": 2 + } + } + }, + "AnalyzeSyntaxResponse": { + "fields": { + "sentences": { + "rule": "repeated", + "type": "Sentence", + "id": 1 + }, + "tokens": { + "rule": "repeated", + "type": "Token", + "id": 2 + }, + "language": { + "type": "string", + "id": 3 + } + } + }, + "ClassifyTextRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1 + } + } + }, + "ClassifyTextResponse": { + "fields": { + "categories": { + "rule": "repeated", + "type": "ClassificationCategory", + "id": 1 + } + } + }, + "AnnotateTextRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1 + }, + "features": { + "type": "Features", + "id": 2 + }, + "encodingType": { + "type": "EncodingType", + "id": 3 + } + }, + "nested": { + "Features": { + "fields": { + "extractSyntax": { + "type": "bool", + "id": 1 + }, + "extractEntities": { + "type": "bool", + "id": 2 + }, + "extractDocumentSentiment": { + "type": "bool", + "id": 3 + }, + "extractEntitySentiment": { + "type": "bool", + "id": 4 + }, + "classifyText": { + "type": "bool", + "id": 6 + } + } + } + } + }, + "AnnotateTextResponse": { + "fields": { + "sentences": { + "rule": "repeated", + "type": "Sentence", + "id": 1 + }, + "tokens": { + "rule": "repeated", + "type": "Token", + "id": 2 + }, + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 3 + }, + "documentSentiment": { + "type": "Sentiment", + "id": 4 + }, + "language": { + "type": "string", + "id": 5 + }, + "categories": { + "rule": "repeated", + "type": "ClassificationCategory", + "id": 6 + } + } + }, + "EncodingType": { + "values": { + "NONE": 0, + "UTF8": 1, + "UTF16": 2, + "UTF32": 3 + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "HttpProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": false + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}" + } + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}" + } + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}" + } + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*" + } + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-language/src/service_proto_list.json b/packages/google-cloud-language/src/service_proto_list.json new file mode 100644 index 00000000000..a94f8da1953 --- /dev/null +++ b/packages/google-cloud-language/src/service_proto_list.json @@ -0,0 +1 @@ +["../protos/google/cloud/language/v1beta2/language_service.proto"] \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index f6776fc5a6a..5e91b74da2a 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -239,6 +239,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.analyzeSentiment(request, options, callback); @@ -293,6 +294,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.analyzeEntities(request, options, callback); @@ -346,6 +348,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.analyzeEntitySentiment( @@ -404,6 +407,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.analyzeSyntax(request, options, callback); @@ -452,6 +456,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.classifyText(request, options, callback); @@ -514,6 +519,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.annotateText(request, options, callback); diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 0368b8f4eca..afb607d6e1f 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -237,6 +237,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.analyzeSentiment(request, options, callback); @@ -291,6 +292,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.analyzeEntities(request, options, callback); @@ -346,6 +348,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.analyzeEntitySentiment( @@ -404,6 +407,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.analyzeSyntax(request, options, callback); @@ -452,6 +456,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.classifyText(request, options, callback); @@ -514,6 +519,7 @@ class LanguageServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.annotateText(request, options, callback); diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index bfe070ca243..af456b91a3c 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-18T01:02:04.325447Z", + "updateTime": "2019-08-02T11:18:22.622909Z", "sources": [ { "generator": { "name": "artman", - "version": "0.26.0", - "dockerImage": "googleapis/artman@sha256:6db0735b0d3beec5b887153a2a7c7411fc7bb53f73f6f389a822096bd14a3a15" + "version": "0.32.0", + "dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "384aa843867c4d17756d14a01f047b6368494d32", - "internalRef": "253675319" + "sha": "3a40d3a5f5e5a33fd49888a8a33ed021f65c0ccf", + "internalRef": "261297518" } }, { From 46a43c41ec75d8164b5a5f8ef6302b2ed01fa0c9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 3 Aug 2019 16:17:32 -0700 Subject: [PATCH 266/488] chore: release 3.2.6 (#283) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 26491e99e78..6bda25f8dd8 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.2.6](https://www.github.com/googleapis/nodejs-language/compare/v3.2.5...v3.2.6) (2019-08-03) + + +### Bug Fixes + +* allow calls with no request, add JSON proto ([#282](https://www.github.com/googleapis/nodejs-language/issues/282)) ([c358df9](https://www.github.com/googleapis/nodejs-language/commit/c358df9)) + ### [3.2.5](https://www.github.com/googleapis/nodejs-language/compare/v3.2.4...v3.2.5) (2019-07-26) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 8f7a50ccb12..1c5e6ad0831 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.2.5", + "version": "3.2.6", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 721b6e640ad..89d5448f9b9 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.2.5", + "@google-cloud/language": "^3.2.6", "@google-cloud/storage": "^3.0.0", "yargs": "^13.0.0" }, From de3f03fcb31b4f28c6408faae36bf9c5cb3acced Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 20 Aug 2019 20:23:24 +0300 Subject: [PATCH 267/488] fix(deps): update dependency yargs to v14 --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 89d5448f9b9..bb5851d4cd0 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -19,7 +19,7 @@ "mathjs": "^6.0.0", "@google-cloud/language": "^3.2.6", "@google-cloud/storage": "^3.0.0", - "yargs": "^13.0.0" + "yargs": "^14.0.0" }, "devDependencies": { "chai": "^4.2.0", From 419084068b8f8e5ff0fad4129e0b78caa9f58696 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 25 Aug 2019 19:26:35 -0700 Subject: [PATCH 268/488] fix: use process versions object for client header (#287) --- .../src/v1/language_service_client.js | 2 +- .../src/v1beta2/language_service_client.js | 2 +- packages/google-cloud-language/synth.metadata | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 5e91b74da2a..40c896ee0b8 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -82,7 +82,7 @@ class LanguageServiceClient { // Determine the client header string. const clientHeader = [ - `gl-node/${process.version}`, + `gl-node/${process.versions.node}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index afb607d6e1f..bbc94f79d29 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -82,7 +82,7 @@ class LanguageServiceClient { // Determine the client header string. const clientHeader = [ - `gl-node/${process.version}`, + `gl-node/${process.versions.node}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index af456b91a3c..913c95807ca 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-02T11:18:22.622909Z", + "updateTime": "2019-08-21T11:16:40.600200Z", "sources": [ { "generator": { "name": "artman", - "version": "0.32.0", - "dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d" + "version": "0.34.0", + "dockerImage": "googleapis/artman@sha256:38a27ba6245f96c3e86df7acb2ebcc33b4f186d9e475efe2d64303aec3d4e0ea" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a40d3a5f5e5a33fd49888a8a33ed021f65c0ccf", - "internalRef": "261297518" + "sha": "11592a15391951348a64f5c303399733b1c5b3b2", + "internalRef": "264425502" } }, { From be82dbd7d9329d65088218eb36d3162bb458eb81 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 28 Aug 2019 12:22:21 -0700 Subject: [PATCH 269/488] docs: update link to client docs (#288) --- packages/google-cloud-language/README.md | 4 +--- packages/google-cloud-language/synth.metadata | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 37047e8f437..33d0a843ceb 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -133,12 +133,10 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/language/latest#reference +[client-docs]: https://googleapis.dev/nodejs/language/latest [product-docs]: https://cloud.google.com/natural-language/docs/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=language.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started - - diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 913c95807ca..bb08c6bd045 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-21T11:16:40.600200Z", + "updateTime": "2019-08-28T11:16:17.514480Z", "sources": [ { "generator": { "name": "artman", - "version": "0.34.0", - "dockerImage": "googleapis/artman@sha256:38a27ba6245f96c3e86df7acb2ebcc33b4f186d9e475efe2d64303aec3d4e0ea" + "version": "0.35.1", + "dockerImage": "googleapis/artman@sha256:b11c7ea0d0831c54016fb50f4b796d24d1971439b30fbc32a369ba1ac887c384" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "11592a15391951348a64f5c303399733b1c5b3b2", - "internalRef": "264425502" + "sha": "dbd38035c35083507e2f0b839985cf17e212cb1c", + "internalRef": "265796259" } }, { From 7e6f31fda2a6296c343c0c65ee56a17c4757e61d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 3 Sep 2019 14:05:29 -0700 Subject: [PATCH 270/488] feat: load protos from JSON, grpc-fallback support * [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * fixes * fix webpack.config.js --- .../google-cloud-language/protos/protos.json | 799 +++++++++++++++++- packages/google-cloud-language/src/browser.js | 21 + .../src/service_proto_list.json | 1 - .../src/v1/language_service_client.js | 69 +- .../src/v1/language_service_proto_list.json | 3 + .../src/v1beta2/language_service_client.js | 69 +- .../v1beta2/language_service_proto_list.json | 3 + packages/google-cloud-language/synth.metadata | 10 +- packages/google-cloud-language/synth.py | 1 + .../google-cloud-language/test/gapic-v1.js | 7 + .../test/gapic-v1beta2.js | 7 + .../google-cloud-language/webpack.config.js | 46 + 12 files changed, 985 insertions(+), 51 deletions(-) create mode 100644 packages/google-cloud-language/src/browser.js delete mode 100644 packages/google-cloud-language/src/service_proto_list.json create mode 100644 packages/google-cloud-language/src/v1/language_service_proto_list.json create mode 100644 packages/google-cloud-language/src/v1beta2/language_service_proto_list.json create mode 100644 packages/google-cloud-language/webpack.config.js diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index a1afe81bf42..e591def945b 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -6,6 +6,771 @@ "nested": { "language": { "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/language/v1;language", + "java_multiple_files": true, + "java_outer_classname": "LanguageServiceProto", + "java_package": "com.google.cloud.language.v1" + }, + "nested": { + "LanguageService": { + "options": { + "(google.api.default_host)": "language.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-language,https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "AnalyzeSentiment": { + "requestType": "AnalyzeSentimentRequest", + "responseType": "AnalyzeSentimentResponse", + "options": { + "(google.api.http).post": "/v1/documents:analyzeSentiment", + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" + } + }, + "AnalyzeEntities": { + "requestType": "AnalyzeEntitiesRequest", + "responseType": "AnalyzeEntitiesResponse", + "options": { + "(google.api.http).post": "/v1/documents:analyzeEntities", + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" + } + }, + "AnalyzeEntitySentiment": { + "requestType": "AnalyzeEntitySentimentRequest", + "responseType": "AnalyzeEntitySentimentResponse", + "options": { + "(google.api.http).post": "/v1/documents:analyzeEntitySentiment", + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" + } + }, + "AnalyzeSyntax": { + "requestType": "AnalyzeSyntaxRequest", + "responseType": "AnalyzeSyntaxResponse", + "options": { + "(google.api.http).post": "/v1/documents:analyzeSyntax", + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" + } + }, + "ClassifyText": { + "requestType": "ClassifyTextRequest", + "responseType": "ClassifyTextResponse", + "options": { + "(google.api.http).post": "/v1/documents:classifyText", + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" + } + }, + "AnnotateText": { + "requestType": "AnnotateTextRequest", + "responseType": "AnnotateTextResponse", + "options": { + "(google.api.http).post": "/v1/documents:annotateText", + "(google.api.http).body": "*", + "(google.api.method_signature)": "document,features" + } + } + } + }, + "Document": { + "oneofs": { + "source": { + "oneof": [ + "content", + "gcsContentUri" + ] + } + }, + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "content": { + "type": "string", + "id": 2 + }, + "gcsContentUri": { + "type": "string", + "id": 3 + }, + "language": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "PLAIN_TEXT": 1, + "HTML": 2 + } + } + } + }, + "Sentence": { + "fields": { + "text": { + "type": "TextSpan", + "id": 1 + }, + "sentiment": { + "type": "Sentiment", + "id": 2 + } + } + }, + "Entity": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "salience": { + "type": "float", + "id": 4 + }, + "mentions": { + "rule": "repeated", + "type": "EntityMention", + "id": 5 + }, + "sentiment": { + "type": "Sentiment", + "id": 6 + } + }, + "nested": { + "Type": { + "values": { + "UNKNOWN": 0, + "PERSON": 1, + "LOCATION": 2, + "ORGANIZATION": 3, + "EVENT": 4, + "WORK_OF_ART": 5, + "CONSUMER_GOOD": 6, + "OTHER": 7, + "PHONE_NUMBER": 9, + "ADDRESS": 10, + "DATE": 11, + "NUMBER": 12, + "PRICE": 13 + } + } + } + }, + "EncodingType": { + "values": { + "NONE": 0, + "UTF8": 1, + "UTF16": 2, + "UTF32": 3 + } + }, + "Token": { + "fields": { + "text": { + "type": "TextSpan", + "id": 1 + }, + "partOfSpeech": { + "type": "PartOfSpeech", + "id": 2 + }, + "dependencyEdge": { + "type": "DependencyEdge", + "id": 3 + }, + "lemma": { + "type": "string", + "id": 4 + } + } + }, + "Sentiment": { + "fields": { + "magnitude": { + "type": "float", + "id": 2 + }, + "score": { + "type": "float", + "id": 3 + } + } + }, + "PartOfSpeech": { + "fields": { + "tag": { + "type": "Tag", + "id": 1 + }, + "aspect": { + "type": "Aspect", + "id": 2 + }, + "case": { + "type": "Case", + "id": 3 + }, + "form": { + "type": "Form", + "id": 4 + }, + "gender": { + "type": "Gender", + "id": 5 + }, + "mood": { + "type": "Mood", + "id": 6 + }, + "number": { + "type": "Number", + "id": 7 + }, + "person": { + "type": "Person", + "id": 8 + }, + "proper": { + "type": "Proper", + "id": 9 + }, + "reciprocity": { + "type": "Reciprocity", + "id": 10 + }, + "tense": { + "type": "Tense", + "id": 11 + }, + "voice": { + "type": "Voice", + "id": 12 + } + }, + "nested": { + "Tag": { + "values": { + "UNKNOWN": 0, + "ADJ": 1, + "ADP": 2, + "ADV": 3, + "CONJ": 4, + "DET": 5, + "NOUN": 6, + "NUM": 7, + "PRON": 8, + "PRT": 9, + "PUNCT": 10, + "VERB": 11, + "X": 12, + "AFFIX": 13 + } + }, + "Aspect": { + "values": { + "ASPECT_UNKNOWN": 0, + "PERFECTIVE": 1, + "IMPERFECTIVE": 2, + "PROGRESSIVE": 3 + } + }, + "Case": { + "values": { + "CASE_UNKNOWN": 0, + "ACCUSATIVE": 1, + "ADVERBIAL": 2, + "COMPLEMENTIVE": 3, + "DATIVE": 4, + "GENITIVE": 5, + "INSTRUMENTAL": 6, + "LOCATIVE": 7, + "NOMINATIVE": 8, + "OBLIQUE": 9, + "PARTITIVE": 10, + "PREPOSITIONAL": 11, + "REFLEXIVE_CASE": 12, + "RELATIVE_CASE": 13, + "VOCATIVE": 14 + } + }, + "Form": { + "values": { + "FORM_UNKNOWN": 0, + "ADNOMIAL": 1, + "AUXILIARY": 2, + "COMPLEMENTIZER": 3, + "FINAL_ENDING": 4, + "GERUND": 5, + "REALIS": 6, + "IRREALIS": 7, + "SHORT": 8, + "LONG": 9, + "ORDER": 10, + "SPECIFIC": 11 + } + }, + "Gender": { + "values": { + "GENDER_UNKNOWN": 0, + "FEMININE": 1, + "MASCULINE": 2, + "NEUTER": 3 + } + }, + "Mood": { + "values": { + "MOOD_UNKNOWN": 0, + "CONDITIONAL_MOOD": 1, + "IMPERATIVE": 2, + "INDICATIVE": 3, + "INTERROGATIVE": 4, + "JUSSIVE": 5, + "SUBJUNCTIVE": 6 + } + }, + "Number": { + "values": { + "NUMBER_UNKNOWN": 0, + "SINGULAR": 1, + "PLURAL": 2, + "DUAL": 3 + } + }, + "Person": { + "values": { + "PERSON_UNKNOWN": 0, + "FIRST": 1, + "SECOND": 2, + "THIRD": 3, + "REFLEXIVE_PERSON": 4 + } + }, + "Proper": { + "values": { + "PROPER_UNKNOWN": 0, + "PROPER": 1, + "NOT_PROPER": 2 + } + }, + "Reciprocity": { + "values": { + "RECIPROCITY_UNKNOWN": 0, + "RECIPROCAL": 1, + "NON_RECIPROCAL": 2 + } + }, + "Tense": { + "values": { + "TENSE_UNKNOWN": 0, + "CONDITIONAL_TENSE": 1, + "FUTURE": 2, + "PAST": 3, + "PRESENT": 4, + "IMPERFECT": 5, + "PLUPERFECT": 6 + } + }, + "Voice": { + "values": { + "VOICE_UNKNOWN": 0, + "ACTIVE": 1, + "CAUSATIVE": 2, + "PASSIVE": 3 + } + } + } + }, + "DependencyEdge": { + "fields": { + "headTokenIndex": { + "type": "int32", + "id": 1 + }, + "label": { + "type": "Label", + "id": 2 + } + }, + "nested": { + "Label": { + "values": { + "UNKNOWN": 0, + "ABBREV": 1, + "ACOMP": 2, + "ADVCL": 3, + "ADVMOD": 4, + "AMOD": 5, + "APPOS": 6, + "ATTR": 7, + "AUX": 8, + "AUXPASS": 9, + "CC": 10, + "CCOMP": 11, + "CONJ": 12, + "CSUBJ": 13, + "CSUBJPASS": 14, + "DEP": 15, + "DET": 16, + "DISCOURSE": 17, + "DOBJ": 18, + "EXPL": 19, + "GOESWITH": 20, + "IOBJ": 21, + "MARK": 22, + "MWE": 23, + "MWV": 24, + "NEG": 25, + "NN": 26, + "NPADVMOD": 27, + "NSUBJ": 28, + "NSUBJPASS": 29, + "NUM": 30, + "NUMBER": 31, + "P": 32, + "PARATAXIS": 33, + "PARTMOD": 34, + "PCOMP": 35, + "POBJ": 36, + "POSS": 37, + "POSTNEG": 38, + "PRECOMP": 39, + "PRECONJ": 40, + "PREDET": 41, + "PREF": 42, + "PREP": 43, + "PRONL": 44, + "PRT": 45, + "PS": 46, + "QUANTMOD": 47, + "RCMOD": 48, + "RCMODREL": 49, + "RDROP": 50, + "REF": 51, + "REMNANT": 52, + "REPARANDUM": 53, + "ROOT": 54, + "SNUM": 55, + "SUFF": 56, + "TMOD": 57, + "TOPIC": 58, + "VMOD": 59, + "VOCATIVE": 60, + "XCOMP": 61, + "SUFFIX": 62, + "TITLE": 63, + "ADVPHMOD": 64, + "AUXCAUS": 65, + "AUXVV": 66, + "DTMOD": 67, + "FOREIGN": 68, + "KW": 69, + "LIST": 70, + "NOMC": 71, + "NOMCSUBJ": 72, + "NOMCSUBJPASS": 73, + "NUMC": 74, + "COP": 75, + "DISLOCATED": 76, + "ASP": 77, + "GMOD": 78, + "GOBJ": 79, + "INFMOD": 80, + "MES": 81, + "NCOMP": 82 + } + } + } + }, + "EntityMention": { + "fields": { + "text": { + "type": "TextSpan", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + }, + "sentiment": { + "type": "Sentiment", + "id": 3 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNKNOWN": 0, + "PROPER": 1, + "COMMON": 2 + } + } + } + }, + "TextSpan": { + "fields": { + "content": { + "type": "string", + "id": 1 + }, + "beginOffset": { + "type": "int32", + "id": 2 + } + } + }, + "ClassificationCategory": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "confidence": { + "type": "float", + "id": 2 + } + } + }, + "AnalyzeSentimentRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "encodingType": { + "type": "EncodingType", + "id": 2 + } + } + }, + "AnalyzeSentimentResponse": { + "fields": { + "documentSentiment": { + "type": "Sentiment", + "id": 1 + }, + "language": { + "type": "string", + "id": 2 + }, + "sentences": { + "rule": "repeated", + "type": "Sentence", + "id": 3 + } + } + }, + "AnalyzeEntitySentimentRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "encodingType": { + "type": "EncodingType", + "id": 2 + } + } + }, + "AnalyzeEntitySentimentResponse": { + "fields": { + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 1 + }, + "language": { + "type": "string", + "id": 2 + } + } + }, + "AnalyzeEntitiesRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "encodingType": { + "type": "EncodingType", + "id": 2 + } + } + }, + "AnalyzeEntitiesResponse": { + "fields": { + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 1 + }, + "language": { + "type": "string", + "id": 2 + } + } + }, + "AnalyzeSyntaxRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "encodingType": { + "type": "EncodingType", + "id": 2 + } + } + }, + "AnalyzeSyntaxResponse": { + "fields": { + "sentences": { + "rule": "repeated", + "type": "Sentence", + "id": 1 + }, + "tokens": { + "rule": "repeated", + "type": "Token", + "id": 2 + }, + "language": { + "type": "string", + "id": 3 + } + } + }, + "ClassifyTextRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ClassifyTextResponse": { + "fields": { + "categories": { + "rule": "repeated", + "type": "ClassificationCategory", + "id": 1 + } + } + }, + "AnnotateTextRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "features": { + "type": "Features", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "encodingType": { + "type": "EncodingType", + "id": 3 + } + }, + "nested": { + "Features": { + "fields": { + "extractSyntax": { + "type": "bool", + "id": 1 + }, + "extractEntities": { + "type": "bool", + "id": 2 + }, + "extractDocumentSentiment": { + "type": "bool", + "id": 3 + }, + "extractEntitySentiment": { + "type": "bool", + "id": 4 + }, + "classifyText": { + "type": "bool", + "id": 6 + } + } + } + } + }, + "AnnotateTextResponse": { + "fields": { + "sentences": { + "rule": "repeated", + "type": "Sentence", + "id": 1 + }, + "tokens": { + "rule": "repeated", + "type": "Token", + "id": 2 + }, + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 3 + }, + "documentSentiment": { + "type": "Sentiment", + "id": 4 + }, + "language": { + "type": "string", + "id": 5 + }, + "categories": { + "rule": "repeated", + "type": "ClassificationCategory", + "id": 6 + } + } + } + } + }, "v1beta2": { "options": { "go_package": "google.golang.org/genproto/googleapis/cloud/language/v1beta2;language", @@ -743,7 +1508,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "HttpProto", + "java_outer_classname": "FieldBehaviorProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -835,6 +1600,38 @@ "id": 2 } } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } } } }, diff --git a/packages/google-cloud-language/src/browser.js b/packages/google-cloud-language/src/browser.js new file mode 100644 index 00000000000..ddbcd7ecb9a --- /dev/null +++ b/packages/google-cloud-language/src/browser.js @@ -0,0 +1,21 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +// Set a flag that we are running in a browser bundle. +global.isBrowser = true; + +// Re-export all exports from ./index.js. +module.exports = require('./index'); diff --git a/packages/google-cloud-language/src/service_proto_list.json b/packages/google-cloud-language/src/service_proto_list.json deleted file mode 100644 index a94f8da1953..00000000000 --- a/packages/google-cloud-language/src/service_proto_list.json +++ /dev/null @@ -1 +0,0 @@ -["../protos/google/cloud/language/v1beta2/language_service.proto"] \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js index 40c896ee0b8..155fada1de1 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ b/packages/google-cloud-language/src/v1/language_service_client.js @@ -59,6 +59,16 @@ class LanguageServiceClient { opts = opts || {}; this._descriptors = {}; + if (global.isBrowser) { + // If we're in browser, we use gRPC fallback. + opts.fallback = true; + } + + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; + const servicePath = opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; @@ -75,26 +85,41 @@ class LanguageServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - const gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gaxModule.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - const clientHeader = [ - `gl-node/${process.versions.node}`, - `grpc/${gaxGrpc.grpcVersion}`, - `gax/${gax.version}`, - `gapic/${VERSION}`, - ]; + const clientHeader = []; + + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } + clientHeader.push(`gax/${gaxModule.version}`); + if (opts.fallback) { + clientHeader.push(`gl-web/${gaxModule.version}`); + } else { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + clientHeader.push(`gapic/${VERSION}`); if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); const protos = gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - ['google/cloud/language/v1/language_service.proto'] + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); // Put together the default options sent with requests. @@ -113,7 +138,9 @@ class LanguageServiceClient { // Put together the "service stub" for // google.cloud.language.v1.LanguageService. const languageServiceStub = gaxGrpc.createStub( - protos.google.cloud.language.v1.LanguageService, + opts.fallback + ? protos.lookupService('google.cloud.language.v1.LanguageService') + : protos.google.cloud.language.v1.LanguageService, opts ); @@ -128,18 +155,16 @@ class LanguageServiceClient { 'annotateText', ]; for (const methodName of languageServiceStubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - languageServiceStub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = languageServiceStub.then( + stub => (...args) => { + return stub[methodName].apply(stub, args); + }, + err => () => { + throw err; + } + ); + this._innerApiCalls[methodName] = gaxModule.createApiCall( + innerCallPromise, defaults[methodName], null ); diff --git a/packages/google-cloud-language/src/v1/language_service_proto_list.json b/packages/google-cloud-language/src/v1/language_service_proto_list.json new file mode 100644 index 00000000000..0456052873e --- /dev/null +++ b/packages/google-cloud-language/src/v1/language_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/language/v1/language_service.proto" +] diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index bbc94f79d29..22acc8f96d8 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -59,6 +59,16 @@ class LanguageServiceClient { opts = opts || {}; this._descriptors = {}; + if (global.isBrowser) { + // If we're in browser, we use gRPC fallback. + opts.fallback = true; + } + + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; + const servicePath = opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; @@ -75,26 +85,41 @@ class LanguageServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - const gaxGrpc = new gax.GrpcClient(opts); + const gaxGrpc = new gaxModule.GrpcClient(opts); // Save the auth object to the client, for use by other methods. this.auth = gaxGrpc.auth; // Determine the client header string. - const clientHeader = [ - `gl-node/${process.versions.node}`, - `grpc/${gaxGrpc.grpcVersion}`, - `gax/${gax.version}`, - `gapic/${VERSION}`, - ]; + const clientHeader = []; + + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } + clientHeader.push(`gax/${gaxModule.version}`); + if (opts.fallback) { + clientHeader.push(`gl-web/${gaxModule.version}`); + } else { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + clientHeader.push(`gapic/${VERSION}`); if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); const protos = gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - ['google/cloud/language/v1beta2/language_service.proto'] + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); // Put together the default options sent with requests. @@ -113,7 +138,9 @@ class LanguageServiceClient { // Put together the "service stub" for // google.cloud.language.v1beta2.LanguageService. const languageServiceStub = gaxGrpc.createStub( - protos.google.cloud.language.v1beta2.LanguageService, + opts.fallback + ? protos.lookupService('google.cloud.language.v1beta2.LanguageService') + : protos.google.cloud.language.v1beta2.LanguageService, opts ); @@ -128,18 +155,16 @@ class LanguageServiceClient { 'annotateText', ]; for (const methodName of languageServiceStubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - languageServiceStub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = languageServiceStub.then( + stub => (...args) => { + return stub[methodName].apply(stub, args); + }, + err => () => { + throw err; + } + ); + this._innerApiCalls[methodName] = gaxModule.createApiCall( + innerCallPromise, defaults[methodName], null ); diff --git a/packages/google-cloud-language/src/v1beta2/language_service_proto_list.json b/packages/google-cloud-language/src/v1beta2/language_service_proto_list.json new file mode 100644 index 00000000000..d5314f41309 --- /dev/null +++ b/packages/google-cloud-language/src/v1beta2/language_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/language/v1beta2/language_service.proto" +] diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index bb08c6bd045..8ec798a7dfc 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-28T11:16:17.514480Z", + "updateTime": "2019-08-31T11:13:46.304357Z", "sources": [ { "generator": { "name": "artman", - "version": "0.35.1", - "dockerImage": "googleapis/artman@sha256:b11c7ea0d0831c54016fb50f4b796d24d1971439b30fbc32a369ba1ac887c384" + "version": "0.36.1", + "dockerImage": "googleapis/artman@sha256:7c20f006c7a62d9d782e2665647d52290c37a952ef3cd134624d5dd62b3f71bd" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dbd38035c35083507e2f0b839985cf17e212cb1c", - "internalRef": "265796259" + "sha": "82809578652607c8ee29d9e199c21f28f81a03e0", + "internalRef": "266247326" } }, { diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index e68db5decb8..4809d101e42 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -24,3 +24,4 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npx', 'compileProtos', 'src']) diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-v1.js index d2d93821669..9ac59cdd16c 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-v1.js @@ -44,6 +44,13 @@ describe('LanguageServiceClient', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new languageModule.v1.LanguageServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { const client = new languageModule.v1.LanguageServiceClient({ diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-v1beta2.js index bab852198bc..eb0105176ac 100644 --- a/packages/google-cloud-language/test/gapic-v1beta2.js +++ b/packages/google-cloud-language/test/gapic-v1beta2.js @@ -46,6 +46,13 @@ describe('LanguageServiceClient', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new languageModule.v1beta2.LanguageServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { const client = new languageModule.v1beta2.LanguageServiceClient({ diff --git a/packages/google-cloud-language/webpack.config.js b/packages/google-cloud-language/webpack.config.js new file mode 100644 index 00000000000..8eb586d9bda --- /dev/null +++ b/packages/google-cloud-language/webpack.config.js @@ -0,0 +1,46 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + entry: './src/browser.js', + output: { + library: 'language', + filename: './language.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + extensions: ['.js', '.json'], + }, + module: { + rules: [ + { + test: /node_modules[\\/]retry-request[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; From e2ed45f17421fca44bfc01c4bbd355addc10bde1 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 6 Sep 2019 18:11:42 -0400 Subject: [PATCH 271/488] update .nycrc ignore rules (#293) --- packages/google-cloud-language/.nycrc | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-language/.nycrc b/packages/google-cloud-language/.nycrc index 83a421a0628..23e322204ec 100644 --- a/packages/google-cloud-language/.nycrc +++ b/packages/google-cloud-language/.nycrc @@ -6,6 +6,7 @@ "**/.coverage", "**/apis", "**/benchmark", + "**/conformance", "**/docs", "**/samples", "**/scripts", From 98cb57afa292d43a0399189ecb9c75a2799bc7c6 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 9 Sep 2019 19:23:48 +0300 Subject: [PATCH 272/488] chore(deps): update dependency eslint-plugin-node to v10 (#291) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1c5e6ad0831..1daa9b3fb87 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -48,7 +48,7 @@ "codecov": "^3.0.2", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", - "eslint-plugin-node": "^9.0.0", + "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", "jsdoc-fresh": "^1.0.1", "intelli-espower-loader": "^1.0.1", From 168c33dfef86c69e61199524d9829177a3bb4e85 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 16 Sep 2019 09:54:53 -0700 Subject: [PATCH 273/488] chore: release 3.3.0 (#290) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-language/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 6bda25f8dd8..b6dcb380b56 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [3.3.0](https://www.github.com/googleapis/nodejs-language/compare/v3.2.6...v3.3.0) (2019-09-16) + + +### Bug Fixes + +* **deps:** update dependency yargs to v14 ([bf2363e](https://www.github.com/googleapis/nodejs-language/commit/bf2363e)) +* use process versions object for client header ([#287](https://www.github.com/googleapis/nodejs-language/issues/287)) ([ee18e83](https://www.github.com/googleapis/nodejs-language/commit/ee18e83)) + + +### Features + +* load protos from JSON, grpc-fallback support ([354d98d](https://www.github.com/googleapis/nodejs-language/commit/354d98d)) + ### [3.2.6](https://www.github.com/googleapis/nodejs-language/compare/v3.2.5...v3.2.6) (2019-08-03) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1daa9b3fb87..d31b6cf46bc 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.2.6", + "version": "3.3.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index bb5851d4cd0..6d21de018f3 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.2.6", + "@google-cloud/language": "^3.3.0", "@google-cloud/storage": "^3.0.0", "yargs": "^14.0.0" }, From 35ad4620445d4a3d7fa2f26855d61c0d609789ac Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Sep 2019 06:10:59 -0700 Subject: [PATCH 274/488] feat: .d.ts for protos (#296) --- packages/google-cloud-language/.eslintignore | 1 + .../google-cloud-language/protos/protos.d.ts | 10474 ++++++ .../google-cloud-language/protos/protos.js | 27975 ++++++++++++++++ packages/google-cloud-language/synth.metadata | 10 +- 4 files changed, 38455 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-language/protos/protos.d.ts create mode 100644 packages/google-cloud-language/protos/protos.js diff --git a/packages/google-cloud-language/.eslintignore b/packages/google-cloud-language/.eslintignore index f0c7aead4bf..09b31fe735a 100644 --- a/packages/google-cloud-language/.eslintignore +++ b/packages/google-cloud-language/.eslintignore @@ -2,3 +2,4 @@ src/**/doc/* build/ docs/ +protos/ diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts new file mode 100644 index 00000000000..7a8d8f5b58c --- /dev/null +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -0,0 +1,10474 @@ +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace language. */ + namespace language { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a LanguageService */ + class LanguageService extends $protobuf.rpc.Service { + + /** + * Constructs a new LanguageService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new LanguageService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LanguageService; + + /** + * Calls AnalyzeSentiment. + * @param request AnalyzeSentimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyzeSentimentResponse + */ + public analyzeSentiment(request: google.cloud.language.v1.IAnalyzeSentimentRequest, callback: google.cloud.language.v1.LanguageService.AnalyzeSentimentCallback): void; + + /** + * Calls AnalyzeSentiment. + * @param request AnalyzeSentimentRequest message or plain object + * @returns Promise + */ + public analyzeSentiment(request: google.cloud.language.v1.IAnalyzeSentimentRequest): Promise; + + /** + * Calls AnalyzeEntities. + * @param request AnalyzeEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyzeEntitiesResponse + */ + public analyzeEntities(request: google.cloud.language.v1.IAnalyzeEntitiesRequest, callback: google.cloud.language.v1.LanguageService.AnalyzeEntitiesCallback): void; + + /** + * Calls AnalyzeEntities. + * @param request AnalyzeEntitiesRequest message or plain object + * @returns Promise + */ + public analyzeEntities(request: google.cloud.language.v1.IAnalyzeEntitiesRequest): Promise; + + /** + * Calls AnalyzeEntitySentiment. + * @param request AnalyzeEntitySentimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse + */ + public analyzeEntitySentiment(request: google.cloud.language.v1.IAnalyzeEntitySentimentRequest, callback: google.cloud.language.v1.LanguageService.AnalyzeEntitySentimentCallback): void; + + /** + * Calls AnalyzeEntitySentiment. + * @param request AnalyzeEntitySentimentRequest message or plain object + * @returns Promise + */ + public analyzeEntitySentiment(request: google.cloud.language.v1.IAnalyzeEntitySentimentRequest): Promise; + + /** + * Calls AnalyzeSyntax. + * @param request AnalyzeSyntaxRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyzeSyntaxResponse + */ + public analyzeSyntax(request: google.cloud.language.v1.IAnalyzeSyntaxRequest, callback: google.cloud.language.v1.LanguageService.AnalyzeSyntaxCallback): void; + + /** + * Calls AnalyzeSyntax. + * @param request AnalyzeSyntaxRequest message or plain object + * @returns Promise + */ + public analyzeSyntax(request: google.cloud.language.v1.IAnalyzeSyntaxRequest): Promise; + + /** + * Calls ClassifyText. + * @param request ClassifyTextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ClassifyTextResponse + */ + public classifyText(request: google.cloud.language.v1.IClassifyTextRequest, callback: google.cloud.language.v1.LanguageService.ClassifyTextCallback): void; + + /** + * Calls ClassifyText. + * @param request ClassifyTextRequest message or plain object + * @returns Promise + */ + public classifyText(request: google.cloud.language.v1.IClassifyTextRequest): Promise; + + /** + * Calls AnnotateText. + * @param request AnnotateTextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnnotateTextResponse + */ + public annotateText(request: google.cloud.language.v1.IAnnotateTextRequest, callback: google.cloud.language.v1.LanguageService.AnnotateTextCallback): void; + + /** + * Calls AnnotateText. + * @param request AnnotateTextRequest message or plain object + * @returns Promise + */ + public annotateText(request: google.cloud.language.v1.IAnnotateTextRequest): Promise; + } + + namespace LanguageService { + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeSentiment}. + * @param error Error, if any + * @param [response] AnalyzeSentimentResponse + */ + type AnalyzeSentimentCallback = (error: (Error|null), response?: google.cloud.language.v1.AnalyzeSentimentResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeEntities}. + * @param error Error, if any + * @param [response] AnalyzeEntitiesResponse + */ + type AnalyzeEntitiesCallback = (error: (Error|null), response?: google.cloud.language.v1.AnalyzeEntitiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeEntitySentiment}. + * @param error Error, if any + * @param [response] AnalyzeEntitySentimentResponse + */ + type AnalyzeEntitySentimentCallback = (error: (Error|null), response?: google.cloud.language.v1.AnalyzeEntitySentimentResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeSyntax}. + * @param error Error, if any + * @param [response] AnalyzeSyntaxResponse + */ + type AnalyzeSyntaxCallback = (error: (Error|null), response?: google.cloud.language.v1.AnalyzeSyntaxResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#classifyText}. + * @param error Error, if any + * @param [response] ClassifyTextResponse + */ + type ClassifyTextCallback = (error: (Error|null), response?: google.cloud.language.v1.ClassifyTextResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#annotateText}. + * @param error Error, if any + * @param [response] AnnotateTextResponse + */ + type AnnotateTextCallback = (error: (Error|null), response?: google.cloud.language.v1.AnnotateTextResponse) => void; + } + + /** Properties of a Document. */ + interface IDocument { + + /** Document type */ + type?: (google.cloud.language.v1.Document.Type|null); + + /** Document content */ + content?: (string|null); + + /** Document gcsContentUri */ + gcsContentUri?: (string|null); + + /** Document language */ + language?: (string|null); + } + + /** Represents a Document. */ + class Document implements IDocument { + + /** + * Constructs a new Document. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IDocument); + + /** Document type. */ + public type: google.cloud.language.v1.Document.Type; + + /** Document content. */ + public content: string; + + /** Document gcsContentUri. */ + public gcsContentUri: string; + + /** Document language. */ + public language: string; + + /** Document source. */ + public source?: ("content"|"gcsContentUri"); + + /** + * Creates a new Document instance using the specified properties. + * @param [properties] Properties to set + * @returns Document instance + */ + public static create(properties?: google.cloud.language.v1.IDocument): google.cloud.language.v1.Document; + + /** + * Encodes the specified Document message. Does not implicitly {@link google.cloud.language.v1.Document.verify|verify} messages. + * @param message Document message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.language.v1.Document.verify|verify} messages. + * @param message Document message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Document message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.Document; + + /** + * Decodes a Document message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.Document; + + /** + * Verifies a Document message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Document message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Document + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.Document; + + /** + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @param message Document + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Document to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Document { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + PLAIN_TEXT = 1, + HTML = 2 + } + } + + /** Properties of a Sentence. */ + interface ISentence { + + /** Sentence text */ + text?: (google.cloud.language.v1.ITextSpan|null); + + /** Sentence sentiment */ + sentiment?: (google.cloud.language.v1.ISentiment|null); + } + + /** Represents a Sentence. */ + class Sentence implements ISentence { + + /** + * Constructs a new Sentence. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.ISentence); + + /** Sentence text. */ + public text?: (google.cloud.language.v1.ITextSpan|null); + + /** Sentence sentiment. */ + public sentiment?: (google.cloud.language.v1.ISentiment|null); + + /** + * Creates a new Sentence instance using the specified properties. + * @param [properties] Properties to set + * @returns Sentence instance + */ + public static create(properties?: google.cloud.language.v1.ISentence): google.cloud.language.v1.Sentence; + + /** + * Encodes the specified Sentence message. Does not implicitly {@link google.cloud.language.v1.Sentence.verify|verify} messages. + * @param message Sentence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.ISentence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Sentence message, length delimited. Does not implicitly {@link google.cloud.language.v1.Sentence.verify|verify} messages. + * @param message Sentence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.ISentence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Sentence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Sentence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.Sentence; + + /** + * Decodes a Sentence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Sentence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.Sentence; + + /** + * Verifies a Sentence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Sentence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sentence + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.Sentence; + + /** + * Creates a plain object from a Sentence message. Also converts values to other types if specified. + * @param message Sentence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.Sentence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sentence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Entity. */ + interface IEntity { + + /** Entity name */ + name?: (string|null); + + /** Entity type */ + type?: (google.cloud.language.v1.Entity.Type|null); + + /** Entity metadata */ + metadata?: ({ [k: string]: string }|null); + + /** Entity salience */ + salience?: (number|null); + + /** Entity mentions */ + mentions?: (google.cloud.language.v1.IEntityMention[]|null); + + /** Entity sentiment */ + sentiment?: (google.cloud.language.v1.ISentiment|null); + } + + /** Represents an Entity. */ + class Entity implements IEntity { + + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IEntity); + + /** Entity name. */ + public name: string; + + /** Entity type. */ + public type: google.cloud.language.v1.Entity.Type; + + /** Entity metadata. */ + public metadata: { [k: string]: string }; + + /** Entity salience. */ + public salience: number; + + /** Entity mentions. */ + public mentions: google.cloud.language.v1.IEntityMention[]; + + /** Entity sentiment. */ + public sentiment?: (google.cloud.language.v1.ISentiment|null); + + /** + * Creates a new Entity instance using the specified properties. + * @param [properties] Properties to set + * @returns Entity instance + */ + public static create(properties?: google.cloud.language.v1.IEntity): google.cloud.language.v1.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.language.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.language.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.Entity; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.Entity; + + /** + * Verifies an Entity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.Entity; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Entity { + + /** Type enum. */ + enum Type { + UNKNOWN = 0, + PERSON = 1, + LOCATION = 2, + ORGANIZATION = 3, + EVENT = 4, + WORK_OF_ART = 5, + CONSUMER_GOOD = 6, + OTHER = 7, + PHONE_NUMBER = 9, + ADDRESS = 10, + DATE = 11, + NUMBER = 12, + PRICE = 13 + } + } + + /** EncodingType enum. */ + enum EncodingType { + NONE = 0, + UTF8 = 1, + UTF16 = 2, + UTF32 = 3 + } + + /** Properties of a Token. */ + interface IToken { + + /** Token text */ + text?: (google.cloud.language.v1.ITextSpan|null); + + /** Token partOfSpeech */ + partOfSpeech?: (google.cloud.language.v1.IPartOfSpeech|null); + + /** Token dependencyEdge */ + dependencyEdge?: (google.cloud.language.v1.IDependencyEdge|null); + + /** Token lemma */ + lemma?: (string|null); + } + + /** Represents a Token. */ + class Token implements IToken { + + /** + * Constructs a new Token. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IToken); + + /** Token text. */ + public text?: (google.cloud.language.v1.ITextSpan|null); + + /** Token partOfSpeech. */ + public partOfSpeech?: (google.cloud.language.v1.IPartOfSpeech|null); + + /** Token dependencyEdge. */ + public dependencyEdge?: (google.cloud.language.v1.IDependencyEdge|null); + + /** Token lemma. */ + public lemma: string; + + /** + * Creates a new Token instance using the specified properties. + * @param [properties] Properties to set + * @returns Token instance + */ + public static create(properties?: google.cloud.language.v1.IToken): google.cloud.language.v1.Token; + + /** + * Encodes the specified Token message. Does not implicitly {@link google.cloud.language.v1.Token.verify|verify} messages. + * @param message Token message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Token message, length delimited. Does not implicitly {@link google.cloud.language.v1.Token.verify|verify} messages. + * @param message Token message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Token message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Token + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.Token; + + /** + * Decodes a Token message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Token + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.Token; + + /** + * Verifies a Token message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Token message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Token + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.Token; + + /** + * Creates a plain object from a Token message. Also converts values to other types if specified. + * @param message Token + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.Token, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Token to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Sentiment. */ + interface ISentiment { + + /** Sentiment magnitude */ + magnitude?: (number|null); + + /** Sentiment score */ + score?: (number|null); + } + + /** Represents a Sentiment. */ + class Sentiment implements ISentiment { + + /** + * Constructs a new Sentiment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.ISentiment); + + /** Sentiment magnitude. */ + public magnitude: number; + + /** Sentiment score. */ + public score: number; + + /** + * Creates a new Sentiment instance using the specified properties. + * @param [properties] Properties to set + * @returns Sentiment instance + */ + public static create(properties?: google.cloud.language.v1.ISentiment): google.cloud.language.v1.Sentiment; + + /** + * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.language.v1.Sentiment.verify|verify} messages. + * @param message Sentiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.ISentiment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.language.v1.Sentiment.verify|verify} messages. + * @param message Sentiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.ISentiment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Sentiment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Sentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.Sentiment; + + /** + * Decodes a Sentiment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Sentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.Sentiment; + + /** + * Verifies a Sentiment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sentiment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.Sentiment; + + /** + * Creates a plain object from a Sentiment message. Also converts values to other types if specified. + * @param message Sentiment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.Sentiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sentiment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PartOfSpeech. */ + interface IPartOfSpeech { + + /** PartOfSpeech tag */ + tag?: (google.cloud.language.v1.PartOfSpeech.Tag|null); + + /** PartOfSpeech aspect */ + aspect?: (google.cloud.language.v1.PartOfSpeech.Aspect|null); + + /** PartOfSpeech case */ + "case"?: (google.cloud.language.v1.PartOfSpeech.Case|null); + + /** PartOfSpeech form */ + form?: (google.cloud.language.v1.PartOfSpeech.Form|null); + + /** PartOfSpeech gender */ + gender?: (google.cloud.language.v1.PartOfSpeech.Gender|null); + + /** PartOfSpeech mood */ + mood?: (google.cloud.language.v1.PartOfSpeech.Mood|null); + + /** PartOfSpeech number */ + number?: (google.cloud.language.v1.PartOfSpeech.Number|null); + + /** PartOfSpeech person */ + person?: (google.cloud.language.v1.PartOfSpeech.Person|null); + + /** PartOfSpeech proper */ + proper?: (google.cloud.language.v1.PartOfSpeech.Proper|null); + + /** PartOfSpeech reciprocity */ + reciprocity?: (google.cloud.language.v1.PartOfSpeech.Reciprocity|null); + + /** PartOfSpeech tense */ + tense?: (google.cloud.language.v1.PartOfSpeech.Tense|null); + + /** PartOfSpeech voice */ + voice?: (google.cloud.language.v1.PartOfSpeech.Voice|null); + } + + /** Represents a PartOfSpeech. */ + class PartOfSpeech implements IPartOfSpeech { + + /** + * Constructs a new PartOfSpeech. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IPartOfSpeech); + + /** PartOfSpeech tag. */ + public tag: google.cloud.language.v1.PartOfSpeech.Tag; + + /** PartOfSpeech aspect. */ + public aspect: google.cloud.language.v1.PartOfSpeech.Aspect; + + /** PartOfSpeech case. */ + public case: google.cloud.language.v1.PartOfSpeech.Case; + + /** PartOfSpeech form. */ + public form: google.cloud.language.v1.PartOfSpeech.Form; + + /** PartOfSpeech gender. */ + public gender: google.cloud.language.v1.PartOfSpeech.Gender; + + /** PartOfSpeech mood. */ + public mood: google.cloud.language.v1.PartOfSpeech.Mood; + + /** PartOfSpeech number. */ + public number: google.cloud.language.v1.PartOfSpeech.Number; + + /** PartOfSpeech person. */ + public person: google.cloud.language.v1.PartOfSpeech.Person; + + /** PartOfSpeech proper. */ + public proper: google.cloud.language.v1.PartOfSpeech.Proper; + + /** PartOfSpeech reciprocity. */ + public reciprocity: google.cloud.language.v1.PartOfSpeech.Reciprocity; + + /** PartOfSpeech tense. */ + public tense: google.cloud.language.v1.PartOfSpeech.Tense; + + /** PartOfSpeech voice. */ + public voice: google.cloud.language.v1.PartOfSpeech.Voice; + + /** + * Creates a new PartOfSpeech instance using the specified properties. + * @param [properties] Properties to set + * @returns PartOfSpeech instance + */ + public static create(properties?: google.cloud.language.v1.IPartOfSpeech): google.cloud.language.v1.PartOfSpeech; + + /** + * Encodes the specified PartOfSpeech message. Does not implicitly {@link google.cloud.language.v1.PartOfSpeech.verify|verify} messages. + * @param message PartOfSpeech message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IPartOfSpeech, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartOfSpeech message, length delimited. Does not implicitly {@link google.cloud.language.v1.PartOfSpeech.verify|verify} messages. + * @param message PartOfSpeech message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IPartOfSpeech, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.PartOfSpeech; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.PartOfSpeech; + + /** + * Verifies a PartOfSpeech message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartOfSpeech message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartOfSpeech + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.PartOfSpeech; + + /** + * Creates a plain object from a PartOfSpeech message. Also converts values to other types if specified. + * @param message PartOfSpeech + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.PartOfSpeech, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartOfSpeech to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PartOfSpeech { + + /** Tag enum. */ + enum Tag { + UNKNOWN = 0, + ADJ = 1, + ADP = 2, + ADV = 3, + CONJ = 4, + DET = 5, + NOUN = 6, + NUM = 7, + PRON = 8, + PRT = 9, + PUNCT = 10, + VERB = 11, + X = 12, + AFFIX = 13 + } + + /** Aspect enum. */ + enum Aspect { + ASPECT_UNKNOWN = 0, + PERFECTIVE = 1, + IMPERFECTIVE = 2, + PROGRESSIVE = 3 + } + + /** Case enum. */ + enum Case { + CASE_UNKNOWN = 0, + ACCUSATIVE = 1, + ADVERBIAL = 2, + COMPLEMENTIVE = 3, + DATIVE = 4, + GENITIVE = 5, + INSTRUMENTAL = 6, + LOCATIVE = 7, + NOMINATIVE = 8, + OBLIQUE = 9, + PARTITIVE = 10, + PREPOSITIONAL = 11, + REFLEXIVE_CASE = 12, + RELATIVE_CASE = 13, + VOCATIVE = 14 + } + + /** Form enum. */ + enum Form { + FORM_UNKNOWN = 0, + ADNOMIAL = 1, + AUXILIARY = 2, + COMPLEMENTIZER = 3, + FINAL_ENDING = 4, + GERUND = 5, + REALIS = 6, + IRREALIS = 7, + SHORT = 8, + LONG = 9, + ORDER = 10, + SPECIFIC = 11 + } + + /** Gender enum. */ + enum Gender { + GENDER_UNKNOWN = 0, + FEMININE = 1, + MASCULINE = 2, + NEUTER = 3 + } + + /** Mood enum. */ + enum Mood { + MOOD_UNKNOWN = 0, + CONDITIONAL_MOOD = 1, + IMPERATIVE = 2, + INDICATIVE = 3, + INTERROGATIVE = 4, + JUSSIVE = 5, + SUBJUNCTIVE = 6 + } + + /** Number enum. */ + enum Number { + NUMBER_UNKNOWN = 0, + SINGULAR = 1, + PLURAL = 2, + DUAL = 3 + } + + /** Person enum. */ + enum Person { + PERSON_UNKNOWN = 0, + FIRST = 1, + SECOND = 2, + THIRD = 3, + REFLEXIVE_PERSON = 4 + } + + /** Proper enum. */ + enum Proper { + PROPER_UNKNOWN = 0, + PROPER = 1, + NOT_PROPER = 2 + } + + /** Reciprocity enum. */ + enum Reciprocity { + RECIPROCITY_UNKNOWN = 0, + RECIPROCAL = 1, + NON_RECIPROCAL = 2 + } + + /** Tense enum. */ + enum Tense { + TENSE_UNKNOWN = 0, + CONDITIONAL_TENSE = 1, + FUTURE = 2, + PAST = 3, + PRESENT = 4, + IMPERFECT = 5, + PLUPERFECT = 6 + } + + /** Voice enum. */ + enum Voice { + VOICE_UNKNOWN = 0, + ACTIVE = 1, + CAUSATIVE = 2, + PASSIVE = 3 + } + } + + /** Properties of a DependencyEdge. */ + interface IDependencyEdge { + + /** DependencyEdge headTokenIndex */ + headTokenIndex?: (number|null); + + /** DependencyEdge label */ + label?: (google.cloud.language.v1.DependencyEdge.Label|null); + } + + /** Represents a DependencyEdge. */ + class DependencyEdge implements IDependencyEdge { + + /** + * Constructs a new DependencyEdge. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IDependencyEdge); + + /** DependencyEdge headTokenIndex. */ + public headTokenIndex: number; + + /** DependencyEdge label. */ + public label: google.cloud.language.v1.DependencyEdge.Label; + + /** + * Creates a new DependencyEdge instance using the specified properties. + * @param [properties] Properties to set + * @returns DependencyEdge instance + */ + public static create(properties?: google.cloud.language.v1.IDependencyEdge): google.cloud.language.v1.DependencyEdge; + + /** + * Encodes the specified DependencyEdge message. Does not implicitly {@link google.cloud.language.v1.DependencyEdge.verify|verify} messages. + * @param message DependencyEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IDependencyEdge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DependencyEdge message, length delimited. Does not implicitly {@link google.cloud.language.v1.DependencyEdge.verify|verify} messages. + * @param message DependencyEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IDependencyEdge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.DependencyEdge; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.DependencyEdge; + + /** + * Verifies a DependencyEdge message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DependencyEdge message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DependencyEdge + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.DependencyEdge; + + /** + * Creates a plain object from a DependencyEdge message. Also converts values to other types if specified. + * @param message DependencyEdge + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.DependencyEdge, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DependencyEdge to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DependencyEdge { + + /** Label enum. */ + enum Label { + UNKNOWN = 0, + ABBREV = 1, + ACOMP = 2, + ADVCL = 3, + ADVMOD = 4, + AMOD = 5, + APPOS = 6, + ATTR = 7, + AUX = 8, + AUXPASS = 9, + CC = 10, + CCOMP = 11, + CONJ = 12, + CSUBJ = 13, + CSUBJPASS = 14, + DEP = 15, + DET = 16, + DISCOURSE = 17, + DOBJ = 18, + EXPL = 19, + GOESWITH = 20, + IOBJ = 21, + MARK = 22, + MWE = 23, + MWV = 24, + NEG = 25, + NN = 26, + NPADVMOD = 27, + NSUBJ = 28, + NSUBJPASS = 29, + NUM = 30, + NUMBER = 31, + P = 32, + PARATAXIS = 33, + PARTMOD = 34, + PCOMP = 35, + POBJ = 36, + POSS = 37, + POSTNEG = 38, + PRECOMP = 39, + PRECONJ = 40, + PREDET = 41, + PREF = 42, + PREP = 43, + PRONL = 44, + PRT = 45, + PS = 46, + QUANTMOD = 47, + RCMOD = 48, + RCMODREL = 49, + RDROP = 50, + REF = 51, + REMNANT = 52, + REPARANDUM = 53, + ROOT = 54, + SNUM = 55, + SUFF = 56, + TMOD = 57, + TOPIC = 58, + VMOD = 59, + VOCATIVE = 60, + XCOMP = 61, + SUFFIX = 62, + TITLE = 63, + ADVPHMOD = 64, + AUXCAUS = 65, + AUXVV = 66, + DTMOD = 67, + FOREIGN = 68, + KW = 69, + LIST = 70, + NOMC = 71, + NOMCSUBJ = 72, + NOMCSUBJPASS = 73, + NUMC = 74, + COP = 75, + DISLOCATED = 76, + ASP = 77, + GMOD = 78, + GOBJ = 79, + INFMOD = 80, + MES = 81, + NCOMP = 82 + } + } + + /** Properties of an EntityMention. */ + interface IEntityMention { + + /** EntityMention text */ + text?: (google.cloud.language.v1.ITextSpan|null); + + /** EntityMention type */ + type?: (google.cloud.language.v1.EntityMention.Type|null); + + /** EntityMention sentiment */ + sentiment?: (google.cloud.language.v1.ISentiment|null); + } + + /** Represents an EntityMention. */ + class EntityMention implements IEntityMention { + + /** + * Constructs a new EntityMention. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IEntityMention); + + /** EntityMention text. */ + public text?: (google.cloud.language.v1.ITextSpan|null); + + /** EntityMention type. */ + public type: google.cloud.language.v1.EntityMention.Type; + + /** EntityMention sentiment. */ + public sentiment?: (google.cloud.language.v1.ISentiment|null); + + /** + * Creates a new EntityMention instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityMention instance + */ + public static create(properties?: google.cloud.language.v1.IEntityMention): google.cloud.language.v1.EntityMention; + + /** + * Encodes the specified EntityMention message. Does not implicitly {@link google.cloud.language.v1.EntityMention.verify|verify} messages. + * @param message EntityMention message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IEntityMention, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityMention message, length delimited. Does not implicitly {@link google.cloud.language.v1.EntityMention.verify|verify} messages. + * @param message EntityMention message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IEntityMention, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityMention message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.EntityMention; + + /** + * Decodes an EntityMention message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.EntityMention; + + /** + * Verifies an EntityMention message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EntityMention message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityMention + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.EntityMention; + + /** + * Creates a plain object from an EntityMention message. Also converts values to other types if specified. + * @param message EntityMention + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.EntityMention, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityMention to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EntityMention { + + /** Type enum. */ + enum Type { + TYPE_UNKNOWN = 0, + PROPER = 1, + COMMON = 2 + } + } + + /** Properties of a TextSpan. */ + interface ITextSpan { + + /** TextSpan content */ + content?: (string|null); + + /** TextSpan beginOffset */ + beginOffset?: (number|null); + } + + /** Represents a TextSpan. */ + class TextSpan implements ITextSpan { + + /** + * Constructs a new TextSpan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.ITextSpan); + + /** TextSpan content. */ + public content: string; + + /** TextSpan beginOffset. */ + public beginOffset: number; + + /** + * Creates a new TextSpan instance using the specified properties. + * @param [properties] Properties to set + * @returns TextSpan instance + */ + public static create(properties?: google.cloud.language.v1.ITextSpan): google.cloud.language.v1.TextSpan; + + /** + * Encodes the specified TextSpan message. Does not implicitly {@link google.cloud.language.v1.TextSpan.verify|verify} messages. + * @param message TextSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.ITextSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextSpan message, length delimited. Does not implicitly {@link google.cloud.language.v1.TextSpan.verify|verify} messages. + * @param message TextSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.ITextSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextSpan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.TextSpan; + + /** + * Decodes a TextSpan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.TextSpan; + + /** + * Verifies a TextSpan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextSpan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextSpan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.TextSpan; + + /** + * Creates a plain object from a TextSpan message. Also converts values to other types if specified. + * @param message TextSpan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.TextSpan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextSpan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClassificationCategory. */ + interface IClassificationCategory { + + /** ClassificationCategory name */ + name?: (string|null); + + /** ClassificationCategory confidence */ + confidence?: (number|null); + } + + /** Represents a ClassificationCategory. */ + class ClassificationCategory implements IClassificationCategory { + + /** + * Constructs a new ClassificationCategory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IClassificationCategory); + + /** ClassificationCategory name. */ + public name: string; + + /** ClassificationCategory confidence. */ + public confidence: number; + + /** + * Creates a new ClassificationCategory instance using the specified properties. + * @param [properties] Properties to set + * @returns ClassificationCategory instance + */ + public static create(properties?: google.cloud.language.v1.IClassificationCategory): google.cloud.language.v1.ClassificationCategory; + + /** + * Encodes the specified ClassificationCategory message. Does not implicitly {@link google.cloud.language.v1.ClassificationCategory.verify|verify} messages. + * @param message ClassificationCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IClassificationCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClassificationCategory message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassificationCategory.verify|verify} messages. + * @param message ClassificationCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IClassificationCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClassificationCategory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClassificationCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.ClassificationCategory; + + /** + * Decodes a ClassificationCategory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClassificationCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.ClassificationCategory; + + /** + * Verifies a ClassificationCategory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClassificationCategory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClassificationCategory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.ClassificationCategory; + + /** + * Creates a plain object from a ClassificationCategory message. Also converts values to other types if specified. + * @param message ClassificationCategory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.ClassificationCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClassificationCategory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeSentimentRequest. */ + interface IAnalyzeSentimentRequest { + + /** AnalyzeSentimentRequest document */ + document?: (google.cloud.language.v1.IDocument|null); + + /** AnalyzeSentimentRequest encodingType */ + encodingType?: (google.cloud.language.v1.EncodingType|null); + } + + /** Represents an AnalyzeSentimentRequest. */ + class AnalyzeSentimentRequest implements IAnalyzeSentimentRequest { + + /** + * Constructs a new AnalyzeSentimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnalyzeSentimentRequest); + + /** AnalyzeSentimentRequest document. */ + public document?: (google.cloud.language.v1.IDocument|null); + + /** AnalyzeSentimentRequest encodingType. */ + public encodingType: google.cloud.language.v1.EncodingType; + + /** + * Creates a new AnalyzeSentimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeSentimentRequest instance + */ + public static create(properties?: google.cloud.language.v1.IAnalyzeSentimentRequest): google.cloud.language.v1.AnalyzeSentimentRequest; + + /** + * Encodes the specified AnalyzeSentimentRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentRequest.verify|verify} messages. + * @param message AnalyzeSentimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnalyzeSentimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeSentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentRequest.verify|verify} messages. + * @param message AnalyzeSentimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnalyzeSentimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeSentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnalyzeSentimentRequest; + + /** + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeSentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnalyzeSentimentRequest; + + /** + * Verifies an AnalyzeSentimentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeSentimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeSentimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnalyzeSentimentRequest; + + /** + * Creates a plain object from an AnalyzeSentimentRequest message. Also converts values to other types if specified. + * @param message AnalyzeSentimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnalyzeSentimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeSentimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeSentimentResponse. */ + interface IAnalyzeSentimentResponse { + + /** AnalyzeSentimentResponse documentSentiment */ + documentSentiment?: (google.cloud.language.v1.ISentiment|null); + + /** AnalyzeSentimentResponse language */ + language?: (string|null); + + /** AnalyzeSentimentResponse sentences */ + sentences?: (google.cloud.language.v1.ISentence[]|null); + } + + /** Represents an AnalyzeSentimentResponse. */ + class AnalyzeSentimentResponse implements IAnalyzeSentimentResponse { + + /** + * Constructs a new AnalyzeSentimentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnalyzeSentimentResponse); + + /** AnalyzeSentimentResponse documentSentiment. */ + public documentSentiment?: (google.cloud.language.v1.ISentiment|null); + + /** AnalyzeSentimentResponse language. */ + public language: string; + + /** AnalyzeSentimentResponse sentences. */ + public sentences: google.cloud.language.v1.ISentence[]; + + /** + * Creates a new AnalyzeSentimentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeSentimentResponse instance + */ + public static create(properties?: google.cloud.language.v1.IAnalyzeSentimentResponse): google.cloud.language.v1.AnalyzeSentimentResponse; + + /** + * Encodes the specified AnalyzeSentimentResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentResponse.verify|verify} messages. + * @param message AnalyzeSentimentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnalyzeSentimentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeSentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentResponse.verify|verify} messages. + * @param message AnalyzeSentimentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnalyzeSentimentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeSentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnalyzeSentimentResponse; + + /** + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeSentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnalyzeSentimentResponse; + + /** + * Verifies an AnalyzeSentimentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeSentimentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeSentimentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnalyzeSentimentResponse; + + /** + * Creates a plain object from an AnalyzeSentimentResponse message. Also converts values to other types if specified. + * @param message AnalyzeSentimentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnalyzeSentimentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeSentimentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeEntitySentimentRequest. */ + interface IAnalyzeEntitySentimentRequest { + + /** AnalyzeEntitySentimentRequest document */ + document?: (google.cloud.language.v1.IDocument|null); + + /** AnalyzeEntitySentimentRequest encodingType */ + encodingType?: (google.cloud.language.v1.EncodingType|null); + } + + /** Represents an AnalyzeEntitySentimentRequest. */ + class AnalyzeEntitySentimentRequest implements IAnalyzeEntitySentimentRequest { + + /** + * Constructs a new AnalyzeEntitySentimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnalyzeEntitySentimentRequest); + + /** AnalyzeEntitySentimentRequest document. */ + public document?: (google.cloud.language.v1.IDocument|null); + + /** AnalyzeEntitySentimentRequest encodingType. */ + public encodingType: google.cloud.language.v1.EncodingType; + + /** + * Creates a new AnalyzeEntitySentimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeEntitySentimentRequest instance + */ + public static create(properties?: google.cloud.language.v1.IAnalyzeEntitySentimentRequest): google.cloud.language.v1.AnalyzeEntitySentimentRequest; + + /** + * Encodes the specified AnalyzeEntitySentimentRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentRequest.verify|verify} messages. + * @param message AnalyzeEntitySentimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnalyzeEntitySentimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeEntitySentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentRequest.verify|verify} messages. + * @param message AnalyzeEntitySentimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnalyzeEntitySentimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeEntitySentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnalyzeEntitySentimentRequest; + + /** + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeEntitySentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnalyzeEntitySentimentRequest; + + /** + * Verifies an AnalyzeEntitySentimentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeEntitySentimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeEntitySentimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnalyzeEntitySentimentRequest; + + /** + * Creates a plain object from an AnalyzeEntitySentimentRequest message. Also converts values to other types if specified. + * @param message AnalyzeEntitySentimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnalyzeEntitySentimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeEntitySentimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeEntitySentimentResponse. */ + interface IAnalyzeEntitySentimentResponse { + + /** AnalyzeEntitySentimentResponse entities */ + entities?: (google.cloud.language.v1.IEntity[]|null); + + /** AnalyzeEntitySentimentResponse language */ + language?: (string|null); + } + + /** Represents an AnalyzeEntitySentimentResponse. */ + class AnalyzeEntitySentimentResponse implements IAnalyzeEntitySentimentResponse { + + /** + * Constructs a new AnalyzeEntitySentimentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnalyzeEntitySentimentResponse); + + /** AnalyzeEntitySentimentResponse entities. */ + public entities: google.cloud.language.v1.IEntity[]; + + /** AnalyzeEntitySentimentResponse language. */ + public language: string; + + /** + * Creates a new AnalyzeEntitySentimentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeEntitySentimentResponse instance + */ + public static create(properties?: google.cloud.language.v1.IAnalyzeEntitySentimentResponse): google.cloud.language.v1.AnalyzeEntitySentimentResponse; + + /** + * Encodes the specified AnalyzeEntitySentimentResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentResponse.verify|verify} messages. + * @param message AnalyzeEntitySentimentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnalyzeEntitySentimentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeEntitySentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentResponse.verify|verify} messages. + * @param message AnalyzeEntitySentimentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnalyzeEntitySentimentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeEntitySentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnalyzeEntitySentimentResponse; + + /** + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeEntitySentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnalyzeEntitySentimentResponse; + + /** + * Verifies an AnalyzeEntitySentimentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeEntitySentimentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeEntitySentimentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnalyzeEntitySentimentResponse; + + /** + * Creates a plain object from an AnalyzeEntitySentimentResponse message. Also converts values to other types if specified. + * @param message AnalyzeEntitySentimentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnalyzeEntitySentimentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeEntitySentimentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeEntitiesRequest. */ + interface IAnalyzeEntitiesRequest { + + /** AnalyzeEntitiesRequest document */ + document?: (google.cloud.language.v1.IDocument|null); + + /** AnalyzeEntitiesRequest encodingType */ + encodingType?: (google.cloud.language.v1.EncodingType|null); + } + + /** Represents an AnalyzeEntitiesRequest. */ + class AnalyzeEntitiesRequest implements IAnalyzeEntitiesRequest { + + /** + * Constructs a new AnalyzeEntitiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnalyzeEntitiesRequest); + + /** AnalyzeEntitiesRequest document. */ + public document?: (google.cloud.language.v1.IDocument|null); + + /** AnalyzeEntitiesRequest encodingType. */ + public encodingType: google.cloud.language.v1.EncodingType; + + /** + * Creates a new AnalyzeEntitiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeEntitiesRequest instance + */ + public static create(properties?: google.cloud.language.v1.IAnalyzeEntitiesRequest): google.cloud.language.v1.AnalyzeEntitiesRequest; + + /** + * Encodes the specified AnalyzeEntitiesRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesRequest.verify|verify} messages. + * @param message AnalyzeEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesRequest.verify|verify} messages. + * @param message AnalyzeEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnalyzeEntitiesRequest; + + /** + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnalyzeEntitiesRequest; + + /** + * Verifies an AnalyzeEntitiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeEntitiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnalyzeEntitiesRequest; + + /** + * Creates a plain object from an AnalyzeEntitiesRequest message. Also converts values to other types if specified. + * @param message AnalyzeEntitiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnalyzeEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeEntitiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeEntitiesResponse. */ + interface IAnalyzeEntitiesResponse { + + /** AnalyzeEntitiesResponse entities */ + entities?: (google.cloud.language.v1.IEntity[]|null); + + /** AnalyzeEntitiesResponse language */ + language?: (string|null); + } + + /** Represents an AnalyzeEntitiesResponse. */ + class AnalyzeEntitiesResponse implements IAnalyzeEntitiesResponse { + + /** + * Constructs a new AnalyzeEntitiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnalyzeEntitiesResponse); + + /** AnalyzeEntitiesResponse entities. */ + public entities: google.cloud.language.v1.IEntity[]; + + /** AnalyzeEntitiesResponse language. */ + public language: string; + + /** + * Creates a new AnalyzeEntitiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeEntitiesResponse instance + */ + public static create(properties?: google.cloud.language.v1.IAnalyzeEntitiesResponse): google.cloud.language.v1.AnalyzeEntitiesResponse; + + /** + * Encodes the specified AnalyzeEntitiesResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesResponse.verify|verify} messages. + * @param message AnalyzeEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesResponse.verify|verify} messages. + * @param message AnalyzeEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnalyzeEntitiesResponse; + + /** + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnalyzeEntitiesResponse; + + /** + * Verifies an AnalyzeEntitiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeEntitiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnalyzeEntitiesResponse; + + /** + * Creates a plain object from an AnalyzeEntitiesResponse message. Also converts values to other types if specified. + * @param message AnalyzeEntitiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnalyzeEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeEntitiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeSyntaxRequest. */ + interface IAnalyzeSyntaxRequest { + + /** AnalyzeSyntaxRequest document */ + document?: (google.cloud.language.v1.IDocument|null); + + /** AnalyzeSyntaxRequest encodingType */ + encodingType?: (google.cloud.language.v1.EncodingType|null); + } + + /** Represents an AnalyzeSyntaxRequest. */ + class AnalyzeSyntaxRequest implements IAnalyzeSyntaxRequest { + + /** + * Constructs a new AnalyzeSyntaxRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnalyzeSyntaxRequest); + + /** AnalyzeSyntaxRequest document. */ + public document?: (google.cloud.language.v1.IDocument|null); + + /** AnalyzeSyntaxRequest encodingType. */ + public encodingType: google.cloud.language.v1.EncodingType; + + /** + * Creates a new AnalyzeSyntaxRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeSyntaxRequest instance + */ + public static create(properties?: google.cloud.language.v1.IAnalyzeSyntaxRequest): google.cloud.language.v1.AnalyzeSyntaxRequest; + + /** + * Encodes the specified AnalyzeSyntaxRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxRequest.verify|verify} messages. + * @param message AnalyzeSyntaxRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnalyzeSyntaxRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeSyntaxRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxRequest.verify|verify} messages. + * @param message AnalyzeSyntaxRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnalyzeSyntaxRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeSyntaxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnalyzeSyntaxRequest; + + /** + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeSyntaxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnalyzeSyntaxRequest; + + /** + * Verifies an AnalyzeSyntaxRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeSyntaxRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeSyntaxRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnalyzeSyntaxRequest; + + /** + * Creates a plain object from an AnalyzeSyntaxRequest message. Also converts values to other types if specified. + * @param message AnalyzeSyntaxRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnalyzeSyntaxRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeSyntaxRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeSyntaxResponse. */ + interface IAnalyzeSyntaxResponse { + + /** AnalyzeSyntaxResponse sentences */ + sentences?: (google.cloud.language.v1.ISentence[]|null); + + /** AnalyzeSyntaxResponse tokens */ + tokens?: (google.cloud.language.v1.IToken[]|null); + + /** AnalyzeSyntaxResponse language */ + language?: (string|null); + } + + /** Represents an AnalyzeSyntaxResponse. */ + class AnalyzeSyntaxResponse implements IAnalyzeSyntaxResponse { + + /** + * Constructs a new AnalyzeSyntaxResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnalyzeSyntaxResponse); + + /** AnalyzeSyntaxResponse sentences. */ + public sentences: google.cloud.language.v1.ISentence[]; + + /** AnalyzeSyntaxResponse tokens. */ + public tokens: google.cloud.language.v1.IToken[]; + + /** AnalyzeSyntaxResponse language. */ + public language: string; + + /** + * Creates a new AnalyzeSyntaxResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeSyntaxResponse instance + */ + public static create(properties?: google.cloud.language.v1.IAnalyzeSyntaxResponse): google.cloud.language.v1.AnalyzeSyntaxResponse; + + /** + * Encodes the specified AnalyzeSyntaxResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxResponse.verify|verify} messages. + * @param message AnalyzeSyntaxResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnalyzeSyntaxResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeSyntaxResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxResponse.verify|verify} messages. + * @param message AnalyzeSyntaxResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnalyzeSyntaxResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeSyntaxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnalyzeSyntaxResponse; + + /** + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeSyntaxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnalyzeSyntaxResponse; + + /** + * Verifies an AnalyzeSyntaxResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeSyntaxResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeSyntaxResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnalyzeSyntaxResponse; + + /** + * Creates a plain object from an AnalyzeSyntaxResponse message. Also converts values to other types if specified. + * @param message AnalyzeSyntaxResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnalyzeSyntaxResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeSyntaxResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClassifyTextRequest. */ + interface IClassifyTextRequest { + + /** ClassifyTextRequest document */ + document?: (google.cloud.language.v1.IDocument|null); + } + + /** Represents a ClassifyTextRequest. */ + class ClassifyTextRequest implements IClassifyTextRequest { + + /** + * Constructs a new ClassifyTextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IClassifyTextRequest); + + /** ClassifyTextRequest document. */ + public document?: (google.cloud.language.v1.IDocument|null); + + /** + * Creates a new ClassifyTextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ClassifyTextRequest instance + */ + public static create(properties?: google.cloud.language.v1.IClassifyTextRequest): google.cloud.language.v1.ClassifyTextRequest; + + /** + * Encodes the specified ClassifyTextRequest message. Does not implicitly {@link google.cloud.language.v1.ClassifyTextRequest.verify|verify} messages. + * @param message ClassifyTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IClassifyTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClassifyTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassifyTextRequest.verify|verify} messages. + * @param message ClassifyTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IClassifyTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClassifyTextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClassifyTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.ClassifyTextRequest; + + /** + * Decodes a ClassifyTextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClassifyTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.ClassifyTextRequest; + + /** + * Verifies a ClassifyTextRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClassifyTextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClassifyTextRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.ClassifyTextRequest; + + /** + * Creates a plain object from a ClassifyTextRequest message. Also converts values to other types if specified. + * @param message ClassifyTextRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.ClassifyTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClassifyTextRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClassifyTextResponse. */ + interface IClassifyTextResponse { + + /** ClassifyTextResponse categories */ + categories?: (google.cloud.language.v1.IClassificationCategory[]|null); + } + + /** Represents a ClassifyTextResponse. */ + class ClassifyTextResponse implements IClassifyTextResponse { + + /** + * Constructs a new ClassifyTextResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IClassifyTextResponse); + + /** ClassifyTextResponse categories. */ + public categories: google.cloud.language.v1.IClassificationCategory[]; + + /** + * Creates a new ClassifyTextResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ClassifyTextResponse instance + */ + public static create(properties?: google.cloud.language.v1.IClassifyTextResponse): google.cloud.language.v1.ClassifyTextResponse; + + /** + * Encodes the specified ClassifyTextResponse message. Does not implicitly {@link google.cloud.language.v1.ClassifyTextResponse.verify|verify} messages. + * @param message ClassifyTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IClassifyTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClassifyTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassifyTextResponse.verify|verify} messages. + * @param message ClassifyTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IClassifyTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.ClassifyTextResponse; + + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.ClassifyTextResponse; + + /** + * Verifies a ClassifyTextResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClassifyTextResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClassifyTextResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.ClassifyTextResponse; + + /** + * Creates a plain object from a ClassifyTextResponse message. Also converts values to other types if specified. + * @param message ClassifyTextResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.ClassifyTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClassifyTextResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnnotateTextRequest. */ + interface IAnnotateTextRequest { + + /** AnnotateTextRequest document */ + document?: (google.cloud.language.v1.IDocument|null); + + /** AnnotateTextRequest features */ + features?: (google.cloud.language.v1.AnnotateTextRequest.IFeatures|null); + + /** AnnotateTextRequest encodingType */ + encodingType?: (google.cloud.language.v1.EncodingType|null); + } + + /** Represents an AnnotateTextRequest. */ + class AnnotateTextRequest implements IAnnotateTextRequest { + + /** + * Constructs a new AnnotateTextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnnotateTextRequest); + + /** AnnotateTextRequest document. */ + public document?: (google.cloud.language.v1.IDocument|null); + + /** AnnotateTextRequest features. */ + public features?: (google.cloud.language.v1.AnnotateTextRequest.IFeatures|null); + + /** AnnotateTextRequest encodingType. */ + public encodingType: google.cloud.language.v1.EncodingType; + + /** + * Creates a new AnnotateTextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnnotateTextRequest instance + */ + public static create(properties?: google.cloud.language.v1.IAnnotateTextRequest): google.cloud.language.v1.AnnotateTextRequest; + + /** + * Encodes the specified AnnotateTextRequest message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.verify|verify} messages. + * @param message AnnotateTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnnotateTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnnotateTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.verify|verify} messages. + * @param message AnnotateTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnnotateTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnnotateTextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnnotateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnnotateTextRequest; + + /** + * Decodes an AnnotateTextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnnotateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnnotateTextRequest; + + /** + * Verifies an AnnotateTextRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnnotateTextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnnotateTextRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnnotateTextRequest; + + /** + * Creates a plain object from an AnnotateTextRequest message. Also converts values to other types if specified. + * @param message AnnotateTextRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnnotateTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnnotateTextRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AnnotateTextRequest { + + /** Properties of a Features. */ + interface IFeatures { + + /** Features extractSyntax */ + extractSyntax?: (boolean|null); + + /** Features extractEntities */ + extractEntities?: (boolean|null); + + /** Features extractDocumentSentiment */ + extractDocumentSentiment?: (boolean|null); + + /** Features extractEntitySentiment */ + extractEntitySentiment?: (boolean|null); + + /** Features classifyText */ + classifyText?: (boolean|null); + } + + /** Represents a Features. */ + class Features implements IFeatures { + + /** + * Constructs a new Features. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.AnnotateTextRequest.IFeatures); + + /** Features extractSyntax. */ + public extractSyntax: boolean; + + /** Features extractEntities. */ + public extractEntities: boolean; + + /** Features extractDocumentSentiment. */ + public extractDocumentSentiment: boolean; + + /** Features extractEntitySentiment. */ + public extractEntitySentiment: boolean; + + /** Features classifyText. */ + public classifyText: boolean; + + /** + * Creates a new Features instance using the specified properties. + * @param [properties] Properties to set + * @returns Features instance + */ + public static create(properties?: google.cloud.language.v1.AnnotateTextRequest.IFeatures): google.cloud.language.v1.AnnotateTextRequest.Features; + + /** + * Encodes the specified Features message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.Features.verify|verify} messages. + * @param message Features message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.AnnotateTextRequest.IFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Features message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.Features.verify|verify} messages. + * @param message Features message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.AnnotateTextRequest.IFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Features message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnnotateTextRequest.Features; + + /** + * Decodes a Features message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnnotateTextRequest.Features; + + /** + * Verifies a Features message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Features message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Features + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnnotateTextRequest.Features; + + /** + * Creates a plain object from a Features message. Also converts values to other types if specified. + * @param message Features + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnnotateTextRequest.Features, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Features to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an AnnotateTextResponse. */ + interface IAnnotateTextResponse { + + /** AnnotateTextResponse sentences */ + sentences?: (google.cloud.language.v1.ISentence[]|null); + + /** AnnotateTextResponse tokens */ + tokens?: (google.cloud.language.v1.IToken[]|null); + + /** AnnotateTextResponse entities */ + entities?: (google.cloud.language.v1.IEntity[]|null); + + /** AnnotateTextResponse documentSentiment */ + documentSentiment?: (google.cloud.language.v1.ISentiment|null); + + /** AnnotateTextResponse language */ + language?: (string|null); + + /** AnnotateTextResponse categories */ + categories?: (google.cloud.language.v1.IClassificationCategory[]|null); + } + + /** Represents an AnnotateTextResponse. */ + class AnnotateTextResponse implements IAnnotateTextResponse { + + /** + * Constructs a new AnnotateTextResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IAnnotateTextResponse); + + /** AnnotateTextResponse sentences. */ + public sentences: google.cloud.language.v1.ISentence[]; + + /** AnnotateTextResponse tokens. */ + public tokens: google.cloud.language.v1.IToken[]; + + /** AnnotateTextResponse entities. */ + public entities: google.cloud.language.v1.IEntity[]; + + /** AnnotateTextResponse documentSentiment. */ + public documentSentiment?: (google.cloud.language.v1.ISentiment|null); + + /** AnnotateTextResponse language. */ + public language: string; + + /** AnnotateTextResponse categories. */ + public categories: google.cloud.language.v1.IClassificationCategory[]; + + /** + * Creates a new AnnotateTextResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnnotateTextResponse instance + */ + public static create(properties?: google.cloud.language.v1.IAnnotateTextResponse): google.cloud.language.v1.AnnotateTextResponse; + + /** + * Encodes the specified AnnotateTextResponse message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextResponse.verify|verify} messages. + * @param message AnnotateTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IAnnotateTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnnotateTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextResponse.verify|verify} messages. + * @param message AnnotateTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IAnnotateTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnnotateTextResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnnotateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.AnnotateTextResponse; + + /** + * Decodes an AnnotateTextResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnnotateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.AnnotateTextResponse; + + /** + * Verifies an AnnotateTextResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnnotateTextResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnnotateTextResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.AnnotateTextResponse; + + /** + * Creates a plain object from an AnnotateTextResponse message. Also converts values to other types if specified. + * @param message AnnotateTextResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.AnnotateTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnnotateTextResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace v1beta2. */ + namespace v1beta2 { + + /** Represents a LanguageService */ + class LanguageService extends $protobuf.rpc.Service { + + /** + * Constructs a new LanguageService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new LanguageService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): LanguageService; + + /** + * Calls AnalyzeSentiment. + * @param request AnalyzeSentimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyzeSentimentResponse + */ + public analyzeSentiment(request: google.cloud.language.v1beta2.IAnalyzeSentimentRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeSentimentCallback): void; + + /** + * Calls AnalyzeSentiment. + * @param request AnalyzeSentimentRequest message or plain object + * @returns Promise + */ + public analyzeSentiment(request: google.cloud.language.v1beta2.IAnalyzeSentimentRequest): Promise; + + /** + * Calls AnalyzeEntities. + * @param request AnalyzeEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyzeEntitiesResponse + */ + public analyzeEntities(request: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeEntitiesCallback): void; + + /** + * Calls AnalyzeEntities. + * @param request AnalyzeEntitiesRequest message or plain object + * @returns Promise + */ + public analyzeEntities(request: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest): Promise; + + /** + * Calls AnalyzeEntitySentiment. + * @param request AnalyzeEntitySentimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse + */ + public analyzeEntitySentiment(request: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentimentCallback): void; + + /** + * Calls AnalyzeEntitySentiment. + * @param request AnalyzeEntitySentimentRequest message or plain object + * @returns Promise + */ + public analyzeEntitySentiment(request: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest): Promise; + + /** + * Calls AnalyzeSyntax. + * @param request AnalyzeSyntaxRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyzeSyntaxResponse + */ + public analyzeSyntax(request: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeSyntaxCallback): void; + + /** + * Calls AnalyzeSyntax. + * @param request AnalyzeSyntaxRequest message or plain object + * @returns Promise + */ + public analyzeSyntax(request: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest): Promise; + + /** + * Calls ClassifyText. + * @param request ClassifyTextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ClassifyTextResponse + */ + public classifyText(request: google.cloud.language.v1beta2.IClassifyTextRequest, callback: google.cloud.language.v1beta2.LanguageService.ClassifyTextCallback): void; + + /** + * Calls ClassifyText. + * @param request ClassifyTextRequest message or plain object + * @returns Promise + */ + public classifyText(request: google.cloud.language.v1beta2.IClassifyTextRequest): Promise; + + /** + * Calls AnnotateText. + * @param request AnnotateTextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnnotateTextResponse + */ + public annotateText(request: google.cloud.language.v1beta2.IAnnotateTextRequest, callback: google.cloud.language.v1beta2.LanguageService.AnnotateTextCallback): void; + + /** + * Calls AnnotateText. + * @param request AnnotateTextRequest message or plain object + * @returns Promise + */ + public annotateText(request: google.cloud.language.v1beta2.IAnnotateTextRequest): Promise; + } + + namespace LanguageService { + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeSentiment}. + * @param error Error, if any + * @param [response] AnalyzeSentimentResponse + */ + type AnalyzeSentimentCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.AnalyzeSentimentResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeEntities}. + * @param error Error, if any + * @param [response] AnalyzeEntitiesResponse + */ + type AnalyzeEntitiesCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.AnalyzeEntitiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeEntitySentiment}. + * @param error Error, if any + * @param [response] AnalyzeEntitySentimentResponse + */ + type AnalyzeEntitySentimentCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeSyntax}. + * @param error Error, if any + * @param [response] AnalyzeSyntaxResponse + */ + type AnalyzeSyntaxCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.AnalyzeSyntaxResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#classifyText}. + * @param error Error, if any + * @param [response] ClassifyTextResponse + */ + type ClassifyTextCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.ClassifyTextResponse) => void; + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#annotateText}. + * @param error Error, if any + * @param [response] AnnotateTextResponse + */ + type AnnotateTextCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.AnnotateTextResponse) => void; + } + + /** Properties of a Document. */ + interface IDocument { + + /** Document type */ + type?: (google.cloud.language.v1beta2.Document.Type|null); + + /** Document content */ + content?: (string|null); + + /** Document gcsContentUri */ + gcsContentUri?: (string|null); + + /** Document language */ + language?: (string|null); + } + + /** Represents a Document. */ + class Document implements IDocument { + + /** + * Constructs a new Document. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IDocument); + + /** Document type. */ + public type: google.cloud.language.v1beta2.Document.Type; + + /** Document content. */ + public content: string; + + /** Document gcsContentUri. */ + public gcsContentUri: string; + + /** Document language. */ + public language: string; + + /** Document source. */ + public source?: ("content"|"gcsContentUri"); + + /** + * Creates a new Document instance using the specified properties. + * @param [properties] Properties to set + * @returns Document instance + */ + public static create(properties?: google.cloud.language.v1beta2.IDocument): google.cloud.language.v1beta2.Document; + + /** + * Encodes the specified Document message. Does not implicitly {@link google.cloud.language.v1beta2.Document.verify|verify} messages. + * @param message Document message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Document.verify|verify} messages. + * @param message Document message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Document message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.Document; + + /** + * Decodes a Document message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.Document; + + /** + * Verifies a Document message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Document message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Document + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.Document; + + /** + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @param message Document + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Document to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Document { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + PLAIN_TEXT = 1, + HTML = 2 + } + } + + /** Properties of a Sentence. */ + interface ISentence { + + /** Sentence text */ + text?: (google.cloud.language.v1beta2.ITextSpan|null); + + /** Sentence sentiment */ + sentiment?: (google.cloud.language.v1beta2.ISentiment|null); + } + + /** Represents a Sentence. */ + class Sentence implements ISentence { + + /** + * Constructs a new Sentence. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.ISentence); + + /** Sentence text. */ + public text?: (google.cloud.language.v1beta2.ITextSpan|null); + + /** Sentence sentiment. */ + public sentiment?: (google.cloud.language.v1beta2.ISentiment|null); + + /** + * Creates a new Sentence instance using the specified properties. + * @param [properties] Properties to set + * @returns Sentence instance + */ + public static create(properties?: google.cloud.language.v1beta2.ISentence): google.cloud.language.v1beta2.Sentence; + + /** + * Encodes the specified Sentence message. Does not implicitly {@link google.cloud.language.v1beta2.Sentence.verify|verify} messages. + * @param message Sentence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.ISentence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Sentence message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Sentence.verify|verify} messages. + * @param message Sentence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.ISentence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Sentence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Sentence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.Sentence; + + /** + * Decodes a Sentence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Sentence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.Sentence; + + /** + * Verifies a Sentence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Sentence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sentence + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.Sentence; + + /** + * Creates a plain object from a Sentence message. Also converts values to other types if specified. + * @param message Sentence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.Sentence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sentence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Entity. */ + interface IEntity { + + /** Entity name */ + name?: (string|null); + + /** Entity type */ + type?: (google.cloud.language.v1beta2.Entity.Type|null); + + /** Entity metadata */ + metadata?: ({ [k: string]: string }|null); + + /** Entity salience */ + salience?: (number|null); + + /** Entity mentions */ + mentions?: (google.cloud.language.v1beta2.IEntityMention[]|null); + + /** Entity sentiment */ + sentiment?: (google.cloud.language.v1beta2.ISentiment|null); + } + + /** Represents an Entity. */ + class Entity implements IEntity { + + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IEntity); + + /** Entity name. */ + public name: string; + + /** Entity type. */ + public type: google.cloud.language.v1beta2.Entity.Type; + + /** Entity metadata. */ + public metadata: { [k: string]: string }; + + /** Entity salience. */ + public salience: number; + + /** Entity mentions. */ + public mentions: google.cloud.language.v1beta2.IEntityMention[]; + + /** Entity sentiment. */ + public sentiment?: (google.cloud.language.v1beta2.ISentiment|null); + + /** + * Creates a new Entity instance using the specified properties. + * @param [properties] Properties to set + * @returns Entity instance + */ + public static create(properties?: google.cloud.language.v1beta2.IEntity): google.cloud.language.v1beta2.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.language.v1beta2.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.Entity; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.Entity; + + /** + * Verifies an Entity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.Entity; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Entity { + + /** Type enum. */ + enum Type { + UNKNOWN = 0, + PERSON = 1, + LOCATION = 2, + ORGANIZATION = 3, + EVENT = 4, + WORK_OF_ART = 5, + CONSUMER_GOOD = 6, + OTHER = 7 + } + } + + /** Properties of a Token. */ + interface IToken { + + /** Token text */ + text?: (google.cloud.language.v1beta2.ITextSpan|null); + + /** Token partOfSpeech */ + partOfSpeech?: (google.cloud.language.v1beta2.IPartOfSpeech|null); + + /** Token dependencyEdge */ + dependencyEdge?: (google.cloud.language.v1beta2.IDependencyEdge|null); + + /** Token lemma */ + lemma?: (string|null); + } + + /** Represents a Token. */ + class Token implements IToken { + + /** + * Constructs a new Token. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IToken); + + /** Token text. */ + public text?: (google.cloud.language.v1beta2.ITextSpan|null); + + /** Token partOfSpeech. */ + public partOfSpeech?: (google.cloud.language.v1beta2.IPartOfSpeech|null); + + /** Token dependencyEdge. */ + public dependencyEdge?: (google.cloud.language.v1beta2.IDependencyEdge|null); + + /** Token lemma. */ + public lemma: string; + + /** + * Creates a new Token instance using the specified properties. + * @param [properties] Properties to set + * @returns Token instance + */ + public static create(properties?: google.cloud.language.v1beta2.IToken): google.cloud.language.v1beta2.Token; + + /** + * Encodes the specified Token message. Does not implicitly {@link google.cloud.language.v1beta2.Token.verify|verify} messages. + * @param message Token message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Token message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Token.verify|verify} messages. + * @param message Token message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Token message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Token + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.Token; + + /** + * Decodes a Token message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Token + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.Token; + + /** + * Verifies a Token message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Token message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Token + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.Token; + + /** + * Creates a plain object from a Token message. Also converts values to other types if specified. + * @param message Token + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.Token, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Token to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Sentiment. */ + interface ISentiment { + + /** Sentiment magnitude */ + magnitude?: (number|null); + + /** Sentiment score */ + score?: (number|null); + } + + /** Represents a Sentiment. */ + class Sentiment implements ISentiment { + + /** + * Constructs a new Sentiment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.ISentiment); + + /** Sentiment magnitude. */ + public magnitude: number; + + /** Sentiment score. */ + public score: number; + + /** + * Creates a new Sentiment instance using the specified properties. + * @param [properties] Properties to set + * @returns Sentiment instance + */ + public static create(properties?: google.cloud.language.v1beta2.ISentiment): google.cloud.language.v1beta2.Sentiment; + + /** + * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.language.v1beta2.Sentiment.verify|verify} messages. + * @param message Sentiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.ISentiment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Sentiment.verify|verify} messages. + * @param message Sentiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.ISentiment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Sentiment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Sentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.Sentiment; + + /** + * Decodes a Sentiment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Sentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.Sentiment; + + /** + * Verifies a Sentiment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sentiment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.Sentiment; + + /** + * Creates a plain object from a Sentiment message. Also converts values to other types if specified. + * @param message Sentiment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.Sentiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sentiment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PartOfSpeech. */ + interface IPartOfSpeech { + + /** PartOfSpeech tag */ + tag?: (google.cloud.language.v1beta2.PartOfSpeech.Tag|null); + + /** PartOfSpeech aspect */ + aspect?: (google.cloud.language.v1beta2.PartOfSpeech.Aspect|null); + + /** PartOfSpeech case */ + "case"?: (google.cloud.language.v1beta2.PartOfSpeech.Case|null); + + /** PartOfSpeech form */ + form?: (google.cloud.language.v1beta2.PartOfSpeech.Form|null); + + /** PartOfSpeech gender */ + gender?: (google.cloud.language.v1beta2.PartOfSpeech.Gender|null); + + /** PartOfSpeech mood */ + mood?: (google.cloud.language.v1beta2.PartOfSpeech.Mood|null); + + /** PartOfSpeech number */ + number?: (google.cloud.language.v1beta2.PartOfSpeech.Number|null); + + /** PartOfSpeech person */ + person?: (google.cloud.language.v1beta2.PartOfSpeech.Person|null); + + /** PartOfSpeech proper */ + proper?: (google.cloud.language.v1beta2.PartOfSpeech.Proper|null); + + /** PartOfSpeech reciprocity */ + reciprocity?: (google.cloud.language.v1beta2.PartOfSpeech.Reciprocity|null); + + /** PartOfSpeech tense */ + tense?: (google.cloud.language.v1beta2.PartOfSpeech.Tense|null); + + /** PartOfSpeech voice */ + voice?: (google.cloud.language.v1beta2.PartOfSpeech.Voice|null); + } + + /** Represents a PartOfSpeech. */ + class PartOfSpeech implements IPartOfSpeech { + + /** + * Constructs a new PartOfSpeech. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IPartOfSpeech); + + /** PartOfSpeech tag. */ + public tag: google.cloud.language.v1beta2.PartOfSpeech.Tag; + + /** PartOfSpeech aspect. */ + public aspect: google.cloud.language.v1beta2.PartOfSpeech.Aspect; + + /** PartOfSpeech case. */ + public case: google.cloud.language.v1beta2.PartOfSpeech.Case; + + /** PartOfSpeech form. */ + public form: google.cloud.language.v1beta2.PartOfSpeech.Form; + + /** PartOfSpeech gender. */ + public gender: google.cloud.language.v1beta2.PartOfSpeech.Gender; + + /** PartOfSpeech mood. */ + public mood: google.cloud.language.v1beta2.PartOfSpeech.Mood; + + /** PartOfSpeech number. */ + public number: google.cloud.language.v1beta2.PartOfSpeech.Number; + + /** PartOfSpeech person. */ + public person: google.cloud.language.v1beta2.PartOfSpeech.Person; + + /** PartOfSpeech proper. */ + public proper: google.cloud.language.v1beta2.PartOfSpeech.Proper; + + /** PartOfSpeech reciprocity. */ + public reciprocity: google.cloud.language.v1beta2.PartOfSpeech.Reciprocity; + + /** PartOfSpeech tense. */ + public tense: google.cloud.language.v1beta2.PartOfSpeech.Tense; + + /** PartOfSpeech voice. */ + public voice: google.cloud.language.v1beta2.PartOfSpeech.Voice; + + /** + * Creates a new PartOfSpeech instance using the specified properties. + * @param [properties] Properties to set + * @returns PartOfSpeech instance + */ + public static create(properties?: google.cloud.language.v1beta2.IPartOfSpeech): google.cloud.language.v1beta2.PartOfSpeech; + + /** + * Encodes the specified PartOfSpeech message. Does not implicitly {@link google.cloud.language.v1beta2.PartOfSpeech.verify|verify} messages. + * @param message PartOfSpeech message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IPartOfSpeech, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartOfSpeech message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.PartOfSpeech.verify|verify} messages. + * @param message PartOfSpeech message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IPartOfSpeech, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.PartOfSpeech; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.PartOfSpeech; + + /** + * Verifies a PartOfSpeech message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartOfSpeech message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartOfSpeech + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.PartOfSpeech; + + /** + * Creates a plain object from a PartOfSpeech message. Also converts values to other types if specified. + * @param message PartOfSpeech + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.PartOfSpeech, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartOfSpeech to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PartOfSpeech { + + /** Tag enum. */ + enum Tag { + UNKNOWN = 0, + ADJ = 1, + ADP = 2, + ADV = 3, + CONJ = 4, + DET = 5, + NOUN = 6, + NUM = 7, + PRON = 8, + PRT = 9, + PUNCT = 10, + VERB = 11, + X = 12, + AFFIX = 13 + } + + /** Aspect enum. */ + enum Aspect { + ASPECT_UNKNOWN = 0, + PERFECTIVE = 1, + IMPERFECTIVE = 2, + PROGRESSIVE = 3 + } + + /** Case enum. */ + enum Case { + CASE_UNKNOWN = 0, + ACCUSATIVE = 1, + ADVERBIAL = 2, + COMPLEMENTIVE = 3, + DATIVE = 4, + GENITIVE = 5, + INSTRUMENTAL = 6, + LOCATIVE = 7, + NOMINATIVE = 8, + OBLIQUE = 9, + PARTITIVE = 10, + PREPOSITIONAL = 11, + REFLEXIVE_CASE = 12, + RELATIVE_CASE = 13, + VOCATIVE = 14 + } + + /** Form enum. */ + enum Form { + FORM_UNKNOWN = 0, + ADNOMIAL = 1, + AUXILIARY = 2, + COMPLEMENTIZER = 3, + FINAL_ENDING = 4, + GERUND = 5, + REALIS = 6, + IRREALIS = 7, + SHORT = 8, + LONG = 9, + ORDER = 10, + SPECIFIC = 11 + } + + /** Gender enum. */ + enum Gender { + GENDER_UNKNOWN = 0, + FEMININE = 1, + MASCULINE = 2, + NEUTER = 3 + } + + /** Mood enum. */ + enum Mood { + MOOD_UNKNOWN = 0, + CONDITIONAL_MOOD = 1, + IMPERATIVE = 2, + INDICATIVE = 3, + INTERROGATIVE = 4, + JUSSIVE = 5, + SUBJUNCTIVE = 6 + } + + /** Number enum. */ + enum Number { + NUMBER_UNKNOWN = 0, + SINGULAR = 1, + PLURAL = 2, + DUAL = 3 + } + + /** Person enum. */ + enum Person { + PERSON_UNKNOWN = 0, + FIRST = 1, + SECOND = 2, + THIRD = 3, + REFLEXIVE_PERSON = 4 + } + + /** Proper enum. */ + enum Proper { + PROPER_UNKNOWN = 0, + PROPER = 1, + NOT_PROPER = 2 + } + + /** Reciprocity enum. */ + enum Reciprocity { + RECIPROCITY_UNKNOWN = 0, + RECIPROCAL = 1, + NON_RECIPROCAL = 2 + } + + /** Tense enum. */ + enum Tense { + TENSE_UNKNOWN = 0, + CONDITIONAL_TENSE = 1, + FUTURE = 2, + PAST = 3, + PRESENT = 4, + IMPERFECT = 5, + PLUPERFECT = 6 + } + + /** Voice enum. */ + enum Voice { + VOICE_UNKNOWN = 0, + ACTIVE = 1, + CAUSATIVE = 2, + PASSIVE = 3 + } + } + + /** Properties of a DependencyEdge. */ + interface IDependencyEdge { + + /** DependencyEdge headTokenIndex */ + headTokenIndex?: (number|null); + + /** DependencyEdge label */ + label?: (google.cloud.language.v1beta2.DependencyEdge.Label|null); + } + + /** Represents a DependencyEdge. */ + class DependencyEdge implements IDependencyEdge { + + /** + * Constructs a new DependencyEdge. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IDependencyEdge); + + /** DependencyEdge headTokenIndex. */ + public headTokenIndex: number; + + /** DependencyEdge label. */ + public label: google.cloud.language.v1beta2.DependencyEdge.Label; + + /** + * Creates a new DependencyEdge instance using the specified properties. + * @param [properties] Properties to set + * @returns DependencyEdge instance + */ + public static create(properties?: google.cloud.language.v1beta2.IDependencyEdge): google.cloud.language.v1beta2.DependencyEdge; + + /** + * Encodes the specified DependencyEdge message. Does not implicitly {@link google.cloud.language.v1beta2.DependencyEdge.verify|verify} messages. + * @param message DependencyEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IDependencyEdge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DependencyEdge message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.DependencyEdge.verify|verify} messages. + * @param message DependencyEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IDependencyEdge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.DependencyEdge; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.DependencyEdge; + + /** + * Verifies a DependencyEdge message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DependencyEdge message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DependencyEdge + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.DependencyEdge; + + /** + * Creates a plain object from a DependencyEdge message. Also converts values to other types if specified. + * @param message DependencyEdge + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.DependencyEdge, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DependencyEdge to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DependencyEdge { + + /** Label enum. */ + enum Label { + UNKNOWN = 0, + ABBREV = 1, + ACOMP = 2, + ADVCL = 3, + ADVMOD = 4, + AMOD = 5, + APPOS = 6, + ATTR = 7, + AUX = 8, + AUXPASS = 9, + CC = 10, + CCOMP = 11, + CONJ = 12, + CSUBJ = 13, + CSUBJPASS = 14, + DEP = 15, + DET = 16, + DISCOURSE = 17, + DOBJ = 18, + EXPL = 19, + GOESWITH = 20, + IOBJ = 21, + MARK = 22, + MWE = 23, + MWV = 24, + NEG = 25, + NN = 26, + NPADVMOD = 27, + NSUBJ = 28, + NSUBJPASS = 29, + NUM = 30, + NUMBER = 31, + P = 32, + PARATAXIS = 33, + PARTMOD = 34, + PCOMP = 35, + POBJ = 36, + POSS = 37, + POSTNEG = 38, + PRECOMP = 39, + PRECONJ = 40, + PREDET = 41, + PREF = 42, + PREP = 43, + PRONL = 44, + PRT = 45, + PS = 46, + QUANTMOD = 47, + RCMOD = 48, + RCMODREL = 49, + RDROP = 50, + REF = 51, + REMNANT = 52, + REPARANDUM = 53, + ROOT = 54, + SNUM = 55, + SUFF = 56, + TMOD = 57, + TOPIC = 58, + VMOD = 59, + VOCATIVE = 60, + XCOMP = 61, + SUFFIX = 62, + TITLE = 63, + ADVPHMOD = 64, + AUXCAUS = 65, + AUXVV = 66, + DTMOD = 67, + FOREIGN = 68, + KW = 69, + LIST = 70, + NOMC = 71, + NOMCSUBJ = 72, + NOMCSUBJPASS = 73, + NUMC = 74, + COP = 75, + DISLOCATED = 76, + ASP = 77, + GMOD = 78, + GOBJ = 79, + INFMOD = 80, + MES = 81, + NCOMP = 82 + } + } + + /** Properties of an EntityMention. */ + interface IEntityMention { + + /** EntityMention text */ + text?: (google.cloud.language.v1beta2.ITextSpan|null); + + /** EntityMention type */ + type?: (google.cloud.language.v1beta2.EntityMention.Type|null); + + /** EntityMention sentiment */ + sentiment?: (google.cloud.language.v1beta2.ISentiment|null); + } + + /** Represents an EntityMention. */ + class EntityMention implements IEntityMention { + + /** + * Constructs a new EntityMention. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IEntityMention); + + /** EntityMention text. */ + public text?: (google.cloud.language.v1beta2.ITextSpan|null); + + /** EntityMention type. */ + public type: google.cloud.language.v1beta2.EntityMention.Type; + + /** EntityMention sentiment. */ + public sentiment?: (google.cloud.language.v1beta2.ISentiment|null); + + /** + * Creates a new EntityMention instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityMention instance + */ + public static create(properties?: google.cloud.language.v1beta2.IEntityMention): google.cloud.language.v1beta2.EntityMention; + + /** + * Encodes the specified EntityMention message. Does not implicitly {@link google.cloud.language.v1beta2.EntityMention.verify|verify} messages. + * @param message EntityMention message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IEntityMention, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityMention message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.EntityMention.verify|verify} messages. + * @param message EntityMention message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IEntityMention, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityMention message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.EntityMention; + + /** + * Decodes an EntityMention message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.EntityMention; + + /** + * Verifies an EntityMention message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EntityMention message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityMention + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.EntityMention; + + /** + * Creates a plain object from an EntityMention message. Also converts values to other types if specified. + * @param message EntityMention + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.EntityMention, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityMention to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EntityMention { + + /** Type enum. */ + enum Type { + TYPE_UNKNOWN = 0, + PROPER = 1, + COMMON = 2 + } + } + + /** Properties of a TextSpan. */ + interface ITextSpan { + + /** TextSpan content */ + content?: (string|null); + + /** TextSpan beginOffset */ + beginOffset?: (number|null); + } + + /** Represents a TextSpan. */ + class TextSpan implements ITextSpan { + + /** + * Constructs a new TextSpan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.ITextSpan); + + /** TextSpan content. */ + public content: string; + + /** TextSpan beginOffset. */ + public beginOffset: number; + + /** + * Creates a new TextSpan instance using the specified properties. + * @param [properties] Properties to set + * @returns TextSpan instance + */ + public static create(properties?: google.cloud.language.v1beta2.ITextSpan): google.cloud.language.v1beta2.TextSpan; + + /** + * Encodes the specified TextSpan message. Does not implicitly {@link google.cloud.language.v1beta2.TextSpan.verify|verify} messages. + * @param message TextSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.ITextSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextSpan message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.TextSpan.verify|verify} messages. + * @param message TextSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.ITextSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextSpan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.TextSpan; + + /** + * Decodes a TextSpan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.TextSpan; + + /** + * Verifies a TextSpan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextSpan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextSpan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.TextSpan; + + /** + * Creates a plain object from a TextSpan message. Also converts values to other types if specified. + * @param message TextSpan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.TextSpan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextSpan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClassificationCategory. */ + interface IClassificationCategory { + + /** ClassificationCategory name */ + name?: (string|null); + + /** ClassificationCategory confidence */ + confidence?: (number|null); + } + + /** Represents a ClassificationCategory. */ + class ClassificationCategory implements IClassificationCategory { + + /** + * Constructs a new ClassificationCategory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IClassificationCategory); + + /** ClassificationCategory name. */ + public name: string; + + /** ClassificationCategory confidence. */ + public confidence: number; + + /** + * Creates a new ClassificationCategory instance using the specified properties. + * @param [properties] Properties to set + * @returns ClassificationCategory instance + */ + public static create(properties?: google.cloud.language.v1beta2.IClassificationCategory): google.cloud.language.v1beta2.ClassificationCategory; + + /** + * Encodes the specified ClassificationCategory message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationCategory.verify|verify} messages. + * @param message ClassificationCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IClassificationCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClassificationCategory message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationCategory.verify|verify} messages. + * @param message ClassificationCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IClassificationCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClassificationCategory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClassificationCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.ClassificationCategory; + + /** + * Decodes a ClassificationCategory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClassificationCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.ClassificationCategory; + + /** + * Verifies a ClassificationCategory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClassificationCategory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClassificationCategory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.ClassificationCategory; + + /** + * Creates a plain object from a ClassificationCategory message. Also converts values to other types if specified. + * @param message ClassificationCategory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.ClassificationCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClassificationCategory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeSentimentRequest. */ + interface IAnalyzeSentimentRequest { + + /** AnalyzeSentimentRequest document */ + document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnalyzeSentimentRequest encodingType */ + encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + } + + /** Represents an AnalyzeSentimentRequest. */ + class AnalyzeSentimentRequest implements IAnalyzeSentimentRequest { + + /** + * Constructs a new AnalyzeSentimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnalyzeSentimentRequest); + + /** AnalyzeSentimentRequest document. */ + public document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnalyzeSentimentRequest encodingType. */ + public encodingType: google.cloud.language.v1beta2.EncodingType; + + /** + * Creates a new AnalyzeSentimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeSentimentRequest instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnalyzeSentimentRequest): google.cloud.language.v1beta2.AnalyzeSentimentRequest; + + /** + * Encodes the specified AnalyzeSentimentRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSentimentRequest.verify|verify} messages. + * @param message AnalyzeSentimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnalyzeSentimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeSentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSentimentRequest.verify|verify} messages. + * @param message AnalyzeSentimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnalyzeSentimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeSentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnalyzeSentimentRequest; + + /** + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeSentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnalyzeSentimentRequest; + + /** + * Verifies an AnalyzeSentimentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeSentimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeSentimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnalyzeSentimentRequest; + + /** + * Creates a plain object from an AnalyzeSentimentRequest message. Also converts values to other types if specified. + * @param message AnalyzeSentimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnalyzeSentimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeSentimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeSentimentResponse. */ + interface IAnalyzeSentimentResponse { + + /** AnalyzeSentimentResponse documentSentiment */ + documentSentiment?: (google.cloud.language.v1beta2.ISentiment|null); + + /** AnalyzeSentimentResponse language */ + language?: (string|null); + + /** AnalyzeSentimentResponse sentences */ + sentences?: (google.cloud.language.v1beta2.ISentence[]|null); + } + + /** Represents an AnalyzeSentimentResponse. */ + class AnalyzeSentimentResponse implements IAnalyzeSentimentResponse { + + /** + * Constructs a new AnalyzeSentimentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnalyzeSentimentResponse); + + /** AnalyzeSentimentResponse documentSentiment. */ + public documentSentiment?: (google.cloud.language.v1beta2.ISentiment|null); + + /** AnalyzeSentimentResponse language. */ + public language: string; + + /** AnalyzeSentimentResponse sentences. */ + public sentences: google.cloud.language.v1beta2.ISentence[]; + + /** + * Creates a new AnalyzeSentimentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeSentimentResponse instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnalyzeSentimentResponse): google.cloud.language.v1beta2.AnalyzeSentimentResponse; + + /** + * Encodes the specified AnalyzeSentimentResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSentimentResponse.verify|verify} messages. + * @param message AnalyzeSentimentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnalyzeSentimentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeSentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSentimentResponse.verify|verify} messages. + * @param message AnalyzeSentimentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnalyzeSentimentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeSentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnalyzeSentimentResponse; + + /** + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeSentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnalyzeSentimentResponse; + + /** + * Verifies an AnalyzeSentimentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeSentimentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeSentimentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnalyzeSentimentResponse; + + /** + * Creates a plain object from an AnalyzeSentimentResponse message. Also converts values to other types if specified. + * @param message AnalyzeSentimentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnalyzeSentimentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeSentimentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeEntitySentimentRequest. */ + interface IAnalyzeEntitySentimentRequest { + + /** AnalyzeEntitySentimentRequest document */ + document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnalyzeEntitySentimentRequest encodingType */ + encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + } + + /** Represents an AnalyzeEntitySentimentRequest. */ + class AnalyzeEntitySentimentRequest implements IAnalyzeEntitySentimentRequest { + + /** + * Constructs a new AnalyzeEntitySentimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest); + + /** AnalyzeEntitySentimentRequest document. */ + public document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnalyzeEntitySentimentRequest encodingType. */ + public encodingType: google.cloud.language.v1beta2.EncodingType; + + /** + * Creates a new AnalyzeEntitySentimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeEntitySentimentRequest instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest): google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest; + + /** + * Encodes the specified AnalyzeEntitySentimentRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest.verify|verify} messages. + * @param message AnalyzeEntitySentimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeEntitySentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest.verify|verify} messages. + * @param message AnalyzeEntitySentimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeEntitySentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest; + + /** + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeEntitySentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest; + + /** + * Verifies an AnalyzeEntitySentimentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeEntitySentimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeEntitySentimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest; + + /** + * Creates a plain object from an AnalyzeEntitySentimentRequest message. Also converts values to other types if specified. + * @param message AnalyzeEntitySentimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeEntitySentimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeEntitySentimentResponse. */ + interface IAnalyzeEntitySentimentResponse { + + /** AnalyzeEntitySentimentResponse entities */ + entities?: (google.cloud.language.v1beta2.IEntity[]|null); + + /** AnalyzeEntitySentimentResponse language */ + language?: (string|null); + } + + /** Represents an AnalyzeEntitySentimentResponse. */ + class AnalyzeEntitySentimentResponse implements IAnalyzeEntitySentimentResponse { + + /** + * Constructs a new AnalyzeEntitySentimentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse); + + /** AnalyzeEntitySentimentResponse entities. */ + public entities: google.cloud.language.v1beta2.IEntity[]; + + /** AnalyzeEntitySentimentResponse language. */ + public language: string; + + /** + * Creates a new AnalyzeEntitySentimentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeEntitySentimentResponse instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse): google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse; + + /** + * Encodes the specified AnalyzeEntitySentimentResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse.verify|verify} messages. + * @param message AnalyzeEntitySentimentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeEntitySentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse.verify|verify} messages. + * @param message AnalyzeEntitySentimentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeEntitySentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse; + + /** + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeEntitySentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse; + + /** + * Verifies an AnalyzeEntitySentimentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeEntitySentimentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeEntitySentimentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse; + + /** + * Creates a plain object from an AnalyzeEntitySentimentResponse message. Also converts values to other types if specified. + * @param message AnalyzeEntitySentimentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeEntitySentimentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeEntitiesRequest. */ + interface IAnalyzeEntitiesRequest { + + /** AnalyzeEntitiesRequest document */ + document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnalyzeEntitiesRequest encodingType */ + encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + } + + /** Represents an AnalyzeEntitiesRequest. */ + class AnalyzeEntitiesRequest implements IAnalyzeEntitiesRequest { + + /** + * Constructs a new AnalyzeEntitiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest); + + /** AnalyzeEntitiesRequest document. */ + public document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnalyzeEntitiesRequest encodingType. */ + public encodingType: google.cloud.language.v1beta2.EncodingType; + + /** + * Creates a new AnalyzeEntitiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeEntitiesRequest instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest): google.cloud.language.v1beta2.AnalyzeEntitiesRequest; + + /** + * Encodes the specified AnalyzeEntitiesRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitiesRequest.verify|verify} messages. + * @param message AnalyzeEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitiesRequest.verify|verify} messages. + * @param message AnalyzeEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnalyzeEntitiesRequest; + + /** + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnalyzeEntitiesRequest; + + /** + * Verifies an AnalyzeEntitiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeEntitiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnalyzeEntitiesRequest; + + /** + * Creates a plain object from an AnalyzeEntitiesRequest message. Also converts values to other types if specified. + * @param message AnalyzeEntitiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnalyzeEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeEntitiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeEntitiesResponse. */ + interface IAnalyzeEntitiesResponse { + + /** AnalyzeEntitiesResponse entities */ + entities?: (google.cloud.language.v1beta2.IEntity[]|null); + + /** AnalyzeEntitiesResponse language */ + language?: (string|null); + } + + /** Represents an AnalyzeEntitiesResponse. */ + class AnalyzeEntitiesResponse implements IAnalyzeEntitiesResponse { + + /** + * Constructs a new AnalyzeEntitiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnalyzeEntitiesResponse); + + /** AnalyzeEntitiesResponse entities. */ + public entities: google.cloud.language.v1beta2.IEntity[]; + + /** AnalyzeEntitiesResponse language. */ + public language: string; + + /** + * Creates a new AnalyzeEntitiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeEntitiesResponse instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnalyzeEntitiesResponse): google.cloud.language.v1beta2.AnalyzeEntitiesResponse; + + /** + * Encodes the specified AnalyzeEntitiesResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse.verify|verify} messages. + * @param message AnalyzeEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse.verify|verify} messages. + * @param message AnalyzeEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnalyzeEntitiesResponse; + + /** + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnalyzeEntitiesResponse; + + /** + * Verifies an AnalyzeEntitiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeEntitiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnalyzeEntitiesResponse; + + /** + * Creates a plain object from an AnalyzeEntitiesResponse message. Also converts values to other types if specified. + * @param message AnalyzeEntitiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnalyzeEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeEntitiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeSyntaxRequest. */ + interface IAnalyzeSyntaxRequest { + + /** AnalyzeSyntaxRequest document */ + document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnalyzeSyntaxRequest encodingType */ + encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + } + + /** Represents an AnalyzeSyntaxRequest. */ + class AnalyzeSyntaxRequest implements IAnalyzeSyntaxRequest { + + /** + * Constructs a new AnalyzeSyntaxRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest); + + /** AnalyzeSyntaxRequest document. */ + public document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnalyzeSyntaxRequest encodingType. */ + public encodingType: google.cloud.language.v1beta2.EncodingType; + + /** + * Creates a new AnalyzeSyntaxRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeSyntaxRequest instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest): google.cloud.language.v1beta2.AnalyzeSyntaxRequest; + + /** + * Encodes the specified AnalyzeSyntaxRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSyntaxRequest.verify|verify} messages. + * @param message AnalyzeSyntaxRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeSyntaxRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSyntaxRequest.verify|verify} messages. + * @param message AnalyzeSyntaxRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeSyntaxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnalyzeSyntaxRequest; + + /** + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeSyntaxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnalyzeSyntaxRequest; + + /** + * Verifies an AnalyzeSyntaxRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeSyntaxRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeSyntaxRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnalyzeSyntaxRequest; + + /** + * Creates a plain object from an AnalyzeSyntaxRequest message. Also converts values to other types if specified. + * @param message AnalyzeSyntaxRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnalyzeSyntaxRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeSyntaxRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnalyzeSyntaxResponse. */ + interface IAnalyzeSyntaxResponse { + + /** AnalyzeSyntaxResponse sentences */ + sentences?: (google.cloud.language.v1beta2.ISentence[]|null); + + /** AnalyzeSyntaxResponse tokens */ + tokens?: (google.cloud.language.v1beta2.IToken[]|null); + + /** AnalyzeSyntaxResponse language */ + language?: (string|null); + } + + /** Represents an AnalyzeSyntaxResponse. */ + class AnalyzeSyntaxResponse implements IAnalyzeSyntaxResponse { + + /** + * Constructs a new AnalyzeSyntaxResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnalyzeSyntaxResponse); + + /** AnalyzeSyntaxResponse sentences. */ + public sentences: google.cloud.language.v1beta2.ISentence[]; + + /** AnalyzeSyntaxResponse tokens. */ + public tokens: google.cloud.language.v1beta2.IToken[]; + + /** AnalyzeSyntaxResponse language. */ + public language: string; + + /** + * Creates a new AnalyzeSyntaxResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeSyntaxResponse instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnalyzeSyntaxResponse): google.cloud.language.v1beta2.AnalyzeSyntaxResponse; + + /** + * Encodes the specified AnalyzeSyntaxResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse.verify|verify} messages. + * @param message AnalyzeSyntaxResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeSyntaxResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse.verify|verify} messages. + * @param message AnalyzeSyntaxResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeSyntaxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnalyzeSyntaxResponse; + + /** + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeSyntaxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnalyzeSyntaxResponse; + + /** + * Verifies an AnalyzeSyntaxResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeSyntaxResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeSyntaxResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnalyzeSyntaxResponse; + + /** + * Creates a plain object from an AnalyzeSyntaxResponse message. Also converts values to other types if specified. + * @param message AnalyzeSyntaxResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnalyzeSyntaxResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeSyntaxResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClassifyTextRequest. */ + interface IClassifyTextRequest { + + /** ClassifyTextRequest document */ + document?: (google.cloud.language.v1beta2.IDocument|null); + } + + /** Represents a ClassifyTextRequest. */ + class ClassifyTextRequest implements IClassifyTextRequest { + + /** + * Constructs a new ClassifyTextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IClassifyTextRequest); + + /** ClassifyTextRequest document. */ + public document?: (google.cloud.language.v1beta2.IDocument|null); + + /** + * Creates a new ClassifyTextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ClassifyTextRequest instance + */ + public static create(properties?: google.cloud.language.v1beta2.IClassifyTextRequest): google.cloud.language.v1beta2.ClassifyTextRequest; + + /** + * Encodes the specified ClassifyTextRequest message. Does not implicitly {@link google.cloud.language.v1beta2.ClassifyTextRequest.verify|verify} messages. + * @param message ClassifyTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IClassifyTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClassifyTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassifyTextRequest.verify|verify} messages. + * @param message ClassifyTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IClassifyTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClassifyTextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClassifyTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.ClassifyTextRequest; + + /** + * Decodes a ClassifyTextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClassifyTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.ClassifyTextRequest; + + /** + * Verifies a ClassifyTextRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClassifyTextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClassifyTextRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.ClassifyTextRequest; + + /** + * Creates a plain object from a ClassifyTextRequest message. Also converts values to other types if specified. + * @param message ClassifyTextRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.ClassifyTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClassifyTextRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClassifyTextResponse. */ + interface IClassifyTextResponse { + + /** ClassifyTextResponse categories */ + categories?: (google.cloud.language.v1beta2.IClassificationCategory[]|null); + } + + /** Represents a ClassifyTextResponse. */ + class ClassifyTextResponse implements IClassifyTextResponse { + + /** + * Constructs a new ClassifyTextResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IClassifyTextResponse); + + /** ClassifyTextResponse categories. */ + public categories: google.cloud.language.v1beta2.IClassificationCategory[]; + + /** + * Creates a new ClassifyTextResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ClassifyTextResponse instance + */ + public static create(properties?: google.cloud.language.v1beta2.IClassifyTextResponse): google.cloud.language.v1beta2.ClassifyTextResponse; + + /** + * Encodes the specified ClassifyTextResponse message. Does not implicitly {@link google.cloud.language.v1beta2.ClassifyTextResponse.verify|verify} messages. + * @param message ClassifyTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IClassifyTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClassifyTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassifyTextResponse.verify|verify} messages. + * @param message ClassifyTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IClassifyTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.ClassifyTextResponse; + + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.ClassifyTextResponse; + + /** + * Verifies a ClassifyTextResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClassifyTextResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClassifyTextResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.ClassifyTextResponse; + + /** + * Creates a plain object from a ClassifyTextResponse message. Also converts values to other types if specified. + * @param message ClassifyTextResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.ClassifyTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClassifyTextResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnnotateTextRequest. */ + interface IAnnotateTextRequest { + + /** AnnotateTextRequest document */ + document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnnotateTextRequest features */ + features?: (google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures|null); + + /** AnnotateTextRequest encodingType */ + encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + } + + /** Represents an AnnotateTextRequest. */ + class AnnotateTextRequest implements IAnnotateTextRequest { + + /** + * Constructs a new AnnotateTextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnnotateTextRequest); + + /** AnnotateTextRequest document. */ + public document?: (google.cloud.language.v1beta2.IDocument|null); + + /** AnnotateTextRequest features. */ + public features?: (google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures|null); + + /** AnnotateTextRequest encodingType. */ + public encodingType: google.cloud.language.v1beta2.EncodingType; + + /** + * Creates a new AnnotateTextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AnnotateTextRequest instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnnotateTextRequest): google.cloud.language.v1beta2.AnnotateTextRequest; + + /** + * Encodes the specified AnnotateTextRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextRequest.verify|verify} messages. + * @param message AnnotateTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnnotateTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnnotateTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextRequest.verify|verify} messages. + * @param message AnnotateTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnnotateTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnnotateTextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnnotateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnnotateTextRequest; + + /** + * Decodes an AnnotateTextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnnotateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnnotateTextRequest; + + /** + * Verifies an AnnotateTextRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnnotateTextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnnotateTextRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnnotateTextRequest; + + /** + * Creates a plain object from an AnnotateTextRequest message. Also converts values to other types if specified. + * @param message AnnotateTextRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnnotateTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnnotateTextRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AnnotateTextRequest { + + /** Properties of a Features. */ + interface IFeatures { + + /** Features extractSyntax */ + extractSyntax?: (boolean|null); + + /** Features extractEntities */ + extractEntities?: (boolean|null); + + /** Features extractDocumentSentiment */ + extractDocumentSentiment?: (boolean|null); + + /** Features extractEntitySentiment */ + extractEntitySentiment?: (boolean|null); + + /** Features classifyText */ + classifyText?: (boolean|null); + } + + /** Represents a Features. */ + class Features implements IFeatures { + + /** + * Constructs a new Features. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures); + + /** Features extractSyntax. */ + public extractSyntax: boolean; + + /** Features extractEntities. */ + public extractEntities: boolean; + + /** Features extractDocumentSentiment. */ + public extractDocumentSentiment: boolean; + + /** Features extractEntitySentiment. */ + public extractEntitySentiment: boolean; + + /** Features classifyText. */ + public classifyText: boolean; + + /** + * Creates a new Features instance using the specified properties. + * @param [properties] Properties to set + * @returns Features instance + */ + public static create(properties?: google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures): google.cloud.language.v1beta2.AnnotateTextRequest.Features; + + /** + * Encodes the specified Features message. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextRequest.Features.verify|verify} messages. + * @param message Features message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Features message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextRequest.Features.verify|verify} messages. + * @param message Features message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Features message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnnotateTextRequest.Features; + + /** + * Decodes a Features message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnnotateTextRequest.Features; + + /** + * Verifies a Features message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Features message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Features + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnnotateTextRequest.Features; + + /** + * Creates a plain object from a Features message. Also converts values to other types if specified. + * @param message Features + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnnotateTextRequest.Features, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Features to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an AnnotateTextResponse. */ + interface IAnnotateTextResponse { + + /** AnnotateTextResponse sentences */ + sentences?: (google.cloud.language.v1beta2.ISentence[]|null); + + /** AnnotateTextResponse tokens */ + tokens?: (google.cloud.language.v1beta2.IToken[]|null); + + /** AnnotateTextResponse entities */ + entities?: (google.cloud.language.v1beta2.IEntity[]|null); + + /** AnnotateTextResponse documentSentiment */ + documentSentiment?: (google.cloud.language.v1beta2.ISentiment|null); + + /** AnnotateTextResponse language */ + language?: (string|null); + + /** AnnotateTextResponse categories */ + categories?: (google.cloud.language.v1beta2.IClassificationCategory[]|null); + } + + /** Represents an AnnotateTextResponse. */ + class AnnotateTextResponse implements IAnnotateTextResponse { + + /** + * Constructs a new AnnotateTextResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IAnnotateTextResponse); + + /** AnnotateTextResponse sentences. */ + public sentences: google.cloud.language.v1beta2.ISentence[]; + + /** AnnotateTextResponse tokens. */ + public tokens: google.cloud.language.v1beta2.IToken[]; + + /** AnnotateTextResponse entities. */ + public entities: google.cloud.language.v1beta2.IEntity[]; + + /** AnnotateTextResponse documentSentiment. */ + public documentSentiment?: (google.cloud.language.v1beta2.ISentiment|null); + + /** AnnotateTextResponse language. */ + public language: string; + + /** AnnotateTextResponse categories. */ + public categories: google.cloud.language.v1beta2.IClassificationCategory[]; + + /** + * Creates a new AnnotateTextResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AnnotateTextResponse instance + */ + public static create(properties?: google.cloud.language.v1beta2.IAnnotateTextResponse): google.cloud.language.v1beta2.AnnotateTextResponse; + + /** + * Encodes the specified AnnotateTextResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextResponse.verify|verify} messages. + * @param message AnnotateTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IAnnotateTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnnotateTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextResponse.verify|verify} messages. + * @param message AnnotateTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IAnnotateTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnnotateTextResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnnotateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.AnnotateTextResponse; + + /** + * Decodes an AnnotateTextResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnnotateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.AnnotateTextResponse; + + /** + * Verifies an AnnotateTextResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnnotateTextResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnnotateTextResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.AnnotateTextResponse; + + /** + * Creates a plain object from an AnnotateTextResponse message. Also converts values to other types if specified. + * @param message AnnotateTextResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.AnnotateTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnnotateTextResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** EncodingType enum. */ + enum EncodingType { + NONE = 0, + UTF8 = 1, + UTF16 = 2, + UTF32 = 3 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; + + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: Uint8Array; + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js new file mode 100644 index 00000000000..ecf7daedad0 --- /dev/null +++ b/packages/google-cloud-language/protos/protos.js @@ -0,0 +1,27975 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("protobufjs/minimal")); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.language = (function() { + + /** + * Namespace language. + * @memberof google.cloud + * @namespace + */ + var language = {}; + + language.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.language + * @namespace + */ + var v1 = {}; + + v1.LanguageService = (function() { + + /** + * Constructs a new LanguageService service. + * @memberof google.cloud.language.v1 + * @classdesc Represents a LanguageService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function LanguageService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (LanguageService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LanguageService; + + /** + * Creates new LanguageService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.language.v1.LanguageService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LanguageService} RPC service. Useful where requests and/or responses are streamed. + */ + LanguageService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeSentiment}. + * @memberof google.cloud.language.v1.LanguageService + * @typedef AnalyzeSentimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1.AnalyzeSentimentResponse} [response] AnalyzeSentimentResponse + */ + + /** + * Calls AnalyzeSentiment. + * @function analyzeSentiment + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest} request AnalyzeSentimentRequest message or plain object + * @param {google.cloud.language.v1.LanguageService.AnalyzeSentimentCallback} callback Node-style callback called with the error, if any, and AnalyzeSentimentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.analyzeSentiment = function analyzeSentiment(request, callback) { + return this.rpcCall(analyzeSentiment, $root.google.cloud.language.v1.AnalyzeSentimentRequest, $root.google.cloud.language.v1.AnalyzeSentimentResponse, request, callback); + }, "name", { value: "AnalyzeSentiment" }); + + /** + * Calls AnalyzeSentiment. + * @function analyzeSentiment + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest} request AnalyzeSentimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeEntities}. + * @memberof google.cloud.language.v1.LanguageService + * @typedef AnalyzeEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1.AnalyzeEntitiesResponse} [response] AnalyzeEntitiesResponse + */ + + /** + * Calls AnalyzeEntities. + * @function analyzeEntities + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest} request AnalyzeEntitiesRequest message or plain object + * @param {google.cloud.language.v1.LanguageService.AnalyzeEntitiesCallback} callback Node-style callback called with the error, if any, and AnalyzeEntitiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.analyzeEntities = function analyzeEntities(request, callback) { + return this.rpcCall(analyzeEntities, $root.google.cloud.language.v1.AnalyzeEntitiesRequest, $root.google.cloud.language.v1.AnalyzeEntitiesResponse, request, callback); + }, "name", { value: "AnalyzeEntities" }); + + /** + * Calls AnalyzeEntities. + * @function analyzeEntities + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest} request AnalyzeEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeEntitySentiment}. + * @memberof google.cloud.language.v1.LanguageService + * @typedef AnalyzeEntitySentimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1.AnalyzeEntitySentimentResponse} [response] AnalyzeEntitySentimentResponse + */ + + /** + * Calls AnalyzeEntitySentiment. + * @function analyzeEntitySentiment + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest} request AnalyzeEntitySentimentRequest message or plain object + * @param {google.cloud.language.v1.LanguageService.AnalyzeEntitySentimentCallback} callback Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.analyzeEntitySentiment = function analyzeEntitySentiment(request, callback) { + return this.rpcCall(analyzeEntitySentiment, $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest, $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse, request, callback); + }, "name", { value: "AnalyzeEntitySentiment" }); + + /** + * Calls AnalyzeEntitySentiment. + * @function analyzeEntitySentiment + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest} request AnalyzeEntitySentimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeSyntax}. + * @memberof google.cloud.language.v1.LanguageService + * @typedef AnalyzeSyntaxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1.AnalyzeSyntaxResponse} [response] AnalyzeSyntaxResponse + */ + + /** + * Calls AnalyzeSyntax. + * @function analyzeSyntax + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest} request AnalyzeSyntaxRequest message or plain object + * @param {google.cloud.language.v1.LanguageService.AnalyzeSyntaxCallback} callback Node-style callback called with the error, if any, and AnalyzeSyntaxResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.analyzeSyntax = function analyzeSyntax(request, callback) { + return this.rpcCall(analyzeSyntax, $root.google.cloud.language.v1.AnalyzeSyntaxRequest, $root.google.cloud.language.v1.AnalyzeSyntaxResponse, request, callback); + }, "name", { value: "AnalyzeSyntax" }); + + /** + * Calls AnalyzeSyntax. + * @function analyzeSyntax + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest} request AnalyzeSyntaxRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#classifyText}. + * @memberof google.cloud.language.v1.LanguageService + * @typedef ClassifyTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1.ClassifyTextResponse} [response] ClassifyTextResponse + */ + + /** + * Calls ClassifyText. + * @function classifyText + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IClassifyTextRequest} request ClassifyTextRequest message or plain object + * @param {google.cloud.language.v1.LanguageService.ClassifyTextCallback} callback Node-style callback called with the error, if any, and ClassifyTextResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.classifyText = function classifyText(request, callback) { + return this.rpcCall(classifyText, $root.google.cloud.language.v1.ClassifyTextRequest, $root.google.cloud.language.v1.ClassifyTextResponse, request, callback); + }, "name", { value: "ClassifyText" }); + + /** + * Calls ClassifyText. + * @function classifyText + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IClassifyTextRequest} request ClassifyTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1.LanguageService#annotateText}. + * @memberof google.cloud.language.v1.LanguageService + * @typedef AnnotateTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1.AnnotateTextResponse} [response] AnnotateTextResponse + */ + + /** + * Calls AnnotateText. + * @function annotateText + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnnotateTextRequest} request AnnotateTextRequest message or plain object + * @param {google.cloud.language.v1.LanguageService.AnnotateTextCallback} callback Node-style callback called with the error, if any, and AnnotateTextResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.annotateText = function annotateText(request, callback) { + return this.rpcCall(annotateText, $root.google.cloud.language.v1.AnnotateTextRequest, $root.google.cloud.language.v1.AnnotateTextResponse, request, callback); + }, "name", { value: "AnnotateText" }); + + /** + * Calls AnnotateText. + * @function annotateText + * @memberof google.cloud.language.v1.LanguageService + * @instance + * @param {google.cloud.language.v1.IAnnotateTextRequest} request AnnotateTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return LanguageService; + })(); + + v1.Document = (function() { + + /** + * Properties of a Document. + * @memberof google.cloud.language.v1 + * @interface IDocument + * @property {google.cloud.language.v1.Document.Type|null} [type] Document type + * @property {string|null} [content] Document content + * @property {string|null} [gcsContentUri] Document gcsContentUri + * @property {string|null} [language] Document language + */ + + /** + * Constructs a new Document. + * @memberof google.cloud.language.v1 + * @classdesc Represents a Document. + * @implements IDocument + * @constructor + * @param {google.cloud.language.v1.IDocument=} [properties] Properties to set + */ + function Document(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Document type. + * @member {google.cloud.language.v1.Document.Type} type + * @memberof google.cloud.language.v1.Document + * @instance + */ + Document.prototype.type = 0; + + /** + * Document content. + * @member {string} content + * @memberof google.cloud.language.v1.Document + * @instance + */ + Document.prototype.content = ""; + + /** + * Document gcsContentUri. + * @member {string} gcsContentUri + * @memberof google.cloud.language.v1.Document + * @instance + */ + Document.prototype.gcsContentUri = ""; + + /** + * Document language. + * @member {string} language + * @memberof google.cloud.language.v1.Document + * @instance + */ + Document.prototype.language = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Document source. + * @member {"content"|"gcsContentUri"|undefined} source + * @memberof google.cloud.language.v1.Document + * @instance + */ + Object.defineProperty(Document.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["content", "gcsContentUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Document instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.Document + * @static + * @param {google.cloud.language.v1.IDocument=} [properties] Properties to set + * @returns {google.cloud.language.v1.Document} Document instance + */ + Document.create = function create(properties) { + return new Document(properties); + }; + + /** + * Encodes the specified Document message. Does not implicitly {@link google.cloud.language.v1.Document.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.Document + * @static + * @param {google.cloud.language.v1.IDocument} message Document message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Document.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsContentUri); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.language); + return writer; + }; + + /** + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.language.v1.Document.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.Document + * @static + * @param {google.cloud.language.v1.IDocument} message Document message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Document.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Document message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.Document + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.Document} Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Document.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.Document(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.content = reader.string(); + break; + case 3: + message.gcsContentUri = reader.string(); + break; + case 4: + message.language = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Document message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.Document + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.Document} Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Document.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Document message. + * @function verify + * @memberof google.cloud.language.v1.Document + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Document.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.content != null && message.hasOwnProperty("content")) { + properties.source = 1; + if (!$util.isString(message.content)) + return "content: string expected"; + } + if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.gcsContentUri)) + return "gcsContentUri: string expected"; + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + return null; + }; + + /** + * Creates a Document message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.Document + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.Document} Document + */ + Document.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.Document) + return object; + var message = new $root.google.cloud.language.v1.Document(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PLAIN_TEXT": + case 1: + message.type = 1; + break; + case "HTML": + case 2: + message.type = 2; + break; + } + if (object.content != null) + message.content = String(object.content); + if (object.gcsContentUri != null) + message.gcsContentUri = String(object.gcsContentUri); + if (object.language != null) + message.language = String(object.language); + return message; + }; + + /** + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.Document + * @static + * @param {google.cloud.language.v1.Document} message Document + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Document.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.language = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.language.v1.Document.Type[message.type] : message.type; + if (message.content != null && message.hasOwnProperty("content")) { + object.content = message.content; + if (options.oneofs) + object.source = "content"; + } + if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) { + object.gcsContentUri = message.gcsContentUri; + if (options.oneofs) + object.source = "gcsContentUri"; + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + return object; + }; + + /** + * Converts this Document to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.Document + * @instance + * @returns {Object.} JSON object + */ + Document.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.language.v1.Document.Type + * @enum {string} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} PLAIN_TEXT=1 PLAIN_TEXT value + * @property {number} HTML=2 HTML value + */ + Document.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PLAIN_TEXT"] = 1; + values[valuesById[2] = "HTML"] = 2; + return values; + })(); + + return Document; + })(); + + v1.Sentence = (function() { + + /** + * Properties of a Sentence. + * @memberof google.cloud.language.v1 + * @interface ISentence + * @property {google.cloud.language.v1.ITextSpan|null} [text] Sentence text + * @property {google.cloud.language.v1.ISentiment|null} [sentiment] Sentence sentiment + */ + + /** + * Constructs a new Sentence. + * @memberof google.cloud.language.v1 + * @classdesc Represents a Sentence. + * @implements ISentence + * @constructor + * @param {google.cloud.language.v1.ISentence=} [properties] Properties to set + */ + function Sentence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Sentence text. + * @member {google.cloud.language.v1.ITextSpan|null|undefined} text + * @memberof google.cloud.language.v1.Sentence + * @instance + */ + Sentence.prototype.text = null; + + /** + * Sentence sentiment. + * @member {google.cloud.language.v1.ISentiment|null|undefined} sentiment + * @memberof google.cloud.language.v1.Sentence + * @instance + */ + Sentence.prototype.sentiment = null; + + /** + * Creates a new Sentence instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.Sentence + * @static + * @param {google.cloud.language.v1.ISentence=} [properties] Properties to set + * @returns {google.cloud.language.v1.Sentence} Sentence instance + */ + Sentence.create = function create(properties) { + return new Sentence(properties); + }; + + /** + * Encodes the specified Sentence message. Does not implicitly {@link google.cloud.language.v1.Sentence.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.Sentence + * @static + * @param {google.cloud.language.v1.ISentence} message Sentence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sentence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.hasOwnProperty("text")) + $root.google.cloud.language.v1.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + $root.google.cloud.language.v1.Sentiment.encode(message.sentiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Sentence message, length delimited. Does not implicitly {@link google.cloud.language.v1.Sentence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.Sentence + * @static + * @param {google.cloud.language.v1.ISentence} message Sentence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sentence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Sentence message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.Sentence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.Sentence} Sentence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sentence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.Sentence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = $root.google.cloud.language.v1.TextSpan.decode(reader, reader.uint32()); + break; + case 2: + message.sentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Sentence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.Sentence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.Sentence} Sentence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sentence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Sentence message. + * @function verify + * @memberof google.cloud.language.v1.Sentence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sentence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.language.v1.TextSpan.verify(message.text); + if (error) + return "text." + error; + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.language.v1.Sentiment.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates a Sentence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.Sentence + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.Sentence} Sentence + */ + Sentence.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.Sentence) + return object; + var message = new $root.google.cloud.language.v1.Sentence(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.language.v1.Sentence.text: object expected"); + message.text = $root.google.cloud.language.v1.TextSpan.fromObject(object.text); + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.language.v1.Sentence.sentiment: object expected"); + message.sentiment = $root.google.cloud.language.v1.Sentiment.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from a Sentence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.Sentence + * @static + * @param {google.cloud.language.v1.Sentence} message Sentence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sentence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = null; + object.sentiment = null; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.language.v1.TextSpan.toObject(message.text, options); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.language.v1.Sentiment.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this Sentence to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.Sentence + * @instance + * @returns {Object.} JSON object + */ + Sentence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Sentence; + })(); + + v1.Entity = (function() { + + /** + * Properties of an Entity. + * @memberof google.cloud.language.v1 + * @interface IEntity + * @property {string|null} [name] Entity name + * @property {google.cloud.language.v1.Entity.Type|null} [type] Entity type + * @property {Object.|null} [metadata] Entity metadata + * @property {number|null} [salience] Entity salience + * @property {Array.|null} [mentions] Entity mentions + * @property {google.cloud.language.v1.ISentiment|null} [sentiment] Entity sentiment + */ + + /** + * Constructs a new Entity. + * @memberof google.cloud.language.v1 + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.language.v1.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + this.metadata = {}; + this.mentions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entity name. + * @member {string} name + * @memberof google.cloud.language.v1.Entity + * @instance + */ + Entity.prototype.name = ""; + + /** + * Entity type. + * @member {google.cloud.language.v1.Entity.Type} type + * @memberof google.cloud.language.v1.Entity + * @instance + */ + Entity.prototype.type = 0; + + /** + * Entity metadata. + * @member {Object.} metadata + * @memberof google.cloud.language.v1.Entity + * @instance + */ + Entity.prototype.metadata = $util.emptyObject; + + /** + * Entity salience. + * @member {number} salience + * @memberof google.cloud.language.v1.Entity + * @instance + */ + Entity.prototype.salience = 0; + + /** + * Entity mentions. + * @member {Array.} mentions + * @memberof google.cloud.language.v1.Entity + * @instance + */ + Entity.prototype.mentions = $util.emptyArray; + + /** + * Entity sentiment. + * @member {google.cloud.language.v1.ISentiment|null|undefined} sentiment + * @memberof google.cloud.language.v1.Entity + * @instance + */ + Entity.prototype.sentiment = null; + + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.Entity + * @static + * @param {google.cloud.language.v1.IEntity=} [properties] Properties to set + * @returns {google.cloud.language.v1.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.language.v1.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.Entity + * @static + * @param {google.cloud.language.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.metadata != null && message.hasOwnProperty("metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.salience != null && message.hasOwnProperty("salience")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.salience); + if (message.mentions != null && message.mentions.length) + for (var i = 0; i < message.mentions.length; ++i) + $root.google.cloud.language.v1.EntityMention.encode(message.mentions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + $root.google.cloud.language.v1.Sentiment.encode(message.sentiment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.language.v1.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.Entity + * @static + * @param {google.cloud.language.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.Entity(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + case 3: + reader.skip().pos++; + if (message.metadata === $util.emptyObject) + message.metadata = {}; + key = reader.string(); + reader.pos++; + message.metadata[key] = reader.string(); + break; + case 4: + message.salience = reader.float(); + break; + case 5: + if (!(message.mentions && message.mentions.length)) + message.mentions = []; + message.mentions.push($root.google.cloud.language.v1.EntityMention.decode(reader, reader.uint32())); + break; + case 6: + message.sentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.language.v1.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.salience != null && message.hasOwnProperty("salience")) + if (typeof message.salience !== "number") + return "salience: number expected"; + if (message.mentions != null && message.hasOwnProperty("mentions")) { + if (!Array.isArray(message.mentions)) + return "mentions: array expected"; + for (var i = 0; i < message.mentions.length; ++i) { + var error = $root.google.cloud.language.v1.EntityMention.verify(message.mentions[i]); + if (error) + return "mentions." + error; + } + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.language.v1.Sentiment.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.Entity) + return object; + var message = new $root.google.cloud.language.v1.Entity(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "PERSON": + case 1: + message.type = 1; + break; + case "LOCATION": + case 2: + message.type = 2; + break; + case "ORGANIZATION": + case 3: + message.type = 3; + break; + case "EVENT": + case 4: + message.type = 4; + break; + case "WORK_OF_ART": + case 5: + message.type = 5; + break; + case "CONSUMER_GOOD": + case 6: + message.type = 6; + break; + case "OTHER": + case 7: + message.type = 7; + break; + case "PHONE_NUMBER": + case 9: + message.type = 9; + break; + case "ADDRESS": + case 10: + message.type = 10; + break; + case "DATE": + case 11: + message.type = 11; + break; + case "NUMBER": + case 12: + message.type = 12; + break; + case "PRICE": + case 13: + message.type = 13; + break; + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.language.v1.Entity.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.salience != null) + message.salience = Number(object.salience); + if (object.mentions) { + if (!Array.isArray(object.mentions)) + throw TypeError(".google.cloud.language.v1.Entity.mentions: array expected"); + message.mentions = []; + for (var i = 0; i < object.mentions.length; ++i) { + if (typeof object.mentions[i] !== "object") + throw TypeError(".google.cloud.language.v1.Entity.mentions: object expected"); + message.mentions[i] = $root.google.cloud.language.v1.EntityMention.fromObject(object.mentions[i]); + } + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.language.v1.Entity.sentiment: object expected"); + message.sentiment = $root.google.cloud.language.v1.Sentiment.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.Entity + * @static + * @param {google.cloud.language.v1.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mentions = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "UNKNOWN" : 0; + object.salience = 0; + object.sentiment = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.language.v1.Entity.Type[message.type] : message.type; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.salience != null && message.hasOwnProperty("salience")) + object.salience = options.json && !isFinite(message.salience) ? String(message.salience) : message.salience; + if (message.mentions && message.mentions.length) { + object.mentions = []; + for (var j = 0; j < message.mentions.length; ++j) + object.mentions[j] = $root.google.cloud.language.v1.EntityMention.toObject(message.mentions[j], options); + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.language.v1.Sentiment.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.language.v1.Entity.Type + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} PERSON=1 PERSON value + * @property {number} LOCATION=2 LOCATION value + * @property {number} ORGANIZATION=3 ORGANIZATION value + * @property {number} EVENT=4 EVENT value + * @property {number} WORK_OF_ART=5 WORK_OF_ART value + * @property {number} CONSUMER_GOOD=6 CONSUMER_GOOD value + * @property {number} OTHER=7 OTHER value + * @property {number} PHONE_NUMBER=9 PHONE_NUMBER value + * @property {number} ADDRESS=10 ADDRESS value + * @property {number} DATE=11 DATE value + * @property {number} NUMBER=12 NUMBER value + * @property {number} PRICE=13 PRICE value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "PERSON"] = 1; + values[valuesById[2] = "LOCATION"] = 2; + values[valuesById[3] = "ORGANIZATION"] = 3; + values[valuesById[4] = "EVENT"] = 4; + values[valuesById[5] = "WORK_OF_ART"] = 5; + values[valuesById[6] = "CONSUMER_GOOD"] = 6; + values[valuesById[7] = "OTHER"] = 7; + values[valuesById[9] = "PHONE_NUMBER"] = 9; + values[valuesById[10] = "ADDRESS"] = 10; + values[valuesById[11] = "DATE"] = 11; + values[valuesById[12] = "NUMBER"] = 12; + values[valuesById[13] = "PRICE"] = 13; + return values; + })(); + + return Entity; + })(); + + /** + * EncodingType enum. + * @name google.cloud.language.v1.EncodingType + * @enum {string} + * @property {number} NONE=0 NONE value + * @property {number} UTF8=1 UTF8 value + * @property {number} UTF16=2 UTF16 value + * @property {number} UTF32=3 UTF32 value + */ + v1.EncodingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "UTF8"] = 1; + values[valuesById[2] = "UTF16"] = 2; + values[valuesById[3] = "UTF32"] = 3; + return values; + })(); + + v1.Token = (function() { + + /** + * Properties of a Token. + * @memberof google.cloud.language.v1 + * @interface IToken + * @property {google.cloud.language.v1.ITextSpan|null} [text] Token text + * @property {google.cloud.language.v1.IPartOfSpeech|null} [partOfSpeech] Token partOfSpeech + * @property {google.cloud.language.v1.IDependencyEdge|null} [dependencyEdge] Token dependencyEdge + * @property {string|null} [lemma] Token lemma + */ + + /** + * Constructs a new Token. + * @memberof google.cloud.language.v1 + * @classdesc Represents a Token. + * @implements IToken + * @constructor + * @param {google.cloud.language.v1.IToken=} [properties] Properties to set + */ + function Token(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Token text. + * @member {google.cloud.language.v1.ITextSpan|null|undefined} text + * @memberof google.cloud.language.v1.Token + * @instance + */ + Token.prototype.text = null; + + /** + * Token partOfSpeech. + * @member {google.cloud.language.v1.IPartOfSpeech|null|undefined} partOfSpeech + * @memberof google.cloud.language.v1.Token + * @instance + */ + Token.prototype.partOfSpeech = null; + + /** + * Token dependencyEdge. + * @member {google.cloud.language.v1.IDependencyEdge|null|undefined} dependencyEdge + * @memberof google.cloud.language.v1.Token + * @instance + */ + Token.prototype.dependencyEdge = null; + + /** + * Token lemma. + * @member {string} lemma + * @memberof google.cloud.language.v1.Token + * @instance + */ + Token.prototype.lemma = ""; + + /** + * Creates a new Token instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.Token + * @static + * @param {google.cloud.language.v1.IToken=} [properties] Properties to set + * @returns {google.cloud.language.v1.Token} Token instance + */ + Token.create = function create(properties) { + return new Token(properties); + }; + + /** + * Encodes the specified Token message. Does not implicitly {@link google.cloud.language.v1.Token.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.Token + * @static + * @param {google.cloud.language.v1.IToken} message Token message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Token.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.hasOwnProperty("text")) + $root.google.cloud.language.v1.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) + $root.google.cloud.language.v1.PartOfSpeech.encode(message.partOfSpeech, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) + $root.google.cloud.language.v1.DependencyEdge.encode(message.dependencyEdge, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lemma != null && message.hasOwnProperty("lemma")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.lemma); + return writer; + }; + + /** + * Encodes the specified Token message, length delimited. Does not implicitly {@link google.cloud.language.v1.Token.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.Token + * @static + * @param {google.cloud.language.v1.IToken} message Token message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Token.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Token message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.Token + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.Token} Token + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Token.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.Token(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = $root.google.cloud.language.v1.TextSpan.decode(reader, reader.uint32()); + break; + case 2: + message.partOfSpeech = $root.google.cloud.language.v1.PartOfSpeech.decode(reader, reader.uint32()); + break; + case 3: + message.dependencyEdge = $root.google.cloud.language.v1.DependencyEdge.decode(reader, reader.uint32()); + break; + case 4: + message.lemma = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Token message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.Token + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.Token} Token + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Token.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Token message. + * @function verify + * @memberof google.cloud.language.v1.Token + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Token.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.language.v1.TextSpan.verify(message.text); + if (error) + return "text." + error; + } + if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) { + var error = $root.google.cloud.language.v1.PartOfSpeech.verify(message.partOfSpeech); + if (error) + return "partOfSpeech." + error; + } + if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) { + var error = $root.google.cloud.language.v1.DependencyEdge.verify(message.dependencyEdge); + if (error) + return "dependencyEdge." + error; + } + if (message.lemma != null && message.hasOwnProperty("lemma")) + if (!$util.isString(message.lemma)) + return "lemma: string expected"; + return null; + }; + + /** + * Creates a Token message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.Token + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.Token} Token + */ + Token.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.Token) + return object; + var message = new $root.google.cloud.language.v1.Token(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.language.v1.Token.text: object expected"); + message.text = $root.google.cloud.language.v1.TextSpan.fromObject(object.text); + } + if (object.partOfSpeech != null) { + if (typeof object.partOfSpeech !== "object") + throw TypeError(".google.cloud.language.v1.Token.partOfSpeech: object expected"); + message.partOfSpeech = $root.google.cloud.language.v1.PartOfSpeech.fromObject(object.partOfSpeech); + } + if (object.dependencyEdge != null) { + if (typeof object.dependencyEdge !== "object") + throw TypeError(".google.cloud.language.v1.Token.dependencyEdge: object expected"); + message.dependencyEdge = $root.google.cloud.language.v1.DependencyEdge.fromObject(object.dependencyEdge); + } + if (object.lemma != null) + message.lemma = String(object.lemma); + return message; + }; + + /** + * Creates a plain object from a Token message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.Token + * @static + * @param {google.cloud.language.v1.Token} message Token + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Token.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = null; + object.partOfSpeech = null; + object.dependencyEdge = null; + object.lemma = ""; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.language.v1.TextSpan.toObject(message.text, options); + if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) + object.partOfSpeech = $root.google.cloud.language.v1.PartOfSpeech.toObject(message.partOfSpeech, options); + if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) + object.dependencyEdge = $root.google.cloud.language.v1.DependencyEdge.toObject(message.dependencyEdge, options); + if (message.lemma != null && message.hasOwnProperty("lemma")) + object.lemma = message.lemma; + return object; + }; + + /** + * Converts this Token to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.Token + * @instance + * @returns {Object.} JSON object + */ + Token.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Token; + })(); + + v1.Sentiment = (function() { + + /** + * Properties of a Sentiment. + * @memberof google.cloud.language.v1 + * @interface ISentiment + * @property {number|null} [magnitude] Sentiment magnitude + * @property {number|null} [score] Sentiment score + */ + + /** + * Constructs a new Sentiment. + * @memberof google.cloud.language.v1 + * @classdesc Represents a Sentiment. + * @implements ISentiment + * @constructor + * @param {google.cloud.language.v1.ISentiment=} [properties] Properties to set + */ + function Sentiment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Sentiment magnitude. + * @member {number} magnitude + * @memberof google.cloud.language.v1.Sentiment + * @instance + */ + Sentiment.prototype.magnitude = 0; + + /** + * Sentiment score. + * @member {number} score + * @memberof google.cloud.language.v1.Sentiment + * @instance + */ + Sentiment.prototype.score = 0; + + /** + * Creates a new Sentiment instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.Sentiment + * @static + * @param {google.cloud.language.v1.ISentiment=} [properties] Properties to set + * @returns {google.cloud.language.v1.Sentiment} Sentiment instance + */ + Sentiment.create = function create(properties) { + return new Sentiment(properties); + }; + + /** + * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.language.v1.Sentiment.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.Sentiment + * @static + * @param {google.cloud.language.v1.ISentiment} message Sentiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sentiment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.magnitude); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.score); + return writer; + }; + + /** + * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.language.v1.Sentiment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.Sentiment + * @static + * @param {google.cloud.language.v1.ISentiment} message Sentiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sentiment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Sentiment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.Sentiment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.Sentiment} Sentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sentiment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.Sentiment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.magnitude = reader.float(); + break; + case 3: + message.score = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Sentiment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.Sentiment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.Sentiment} Sentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sentiment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Sentiment message. + * @function verify + * @memberof google.cloud.language.v1.Sentiment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sentiment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + if (typeof message.magnitude !== "number") + return "magnitude: number expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + return null; + }; + + /** + * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.Sentiment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.Sentiment} Sentiment + */ + Sentiment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.Sentiment) + return object; + var message = new $root.google.cloud.language.v1.Sentiment(); + if (object.magnitude != null) + message.magnitude = Number(object.magnitude); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a Sentiment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.Sentiment + * @static + * @param {google.cloud.language.v1.Sentiment} message Sentiment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sentiment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.magnitude = 0; + object.score = 0; + } + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + return object; + }; + + /** + * Converts this Sentiment to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.Sentiment + * @instance + * @returns {Object.} JSON object + */ + Sentiment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Sentiment; + })(); + + v1.PartOfSpeech = (function() { + + /** + * Properties of a PartOfSpeech. + * @memberof google.cloud.language.v1 + * @interface IPartOfSpeech + * @property {google.cloud.language.v1.PartOfSpeech.Tag|null} [tag] PartOfSpeech tag + * @property {google.cloud.language.v1.PartOfSpeech.Aspect|null} [aspect] PartOfSpeech aspect + * @property {google.cloud.language.v1.PartOfSpeech.Case|null} ["case"] PartOfSpeech case + * @property {google.cloud.language.v1.PartOfSpeech.Form|null} [form] PartOfSpeech form + * @property {google.cloud.language.v1.PartOfSpeech.Gender|null} [gender] PartOfSpeech gender + * @property {google.cloud.language.v1.PartOfSpeech.Mood|null} [mood] PartOfSpeech mood + * @property {google.cloud.language.v1.PartOfSpeech.Number|null} [number] PartOfSpeech number + * @property {google.cloud.language.v1.PartOfSpeech.Person|null} [person] PartOfSpeech person + * @property {google.cloud.language.v1.PartOfSpeech.Proper|null} [proper] PartOfSpeech proper + * @property {google.cloud.language.v1.PartOfSpeech.Reciprocity|null} [reciprocity] PartOfSpeech reciprocity + * @property {google.cloud.language.v1.PartOfSpeech.Tense|null} [tense] PartOfSpeech tense + * @property {google.cloud.language.v1.PartOfSpeech.Voice|null} [voice] PartOfSpeech voice + */ + + /** + * Constructs a new PartOfSpeech. + * @memberof google.cloud.language.v1 + * @classdesc Represents a PartOfSpeech. + * @implements IPartOfSpeech + * @constructor + * @param {google.cloud.language.v1.IPartOfSpeech=} [properties] Properties to set + */ + function PartOfSpeech(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartOfSpeech tag. + * @member {google.cloud.language.v1.PartOfSpeech.Tag} tag + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.tag = 0; + + /** + * PartOfSpeech aspect. + * @member {google.cloud.language.v1.PartOfSpeech.Aspect} aspect + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.aspect = 0; + + /** + * PartOfSpeech case. + * @member {google.cloud.language.v1.PartOfSpeech.Case} case + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype["case"] = 0; + + /** + * PartOfSpeech form. + * @member {google.cloud.language.v1.PartOfSpeech.Form} form + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.form = 0; + + /** + * PartOfSpeech gender. + * @member {google.cloud.language.v1.PartOfSpeech.Gender} gender + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.gender = 0; + + /** + * PartOfSpeech mood. + * @member {google.cloud.language.v1.PartOfSpeech.Mood} mood + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.mood = 0; + + /** + * PartOfSpeech number. + * @member {google.cloud.language.v1.PartOfSpeech.Number} number + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.number = 0; + + /** + * PartOfSpeech person. + * @member {google.cloud.language.v1.PartOfSpeech.Person} person + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.person = 0; + + /** + * PartOfSpeech proper. + * @member {google.cloud.language.v1.PartOfSpeech.Proper} proper + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.proper = 0; + + /** + * PartOfSpeech reciprocity. + * @member {google.cloud.language.v1.PartOfSpeech.Reciprocity} reciprocity + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.reciprocity = 0; + + /** + * PartOfSpeech tense. + * @member {google.cloud.language.v1.PartOfSpeech.Tense} tense + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.tense = 0; + + /** + * PartOfSpeech voice. + * @member {google.cloud.language.v1.PartOfSpeech.Voice} voice + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.voice = 0; + + /** + * Creates a new PartOfSpeech instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.PartOfSpeech + * @static + * @param {google.cloud.language.v1.IPartOfSpeech=} [properties] Properties to set + * @returns {google.cloud.language.v1.PartOfSpeech} PartOfSpeech instance + */ + PartOfSpeech.create = function create(properties) { + return new PartOfSpeech(properties); + }; + + /** + * Encodes the specified PartOfSpeech message. Does not implicitly {@link google.cloud.language.v1.PartOfSpeech.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.PartOfSpeech + * @static + * @param {google.cloud.language.v1.IPartOfSpeech} message PartOfSpeech message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartOfSpeech.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && message.hasOwnProperty("tag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tag); + if (message.aspect != null && message.hasOwnProperty("aspect")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.aspect); + if (message["case"] != null && message.hasOwnProperty("case")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message["case"]); + if (message.form != null && message.hasOwnProperty("form")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.form); + if (message.gender != null && message.hasOwnProperty("gender")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.gender); + if (message.mood != null && message.hasOwnProperty("mood")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mood); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.number); + if (message.person != null && message.hasOwnProperty("person")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.person); + if (message.proper != null && message.hasOwnProperty("proper")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.proper); + if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.reciprocity); + if (message.tense != null && message.hasOwnProperty("tense")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.tense); + if (message.voice != null && message.hasOwnProperty("voice")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.voice); + return writer; + }; + + /** + * Encodes the specified PartOfSpeech message, length delimited. Does not implicitly {@link google.cloud.language.v1.PartOfSpeech.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.PartOfSpeech + * @static + * @param {google.cloud.language.v1.IPartOfSpeech} message PartOfSpeech message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartOfSpeech.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.PartOfSpeech + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.PartOfSpeech} PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartOfSpeech.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.PartOfSpeech(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tag = reader.int32(); + break; + case 2: + message.aspect = reader.int32(); + break; + case 3: + message["case"] = reader.int32(); + break; + case 4: + message.form = reader.int32(); + break; + case 5: + message.gender = reader.int32(); + break; + case 6: + message.mood = reader.int32(); + break; + case 7: + message.number = reader.int32(); + break; + case 8: + message.person = reader.int32(); + break; + case 9: + message.proper = reader.int32(); + break; + case 10: + message.reciprocity = reader.int32(); + break; + case 11: + message.tense = reader.int32(); + break; + case 12: + message.voice = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.PartOfSpeech + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.PartOfSpeech} PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartOfSpeech.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartOfSpeech message. + * @function verify + * @memberof google.cloud.language.v1.PartOfSpeech + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartOfSpeech.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + switch (message.tag) { + default: + return "tag: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.aspect != null && message.hasOwnProperty("aspect")) + switch (message.aspect) { + default: + return "aspect: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message["case"] != null && message.hasOwnProperty("case")) + switch (message["case"]) { + default: + return "case: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + break; + } + if (message.form != null && message.hasOwnProperty("form")) + switch (message.form) { + default: + return "form: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + break; + } + if (message.gender != null && message.hasOwnProperty("gender")) + switch (message.gender) { + default: + return "gender: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mood != null && message.hasOwnProperty("mood")) + switch (message.mood) { + default: + return "mood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.number != null && message.hasOwnProperty("number")) + switch (message.number) { + default: + return "number: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.person != null && message.hasOwnProperty("person")) + switch (message.person) { + default: + return "person: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.proper != null && message.hasOwnProperty("proper")) + switch (message.proper) { + default: + return "proper: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + switch (message.reciprocity) { + default: + return "reciprocity: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.tense != null && message.hasOwnProperty("tense")) + switch (message.tense) { + default: + return "tense: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.voice != null && message.hasOwnProperty("voice")) + switch (message.voice) { + default: + return "voice: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a PartOfSpeech message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.PartOfSpeech + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.PartOfSpeech} PartOfSpeech + */ + PartOfSpeech.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.PartOfSpeech) + return object; + var message = new $root.google.cloud.language.v1.PartOfSpeech(); + switch (object.tag) { + case "UNKNOWN": + case 0: + message.tag = 0; + break; + case "ADJ": + case 1: + message.tag = 1; + break; + case "ADP": + case 2: + message.tag = 2; + break; + case "ADV": + case 3: + message.tag = 3; + break; + case "CONJ": + case 4: + message.tag = 4; + break; + case "DET": + case 5: + message.tag = 5; + break; + case "NOUN": + case 6: + message.tag = 6; + break; + case "NUM": + case 7: + message.tag = 7; + break; + case "PRON": + case 8: + message.tag = 8; + break; + case "PRT": + case 9: + message.tag = 9; + break; + case "PUNCT": + case 10: + message.tag = 10; + break; + case "VERB": + case 11: + message.tag = 11; + break; + case "X": + case 12: + message.tag = 12; + break; + case "AFFIX": + case 13: + message.tag = 13; + break; + } + switch (object.aspect) { + case "ASPECT_UNKNOWN": + case 0: + message.aspect = 0; + break; + case "PERFECTIVE": + case 1: + message.aspect = 1; + break; + case "IMPERFECTIVE": + case 2: + message.aspect = 2; + break; + case "PROGRESSIVE": + case 3: + message.aspect = 3; + break; + } + switch (object["case"]) { + case "CASE_UNKNOWN": + case 0: + message["case"] = 0; + break; + case "ACCUSATIVE": + case 1: + message["case"] = 1; + break; + case "ADVERBIAL": + case 2: + message["case"] = 2; + break; + case "COMPLEMENTIVE": + case 3: + message["case"] = 3; + break; + case "DATIVE": + case 4: + message["case"] = 4; + break; + case "GENITIVE": + case 5: + message["case"] = 5; + break; + case "INSTRUMENTAL": + case 6: + message["case"] = 6; + break; + case "LOCATIVE": + case 7: + message["case"] = 7; + break; + case "NOMINATIVE": + case 8: + message["case"] = 8; + break; + case "OBLIQUE": + case 9: + message["case"] = 9; + break; + case "PARTITIVE": + case 10: + message["case"] = 10; + break; + case "PREPOSITIONAL": + case 11: + message["case"] = 11; + break; + case "REFLEXIVE_CASE": + case 12: + message["case"] = 12; + break; + case "RELATIVE_CASE": + case 13: + message["case"] = 13; + break; + case "VOCATIVE": + case 14: + message["case"] = 14; + break; + } + switch (object.form) { + case "FORM_UNKNOWN": + case 0: + message.form = 0; + break; + case "ADNOMIAL": + case 1: + message.form = 1; + break; + case "AUXILIARY": + case 2: + message.form = 2; + break; + case "COMPLEMENTIZER": + case 3: + message.form = 3; + break; + case "FINAL_ENDING": + case 4: + message.form = 4; + break; + case "GERUND": + case 5: + message.form = 5; + break; + case "REALIS": + case 6: + message.form = 6; + break; + case "IRREALIS": + case 7: + message.form = 7; + break; + case "SHORT": + case 8: + message.form = 8; + break; + case "LONG": + case 9: + message.form = 9; + break; + case "ORDER": + case 10: + message.form = 10; + break; + case "SPECIFIC": + case 11: + message.form = 11; + break; + } + switch (object.gender) { + case "GENDER_UNKNOWN": + case 0: + message.gender = 0; + break; + case "FEMININE": + case 1: + message.gender = 1; + break; + case "MASCULINE": + case 2: + message.gender = 2; + break; + case "NEUTER": + case 3: + message.gender = 3; + break; + } + switch (object.mood) { + case "MOOD_UNKNOWN": + case 0: + message.mood = 0; + break; + case "CONDITIONAL_MOOD": + case 1: + message.mood = 1; + break; + case "IMPERATIVE": + case 2: + message.mood = 2; + break; + case "INDICATIVE": + case 3: + message.mood = 3; + break; + case "INTERROGATIVE": + case 4: + message.mood = 4; + break; + case "JUSSIVE": + case 5: + message.mood = 5; + break; + case "SUBJUNCTIVE": + case 6: + message.mood = 6; + break; + } + switch (object.number) { + case "NUMBER_UNKNOWN": + case 0: + message.number = 0; + break; + case "SINGULAR": + case 1: + message.number = 1; + break; + case "PLURAL": + case 2: + message.number = 2; + break; + case "DUAL": + case 3: + message.number = 3; + break; + } + switch (object.person) { + case "PERSON_UNKNOWN": + case 0: + message.person = 0; + break; + case "FIRST": + case 1: + message.person = 1; + break; + case "SECOND": + case 2: + message.person = 2; + break; + case "THIRD": + case 3: + message.person = 3; + break; + case "REFLEXIVE_PERSON": + case 4: + message.person = 4; + break; + } + switch (object.proper) { + case "PROPER_UNKNOWN": + case 0: + message.proper = 0; + break; + case "PROPER": + case 1: + message.proper = 1; + break; + case "NOT_PROPER": + case 2: + message.proper = 2; + break; + } + switch (object.reciprocity) { + case "RECIPROCITY_UNKNOWN": + case 0: + message.reciprocity = 0; + break; + case "RECIPROCAL": + case 1: + message.reciprocity = 1; + break; + case "NON_RECIPROCAL": + case 2: + message.reciprocity = 2; + break; + } + switch (object.tense) { + case "TENSE_UNKNOWN": + case 0: + message.tense = 0; + break; + case "CONDITIONAL_TENSE": + case 1: + message.tense = 1; + break; + case "FUTURE": + case 2: + message.tense = 2; + break; + case "PAST": + case 3: + message.tense = 3; + break; + case "PRESENT": + case 4: + message.tense = 4; + break; + case "IMPERFECT": + case 5: + message.tense = 5; + break; + case "PLUPERFECT": + case 6: + message.tense = 6; + break; + } + switch (object.voice) { + case "VOICE_UNKNOWN": + case 0: + message.voice = 0; + break; + case "ACTIVE": + case 1: + message.voice = 1; + break; + case "CAUSATIVE": + case 2: + message.voice = 2; + break; + case "PASSIVE": + case 3: + message.voice = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a PartOfSpeech message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.PartOfSpeech + * @static + * @param {google.cloud.language.v1.PartOfSpeech} message PartOfSpeech + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartOfSpeech.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tag = options.enums === String ? "UNKNOWN" : 0; + object.aspect = options.enums === String ? "ASPECT_UNKNOWN" : 0; + object["case"] = options.enums === String ? "CASE_UNKNOWN" : 0; + object.form = options.enums === String ? "FORM_UNKNOWN" : 0; + object.gender = options.enums === String ? "GENDER_UNKNOWN" : 0; + object.mood = options.enums === String ? "MOOD_UNKNOWN" : 0; + object.number = options.enums === String ? "NUMBER_UNKNOWN" : 0; + object.person = options.enums === String ? "PERSON_UNKNOWN" : 0; + object.proper = options.enums === String ? "PROPER_UNKNOWN" : 0; + object.reciprocity = options.enums === String ? "RECIPROCITY_UNKNOWN" : 0; + object.tense = options.enums === String ? "TENSE_UNKNOWN" : 0; + object.voice = options.enums === String ? "VOICE_UNKNOWN" : 0; + } + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Tag[message.tag] : message.tag; + if (message.aspect != null && message.hasOwnProperty("aspect")) + object.aspect = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Aspect[message.aspect] : message.aspect; + if (message["case"] != null && message.hasOwnProperty("case")) + object["case"] = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Case[message["case"]] : message["case"]; + if (message.form != null && message.hasOwnProperty("form")) + object.form = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Form[message.form] : message.form; + if (message.gender != null && message.hasOwnProperty("gender")) + object.gender = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Gender[message.gender] : message.gender; + if (message.mood != null && message.hasOwnProperty("mood")) + object.mood = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Mood[message.mood] : message.mood; + if (message.number != null && message.hasOwnProperty("number")) + object.number = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Number[message.number] : message.number; + if (message.person != null && message.hasOwnProperty("person")) + object.person = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Person[message.person] : message.person; + if (message.proper != null && message.hasOwnProperty("proper")) + object.proper = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Proper[message.proper] : message.proper; + if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + object.reciprocity = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Reciprocity[message.reciprocity] : message.reciprocity; + if (message.tense != null && message.hasOwnProperty("tense")) + object.tense = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Tense[message.tense] : message.tense; + if (message.voice != null && message.hasOwnProperty("voice")) + object.voice = options.enums === String ? $root.google.cloud.language.v1.PartOfSpeech.Voice[message.voice] : message.voice; + return object; + }; + + /** + * Converts this PartOfSpeech to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.PartOfSpeech + * @instance + * @returns {Object.} JSON object + */ + PartOfSpeech.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Tag enum. + * @name google.cloud.language.v1.PartOfSpeech.Tag + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ADJ=1 ADJ value + * @property {number} ADP=2 ADP value + * @property {number} ADV=3 ADV value + * @property {number} CONJ=4 CONJ value + * @property {number} DET=5 DET value + * @property {number} NOUN=6 NOUN value + * @property {number} NUM=7 NUM value + * @property {number} PRON=8 PRON value + * @property {number} PRT=9 PRT value + * @property {number} PUNCT=10 PUNCT value + * @property {number} VERB=11 VERB value + * @property {number} X=12 X value + * @property {number} AFFIX=13 AFFIX value + */ + PartOfSpeech.Tag = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ADJ"] = 1; + values[valuesById[2] = "ADP"] = 2; + values[valuesById[3] = "ADV"] = 3; + values[valuesById[4] = "CONJ"] = 4; + values[valuesById[5] = "DET"] = 5; + values[valuesById[6] = "NOUN"] = 6; + values[valuesById[7] = "NUM"] = 7; + values[valuesById[8] = "PRON"] = 8; + values[valuesById[9] = "PRT"] = 9; + values[valuesById[10] = "PUNCT"] = 10; + values[valuesById[11] = "VERB"] = 11; + values[valuesById[12] = "X"] = 12; + values[valuesById[13] = "AFFIX"] = 13; + return values; + })(); + + /** + * Aspect enum. + * @name google.cloud.language.v1.PartOfSpeech.Aspect + * @enum {string} + * @property {number} ASPECT_UNKNOWN=0 ASPECT_UNKNOWN value + * @property {number} PERFECTIVE=1 PERFECTIVE value + * @property {number} IMPERFECTIVE=2 IMPERFECTIVE value + * @property {number} PROGRESSIVE=3 PROGRESSIVE value + */ + PartOfSpeech.Aspect = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ASPECT_UNKNOWN"] = 0; + values[valuesById[1] = "PERFECTIVE"] = 1; + values[valuesById[2] = "IMPERFECTIVE"] = 2; + values[valuesById[3] = "PROGRESSIVE"] = 3; + return values; + })(); + + /** + * Case enum. + * @name google.cloud.language.v1.PartOfSpeech.Case + * @enum {string} + * @property {number} CASE_UNKNOWN=0 CASE_UNKNOWN value + * @property {number} ACCUSATIVE=1 ACCUSATIVE value + * @property {number} ADVERBIAL=2 ADVERBIAL value + * @property {number} COMPLEMENTIVE=3 COMPLEMENTIVE value + * @property {number} DATIVE=4 DATIVE value + * @property {number} GENITIVE=5 GENITIVE value + * @property {number} INSTRUMENTAL=6 INSTRUMENTAL value + * @property {number} LOCATIVE=7 LOCATIVE value + * @property {number} NOMINATIVE=8 NOMINATIVE value + * @property {number} OBLIQUE=9 OBLIQUE value + * @property {number} PARTITIVE=10 PARTITIVE value + * @property {number} PREPOSITIONAL=11 PREPOSITIONAL value + * @property {number} REFLEXIVE_CASE=12 REFLEXIVE_CASE value + * @property {number} RELATIVE_CASE=13 RELATIVE_CASE value + * @property {number} VOCATIVE=14 VOCATIVE value + */ + PartOfSpeech.Case = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CASE_UNKNOWN"] = 0; + values[valuesById[1] = "ACCUSATIVE"] = 1; + values[valuesById[2] = "ADVERBIAL"] = 2; + values[valuesById[3] = "COMPLEMENTIVE"] = 3; + values[valuesById[4] = "DATIVE"] = 4; + values[valuesById[5] = "GENITIVE"] = 5; + values[valuesById[6] = "INSTRUMENTAL"] = 6; + values[valuesById[7] = "LOCATIVE"] = 7; + values[valuesById[8] = "NOMINATIVE"] = 8; + values[valuesById[9] = "OBLIQUE"] = 9; + values[valuesById[10] = "PARTITIVE"] = 10; + values[valuesById[11] = "PREPOSITIONAL"] = 11; + values[valuesById[12] = "REFLEXIVE_CASE"] = 12; + values[valuesById[13] = "RELATIVE_CASE"] = 13; + values[valuesById[14] = "VOCATIVE"] = 14; + return values; + })(); + + /** + * Form enum. + * @name google.cloud.language.v1.PartOfSpeech.Form + * @enum {string} + * @property {number} FORM_UNKNOWN=0 FORM_UNKNOWN value + * @property {number} ADNOMIAL=1 ADNOMIAL value + * @property {number} AUXILIARY=2 AUXILIARY value + * @property {number} COMPLEMENTIZER=3 COMPLEMENTIZER value + * @property {number} FINAL_ENDING=4 FINAL_ENDING value + * @property {number} GERUND=5 GERUND value + * @property {number} REALIS=6 REALIS value + * @property {number} IRREALIS=7 IRREALIS value + * @property {number} SHORT=8 SHORT value + * @property {number} LONG=9 LONG value + * @property {number} ORDER=10 ORDER value + * @property {number} SPECIFIC=11 SPECIFIC value + */ + PartOfSpeech.Form = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORM_UNKNOWN"] = 0; + values[valuesById[1] = "ADNOMIAL"] = 1; + values[valuesById[2] = "AUXILIARY"] = 2; + values[valuesById[3] = "COMPLEMENTIZER"] = 3; + values[valuesById[4] = "FINAL_ENDING"] = 4; + values[valuesById[5] = "GERUND"] = 5; + values[valuesById[6] = "REALIS"] = 6; + values[valuesById[7] = "IRREALIS"] = 7; + values[valuesById[8] = "SHORT"] = 8; + values[valuesById[9] = "LONG"] = 9; + values[valuesById[10] = "ORDER"] = 10; + values[valuesById[11] = "SPECIFIC"] = 11; + return values; + })(); + + /** + * Gender enum. + * @name google.cloud.language.v1.PartOfSpeech.Gender + * @enum {string} + * @property {number} GENDER_UNKNOWN=0 GENDER_UNKNOWN value + * @property {number} FEMININE=1 FEMININE value + * @property {number} MASCULINE=2 MASCULINE value + * @property {number} NEUTER=3 NEUTER value + */ + PartOfSpeech.Gender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GENDER_UNKNOWN"] = 0; + values[valuesById[1] = "FEMININE"] = 1; + values[valuesById[2] = "MASCULINE"] = 2; + values[valuesById[3] = "NEUTER"] = 3; + return values; + })(); + + /** + * Mood enum. + * @name google.cloud.language.v1.PartOfSpeech.Mood + * @enum {string} + * @property {number} MOOD_UNKNOWN=0 MOOD_UNKNOWN value + * @property {number} CONDITIONAL_MOOD=1 CONDITIONAL_MOOD value + * @property {number} IMPERATIVE=2 IMPERATIVE value + * @property {number} INDICATIVE=3 INDICATIVE value + * @property {number} INTERROGATIVE=4 INTERROGATIVE value + * @property {number} JUSSIVE=5 JUSSIVE value + * @property {number} SUBJUNCTIVE=6 SUBJUNCTIVE value + */ + PartOfSpeech.Mood = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MOOD_UNKNOWN"] = 0; + values[valuesById[1] = "CONDITIONAL_MOOD"] = 1; + values[valuesById[2] = "IMPERATIVE"] = 2; + values[valuesById[3] = "INDICATIVE"] = 3; + values[valuesById[4] = "INTERROGATIVE"] = 4; + values[valuesById[5] = "JUSSIVE"] = 5; + values[valuesById[6] = "SUBJUNCTIVE"] = 6; + return values; + })(); + + /** + * Number enum. + * @name google.cloud.language.v1.PartOfSpeech.Number + * @enum {string} + * @property {number} NUMBER_UNKNOWN=0 NUMBER_UNKNOWN value + * @property {number} SINGULAR=1 SINGULAR value + * @property {number} PLURAL=2 PLURAL value + * @property {number} DUAL=3 DUAL value + */ + PartOfSpeech.Number = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NUMBER_UNKNOWN"] = 0; + values[valuesById[1] = "SINGULAR"] = 1; + values[valuesById[2] = "PLURAL"] = 2; + values[valuesById[3] = "DUAL"] = 3; + return values; + })(); + + /** + * Person enum. + * @name google.cloud.language.v1.PartOfSpeech.Person + * @enum {string} + * @property {number} PERSON_UNKNOWN=0 PERSON_UNKNOWN value + * @property {number} FIRST=1 FIRST value + * @property {number} SECOND=2 SECOND value + * @property {number} THIRD=3 THIRD value + * @property {number} REFLEXIVE_PERSON=4 REFLEXIVE_PERSON value + */ + PartOfSpeech.Person = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PERSON_UNKNOWN"] = 0; + values[valuesById[1] = "FIRST"] = 1; + values[valuesById[2] = "SECOND"] = 2; + values[valuesById[3] = "THIRD"] = 3; + values[valuesById[4] = "REFLEXIVE_PERSON"] = 4; + return values; + })(); + + /** + * Proper enum. + * @name google.cloud.language.v1.PartOfSpeech.Proper + * @enum {string} + * @property {number} PROPER_UNKNOWN=0 PROPER_UNKNOWN value + * @property {number} PROPER=1 PROPER value + * @property {number} NOT_PROPER=2 NOT_PROPER value + */ + PartOfSpeech.Proper = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPER_UNKNOWN"] = 0; + values[valuesById[1] = "PROPER"] = 1; + values[valuesById[2] = "NOT_PROPER"] = 2; + return values; + })(); + + /** + * Reciprocity enum. + * @name google.cloud.language.v1.PartOfSpeech.Reciprocity + * @enum {string} + * @property {number} RECIPROCITY_UNKNOWN=0 RECIPROCITY_UNKNOWN value + * @property {number} RECIPROCAL=1 RECIPROCAL value + * @property {number} NON_RECIPROCAL=2 NON_RECIPROCAL value + */ + PartOfSpeech.Reciprocity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECIPROCITY_UNKNOWN"] = 0; + values[valuesById[1] = "RECIPROCAL"] = 1; + values[valuesById[2] = "NON_RECIPROCAL"] = 2; + return values; + })(); + + /** + * Tense enum. + * @name google.cloud.language.v1.PartOfSpeech.Tense + * @enum {string} + * @property {number} TENSE_UNKNOWN=0 TENSE_UNKNOWN value + * @property {number} CONDITIONAL_TENSE=1 CONDITIONAL_TENSE value + * @property {number} FUTURE=2 FUTURE value + * @property {number} PAST=3 PAST value + * @property {number} PRESENT=4 PRESENT value + * @property {number} IMPERFECT=5 IMPERFECT value + * @property {number} PLUPERFECT=6 PLUPERFECT value + */ + PartOfSpeech.Tense = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TENSE_UNKNOWN"] = 0; + values[valuesById[1] = "CONDITIONAL_TENSE"] = 1; + values[valuesById[2] = "FUTURE"] = 2; + values[valuesById[3] = "PAST"] = 3; + values[valuesById[4] = "PRESENT"] = 4; + values[valuesById[5] = "IMPERFECT"] = 5; + values[valuesById[6] = "PLUPERFECT"] = 6; + return values; + })(); + + /** + * Voice enum. + * @name google.cloud.language.v1.PartOfSpeech.Voice + * @enum {string} + * @property {number} VOICE_UNKNOWN=0 VOICE_UNKNOWN value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} CAUSATIVE=2 CAUSATIVE value + * @property {number} PASSIVE=3 PASSIVE value + */ + PartOfSpeech.Voice = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VOICE_UNKNOWN"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "CAUSATIVE"] = 2; + values[valuesById[3] = "PASSIVE"] = 3; + return values; + })(); + + return PartOfSpeech; + })(); + + v1.DependencyEdge = (function() { + + /** + * Properties of a DependencyEdge. + * @memberof google.cloud.language.v1 + * @interface IDependencyEdge + * @property {number|null} [headTokenIndex] DependencyEdge headTokenIndex + * @property {google.cloud.language.v1.DependencyEdge.Label|null} [label] DependencyEdge label + */ + + /** + * Constructs a new DependencyEdge. + * @memberof google.cloud.language.v1 + * @classdesc Represents a DependencyEdge. + * @implements IDependencyEdge + * @constructor + * @param {google.cloud.language.v1.IDependencyEdge=} [properties] Properties to set + */ + function DependencyEdge(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DependencyEdge headTokenIndex. + * @member {number} headTokenIndex + * @memberof google.cloud.language.v1.DependencyEdge + * @instance + */ + DependencyEdge.prototype.headTokenIndex = 0; + + /** + * DependencyEdge label. + * @member {google.cloud.language.v1.DependencyEdge.Label} label + * @memberof google.cloud.language.v1.DependencyEdge + * @instance + */ + DependencyEdge.prototype.label = 0; + + /** + * Creates a new DependencyEdge instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.DependencyEdge + * @static + * @param {google.cloud.language.v1.IDependencyEdge=} [properties] Properties to set + * @returns {google.cloud.language.v1.DependencyEdge} DependencyEdge instance + */ + DependencyEdge.create = function create(properties) { + return new DependencyEdge(properties); + }; + + /** + * Encodes the specified DependencyEdge message. Does not implicitly {@link google.cloud.language.v1.DependencyEdge.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.DependencyEdge + * @static + * @param {google.cloud.language.v1.IDependencyEdge} message DependencyEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyEdge.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headTokenIndex); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.label); + return writer; + }; + + /** + * Encodes the specified DependencyEdge message, length delimited. Does not implicitly {@link google.cloud.language.v1.DependencyEdge.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.DependencyEdge + * @static + * @param {google.cloud.language.v1.IDependencyEdge} message DependencyEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyEdge.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.DependencyEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.DependencyEdge} DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyEdge.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.DependencyEdge(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.headTokenIndex = reader.int32(); + break; + case 2: + message.label = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.DependencyEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.DependencyEdge} DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyEdge.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DependencyEdge message. + * @function verify + * @memberof google.cloud.language.v1.DependencyEdge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DependencyEdge.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + if (!$util.isInteger(message.headTokenIndex)) + return "headTokenIndex: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + break; + } + return null; + }; + + /** + * Creates a DependencyEdge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.DependencyEdge + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.DependencyEdge} DependencyEdge + */ + DependencyEdge.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.DependencyEdge) + return object; + var message = new $root.google.cloud.language.v1.DependencyEdge(); + if (object.headTokenIndex != null) + message.headTokenIndex = object.headTokenIndex | 0; + switch (object.label) { + case "UNKNOWN": + case 0: + message.label = 0; + break; + case "ABBREV": + case 1: + message.label = 1; + break; + case "ACOMP": + case 2: + message.label = 2; + break; + case "ADVCL": + case 3: + message.label = 3; + break; + case "ADVMOD": + case 4: + message.label = 4; + break; + case "AMOD": + case 5: + message.label = 5; + break; + case "APPOS": + case 6: + message.label = 6; + break; + case "ATTR": + case 7: + message.label = 7; + break; + case "AUX": + case 8: + message.label = 8; + break; + case "AUXPASS": + case 9: + message.label = 9; + break; + case "CC": + case 10: + message.label = 10; + break; + case "CCOMP": + case 11: + message.label = 11; + break; + case "CONJ": + case 12: + message.label = 12; + break; + case "CSUBJ": + case 13: + message.label = 13; + break; + case "CSUBJPASS": + case 14: + message.label = 14; + break; + case "DEP": + case 15: + message.label = 15; + break; + case "DET": + case 16: + message.label = 16; + break; + case "DISCOURSE": + case 17: + message.label = 17; + break; + case "DOBJ": + case 18: + message.label = 18; + break; + case "EXPL": + case 19: + message.label = 19; + break; + case "GOESWITH": + case 20: + message.label = 20; + break; + case "IOBJ": + case 21: + message.label = 21; + break; + case "MARK": + case 22: + message.label = 22; + break; + case "MWE": + case 23: + message.label = 23; + break; + case "MWV": + case 24: + message.label = 24; + break; + case "NEG": + case 25: + message.label = 25; + break; + case "NN": + case 26: + message.label = 26; + break; + case "NPADVMOD": + case 27: + message.label = 27; + break; + case "NSUBJ": + case 28: + message.label = 28; + break; + case "NSUBJPASS": + case 29: + message.label = 29; + break; + case "NUM": + case 30: + message.label = 30; + break; + case "NUMBER": + case 31: + message.label = 31; + break; + case "P": + case 32: + message.label = 32; + break; + case "PARATAXIS": + case 33: + message.label = 33; + break; + case "PARTMOD": + case 34: + message.label = 34; + break; + case "PCOMP": + case 35: + message.label = 35; + break; + case "POBJ": + case 36: + message.label = 36; + break; + case "POSS": + case 37: + message.label = 37; + break; + case "POSTNEG": + case 38: + message.label = 38; + break; + case "PRECOMP": + case 39: + message.label = 39; + break; + case "PRECONJ": + case 40: + message.label = 40; + break; + case "PREDET": + case 41: + message.label = 41; + break; + case "PREF": + case 42: + message.label = 42; + break; + case "PREP": + case 43: + message.label = 43; + break; + case "PRONL": + case 44: + message.label = 44; + break; + case "PRT": + case 45: + message.label = 45; + break; + case "PS": + case 46: + message.label = 46; + break; + case "QUANTMOD": + case 47: + message.label = 47; + break; + case "RCMOD": + case 48: + message.label = 48; + break; + case "RCMODREL": + case 49: + message.label = 49; + break; + case "RDROP": + case 50: + message.label = 50; + break; + case "REF": + case 51: + message.label = 51; + break; + case "REMNANT": + case 52: + message.label = 52; + break; + case "REPARANDUM": + case 53: + message.label = 53; + break; + case "ROOT": + case 54: + message.label = 54; + break; + case "SNUM": + case 55: + message.label = 55; + break; + case "SUFF": + case 56: + message.label = 56; + break; + case "TMOD": + case 57: + message.label = 57; + break; + case "TOPIC": + case 58: + message.label = 58; + break; + case "VMOD": + case 59: + message.label = 59; + break; + case "VOCATIVE": + case 60: + message.label = 60; + break; + case "XCOMP": + case 61: + message.label = 61; + break; + case "SUFFIX": + case 62: + message.label = 62; + break; + case "TITLE": + case 63: + message.label = 63; + break; + case "ADVPHMOD": + case 64: + message.label = 64; + break; + case "AUXCAUS": + case 65: + message.label = 65; + break; + case "AUXVV": + case 66: + message.label = 66; + break; + case "DTMOD": + case 67: + message.label = 67; + break; + case "FOREIGN": + case 68: + message.label = 68; + break; + case "KW": + case 69: + message.label = 69; + break; + case "LIST": + case 70: + message.label = 70; + break; + case "NOMC": + case 71: + message.label = 71; + break; + case "NOMCSUBJ": + case 72: + message.label = 72; + break; + case "NOMCSUBJPASS": + case 73: + message.label = 73; + break; + case "NUMC": + case 74: + message.label = 74; + break; + case "COP": + case 75: + message.label = 75; + break; + case "DISLOCATED": + case 76: + message.label = 76; + break; + case "ASP": + case 77: + message.label = 77; + break; + case "GMOD": + case 78: + message.label = 78; + break; + case "GOBJ": + case 79: + message.label = 79; + break; + case "INFMOD": + case 80: + message.label = 80; + break; + case "MES": + case 81: + message.label = 81; + break; + case "NCOMP": + case 82: + message.label = 82; + break; + } + return message; + }; + + /** + * Creates a plain object from a DependencyEdge message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.DependencyEdge + * @static + * @param {google.cloud.language.v1.DependencyEdge} message DependencyEdge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DependencyEdge.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headTokenIndex = 0; + object.label = options.enums === String ? "UNKNOWN" : 0; + } + if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + object.headTokenIndex = message.headTokenIndex; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.cloud.language.v1.DependencyEdge.Label[message.label] : message.label; + return object; + }; + + /** + * Converts this DependencyEdge to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.DependencyEdge + * @instance + * @returns {Object.} JSON object + */ + DependencyEdge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Label enum. + * @name google.cloud.language.v1.DependencyEdge.Label + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ABBREV=1 ABBREV value + * @property {number} ACOMP=2 ACOMP value + * @property {number} ADVCL=3 ADVCL value + * @property {number} ADVMOD=4 ADVMOD value + * @property {number} AMOD=5 AMOD value + * @property {number} APPOS=6 APPOS value + * @property {number} ATTR=7 ATTR value + * @property {number} AUX=8 AUX value + * @property {number} AUXPASS=9 AUXPASS value + * @property {number} CC=10 CC value + * @property {number} CCOMP=11 CCOMP value + * @property {number} CONJ=12 CONJ value + * @property {number} CSUBJ=13 CSUBJ value + * @property {number} CSUBJPASS=14 CSUBJPASS value + * @property {number} DEP=15 DEP value + * @property {number} DET=16 DET value + * @property {number} DISCOURSE=17 DISCOURSE value + * @property {number} DOBJ=18 DOBJ value + * @property {number} EXPL=19 EXPL value + * @property {number} GOESWITH=20 GOESWITH value + * @property {number} IOBJ=21 IOBJ value + * @property {number} MARK=22 MARK value + * @property {number} MWE=23 MWE value + * @property {number} MWV=24 MWV value + * @property {number} NEG=25 NEG value + * @property {number} NN=26 NN value + * @property {number} NPADVMOD=27 NPADVMOD value + * @property {number} NSUBJ=28 NSUBJ value + * @property {number} NSUBJPASS=29 NSUBJPASS value + * @property {number} NUM=30 NUM value + * @property {number} NUMBER=31 NUMBER value + * @property {number} P=32 P value + * @property {number} PARATAXIS=33 PARATAXIS value + * @property {number} PARTMOD=34 PARTMOD value + * @property {number} PCOMP=35 PCOMP value + * @property {number} POBJ=36 POBJ value + * @property {number} POSS=37 POSS value + * @property {number} POSTNEG=38 POSTNEG value + * @property {number} PRECOMP=39 PRECOMP value + * @property {number} PRECONJ=40 PRECONJ value + * @property {number} PREDET=41 PREDET value + * @property {number} PREF=42 PREF value + * @property {number} PREP=43 PREP value + * @property {number} PRONL=44 PRONL value + * @property {number} PRT=45 PRT value + * @property {number} PS=46 PS value + * @property {number} QUANTMOD=47 QUANTMOD value + * @property {number} RCMOD=48 RCMOD value + * @property {number} RCMODREL=49 RCMODREL value + * @property {number} RDROP=50 RDROP value + * @property {number} REF=51 REF value + * @property {number} REMNANT=52 REMNANT value + * @property {number} REPARANDUM=53 REPARANDUM value + * @property {number} ROOT=54 ROOT value + * @property {number} SNUM=55 SNUM value + * @property {number} SUFF=56 SUFF value + * @property {number} TMOD=57 TMOD value + * @property {number} TOPIC=58 TOPIC value + * @property {number} VMOD=59 VMOD value + * @property {number} VOCATIVE=60 VOCATIVE value + * @property {number} XCOMP=61 XCOMP value + * @property {number} SUFFIX=62 SUFFIX value + * @property {number} TITLE=63 TITLE value + * @property {number} ADVPHMOD=64 ADVPHMOD value + * @property {number} AUXCAUS=65 AUXCAUS value + * @property {number} AUXVV=66 AUXVV value + * @property {number} DTMOD=67 DTMOD value + * @property {number} FOREIGN=68 FOREIGN value + * @property {number} KW=69 KW value + * @property {number} LIST=70 LIST value + * @property {number} NOMC=71 NOMC value + * @property {number} NOMCSUBJ=72 NOMCSUBJ value + * @property {number} NOMCSUBJPASS=73 NOMCSUBJPASS value + * @property {number} NUMC=74 NUMC value + * @property {number} COP=75 COP value + * @property {number} DISLOCATED=76 DISLOCATED value + * @property {number} ASP=77 ASP value + * @property {number} GMOD=78 GMOD value + * @property {number} GOBJ=79 GOBJ value + * @property {number} INFMOD=80 INFMOD value + * @property {number} MES=81 MES value + * @property {number} NCOMP=82 NCOMP value + */ + DependencyEdge.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ABBREV"] = 1; + values[valuesById[2] = "ACOMP"] = 2; + values[valuesById[3] = "ADVCL"] = 3; + values[valuesById[4] = "ADVMOD"] = 4; + values[valuesById[5] = "AMOD"] = 5; + values[valuesById[6] = "APPOS"] = 6; + values[valuesById[7] = "ATTR"] = 7; + values[valuesById[8] = "AUX"] = 8; + values[valuesById[9] = "AUXPASS"] = 9; + values[valuesById[10] = "CC"] = 10; + values[valuesById[11] = "CCOMP"] = 11; + values[valuesById[12] = "CONJ"] = 12; + values[valuesById[13] = "CSUBJ"] = 13; + values[valuesById[14] = "CSUBJPASS"] = 14; + values[valuesById[15] = "DEP"] = 15; + values[valuesById[16] = "DET"] = 16; + values[valuesById[17] = "DISCOURSE"] = 17; + values[valuesById[18] = "DOBJ"] = 18; + values[valuesById[19] = "EXPL"] = 19; + values[valuesById[20] = "GOESWITH"] = 20; + values[valuesById[21] = "IOBJ"] = 21; + values[valuesById[22] = "MARK"] = 22; + values[valuesById[23] = "MWE"] = 23; + values[valuesById[24] = "MWV"] = 24; + values[valuesById[25] = "NEG"] = 25; + values[valuesById[26] = "NN"] = 26; + values[valuesById[27] = "NPADVMOD"] = 27; + values[valuesById[28] = "NSUBJ"] = 28; + values[valuesById[29] = "NSUBJPASS"] = 29; + values[valuesById[30] = "NUM"] = 30; + values[valuesById[31] = "NUMBER"] = 31; + values[valuesById[32] = "P"] = 32; + values[valuesById[33] = "PARATAXIS"] = 33; + values[valuesById[34] = "PARTMOD"] = 34; + values[valuesById[35] = "PCOMP"] = 35; + values[valuesById[36] = "POBJ"] = 36; + values[valuesById[37] = "POSS"] = 37; + values[valuesById[38] = "POSTNEG"] = 38; + values[valuesById[39] = "PRECOMP"] = 39; + values[valuesById[40] = "PRECONJ"] = 40; + values[valuesById[41] = "PREDET"] = 41; + values[valuesById[42] = "PREF"] = 42; + values[valuesById[43] = "PREP"] = 43; + values[valuesById[44] = "PRONL"] = 44; + values[valuesById[45] = "PRT"] = 45; + values[valuesById[46] = "PS"] = 46; + values[valuesById[47] = "QUANTMOD"] = 47; + values[valuesById[48] = "RCMOD"] = 48; + values[valuesById[49] = "RCMODREL"] = 49; + values[valuesById[50] = "RDROP"] = 50; + values[valuesById[51] = "REF"] = 51; + values[valuesById[52] = "REMNANT"] = 52; + values[valuesById[53] = "REPARANDUM"] = 53; + values[valuesById[54] = "ROOT"] = 54; + values[valuesById[55] = "SNUM"] = 55; + values[valuesById[56] = "SUFF"] = 56; + values[valuesById[57] = "TMOD"] = 57; + values[valuesById[58] = "TOPIC"] = 58; + values[valuesById[59] = "VMOD"] = 59; + values[valuesById[60] = "VOCATIVE"] = 60; + values[valuesById[61] = "XCOMP"] = 61; + values[valuesById[62] = "SUFFIX"] = 62; + values[valuesById[63] = "TITLE"] = 63; + values[valuesById[64] = "ADVPHMOD"] = 64; + values[valuesById[65] = "AUXCAUS"] = 65; + values[valuesById[66] = "AUXVV"] = 66; + values[valuesById[67] = "DTMOD"] = 67; + values[valuesById[68] = "FOREIGN"] = 68; + values[valuesById[69] = "KW"] = 69; + values[valuesById[70] = "LIST"] = 70; + values[valuesById[71] = "NOMC"] = 71; + values[valuesById[72] = "NOMCSUBJ"] = 72; + values[valuesById[73] = "NOMCSUBJPASS"] = 73; + values[valuesById[74] = "NUMC"] = 74; + values[valuesById[75] = "COP"] = 75; + values[valuesById[76] = "DISLOCATED"] = 76; + values[valuesById[77] = "ASP"] = 77; + values[valuesById[78] = "GMOD"] = 78; + values[valuesById[79] = "GOBJ"] = 79; + values[valuesById[80] = "INFMOD"] = 80; + values[valuesById[81] = "MES"] = 81; + values[valuesById[82] = "NCOMP"] = 82; + return values; + })(); + + return DependencyEdge; + })(); + + v1.EntityMention = (function() { + + /** + * Properties of an EntityMention. + * @memberof google.cloud.language.v1 + * @interface IEntityMention + * @property {google.cloud.language.v1.ITextSpan|null} [text] EntityMention text + * @property {google.cloud.language.v1.EntityMention.Type|null} [type] EntityMention type + * @property {google.cloud.language.v1.ISentiment|null} [sentiment] EntityMention sentiment + */ + + /** + * Constructs a new EntityMention. + * @memberof google.cloud.language.v1 + * @classdesc Represents an EntityMention. + * @implements IEntityMention + * @constructor + * @param {google.cloud.language.v1.IEntityMention=} [properties] Properties to set + */ + function EntityMention(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityMention text. + * @member {google.cloud.language.v1.ITextSpan|null|undefined} text + * @memberof google.cloud.language.v1.EntityMention + * @instance + */ + EntityMention.prototype.text = null; + + /** + * EntityMention type. + * @member {google.cloud.language.v1.EntityMention.Type} type + * @memberof google.cloud.language.v1.EntityMention + * @instance + */ + EntityMention.prototype.type = 0; + + /** + * EntityMention sentiment. + * @member {google.cloud.language.v1.ISentiment|null|undefined} sentiment + * @memberof google.cloud.language.v1.EntityMention + * @instance + */ + EntityMention.prototype.sentiment = null; + + /** + * Creates a new EntityMention instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.EntityMention + * @static + * @param {google.cloud.language.v1.IEntityMention=} [properties] Properties to set + * @returns {google.cloud.language.v1.EntityMention} EntityMention instance + */ + EntityMention.create = function create(properties) { + return new EntityMention(properties); + }; + + /** + * Encodes the specified EntityMention message. Does not implicitly {@link google.cloud.language.v1.EntityMention.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.EntityMention + * @static + * @param {google.cloud.language.v1.IEntityMention} message EntityMention message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMention.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.hasOwnProperty("text")) + $root.google.cloud.language.v1.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + $root.google.cloud.language.v1.Sentiment.encode(message.sentiment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EntityMention message, length delimited. Does not implicitly {@link google.cloud.language.v1.EntityMention.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.EntityMention + * @static + * @param {google.cloud.language.v1.IEntityMention} message EntityMention message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMention.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityMention message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.EntityMention + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.EntityMention} EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMention.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.EntityMention(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = $root.google.cloud.language.v1.TextSpan.decode(reader, reader.uint32()); + break; + case 2: + message.type = reader.int32(); + break; + case 3: + message.sentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityMention message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.EntityMention + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.EntityMention} EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMention.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityMention message. + * @function verify + * @memberof google.cloud.language.v1.EntityMention + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityMention.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.language.v1.TextSpan.verify(message.text); + if (error) + return "text." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.language.v1.Sentiment.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates an EntityMention message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.EntityMention + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.EntityMention} EntityMention + */ + EntityMention.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.EntityMention) + return object; + var message = new $root.google.cloud.language.v1.EntityMention(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.language.v1.EntityMention.text: object expected"); + message.text = $root.google.cloud.language.v1.TextSpan.fromObject(object.text); + } + switch (object.type) { + case "TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "PROPER": + case 1: + message.type = 1; + break; + case "COMMON": + case 2: + message.type = 2; + break; + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.language.v1.EntityMention.sentiment: object expected"); + message.sentiment = $root.google.cloud.language.v1.Sentiment.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from an EntityMention message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.EntityMention + * @static + * @param {google.cloud.language.v1.EntityMention} message EntityMention + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityMention.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = null; + object.type = options.enums === String ? "TYPE_UNKNOWN" : 0; + object.sentiment = null; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.language.v1.TextSpan.toObject(message.text, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.language.v1.EntityMention.Type[message.type] : message.type; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.language.v1.Sentiment.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this EntityMention to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.EntityMention + * @instance + * @returns {Object.} JSON object + */ + EntityMention.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.language.v1.EntityMention.Type + * @enum {string} + * @property {number} TYPE_UNKNOWN=0 TYPE_UNKNOWN value + * @property {number} PROPER=1 PROPER value + * @property {number} COMMON=2 COMMON value + */ + EntityMention.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "PROPER"] = 1; + values[valuesById[2] = "COMMON"] = 2; + return values; + })(); + + return EntityMention; + })(); + + v1.TextSpan = (function() { + + /** + * Properties of a TextSpan. + * @memberof google.cloud.language.v1 + * @interface ITextSpan + * @property {string|null} [content] TextSpan content + * @property {number|null} [beginOffset] TextSpan beginOffset + */ + + /** + * Constructs a new TextSpan. + * @memberof google.cloud.language.v1 + * @classdesc Represents a TextSpan. + * @implements ITextSpan + * @constructor + * @param {google.cloud.language.v1.ITextSpan=} [properties] Properties to set + */ + function TextSpan(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextSpan content. + * @member {string} content + * @memberof google.cloud.language.v1.TextSpan + * @instance + */ + TextSpan.prototype.content = ""; + + /** + * TextSpan beginOffset. + * @member {number} beginOffset + * @memberof google.cloud.language.v1.TextSpan + * @instance + */ + TextSpan.prototype.beginOffset = 0; + + /** + * Creates a new TextSpan instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.TextSpan + * @static + * @param {google.cloud.language.v1.ITextSpan=} [properties] Properties to set + * @returns {google.cloud.language.v1.TextSpan} TextSpan instance + */ + TextSpan.create = function create(properties) { + return new TextSpan(properties); + }; + + /** + * Encodes the specified TextSpan message. Does not implicitly {@link google.cloud.language.v1.TextSpan.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.TextSpan + * @static + * @param {google.cloud.language.v1.ITextSpan} message TextSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSpan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.beginOffset); + return writer; + }; + + /** + * Encodes the specified TextSpan message, length delimited. Does not implicitly {@link google.cloud.language.v1.TextSpan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.TextSpan + * @static + * @param {google.cloud.language.v1.ITextSpan} message TextSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSpan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextSpan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.TextSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.TextSpan} TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSpan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.TextSpan(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = reader.string(); + break; + case 2: + message.beginOffset = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextSpan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.TextSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.TextSpan} TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSpan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextSpan message. + * @function verify + * @memberof google.cloud.language.v1.TextSpan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextSpan.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + if (!$util.isInteger(message.beginOffset)) + return "beginOffset: integer expected"; + return null; + }; + + /** + * Creates a TextSpan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.TextSpan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.TextSpan} TextSpan + */ + TextSpan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.TextSpan) + return object; + var message = new $root.google.cloud.language.v1.TextSpan(); + if (object.content != null) + message.content = String(object.content); + if (object.beginOffset != null) + message.beginOffset = object.beginOffset | 0; + return message; + }; + + /** + * Creates a plain object from a TextSpan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.TextSpan + * @static + * @param {google.cloud.language.v1.TextSpan} message TextSpan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextSpan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.beginOffset = 0; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + object.beginOffset = message.beginOffset; + return object; + }; + + /** + * Converts this TextSpan to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.TextSpan + * @instance + * @returns {Object.} JSON object + */ + TextSpan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextSpan; + })(); + + v1.ClassificationCategory = (function() { + + /** + * Properties of a ClassificationCategory. + * @memberof google.cloud.language.v1 + * @interface IClassificationCategory + * @property {string|null} [name] ClassificationCategory name + * @property {number|null} [confidence] ClassificationCategory confidence + */ + + /** + * Constructs a new ClassificationCategory. + * @memberof google.cloud.language.v1 + * @classdesc Represents a ClassificationCategory. + * @implements IClassificationCategory + * @constructor + * @param {google.cloud.language.v1.IClassificationCategory=} [properties] Properties to set + */ + function ClassificationCategory(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClassificationCategory name. + * @member {string} name + * @memberof google.cloud.language.v1.ClassificationCategory + * @instance + */ + ClassificationCategory.prototype.name = ""; + + /** + * ClassificationCategory confidence. + * @member {number} confidence + * @memberof google.cloud.language.v1.ClassificationCategory + * @instance + */ + ClassificationCategory.prototype.confidence = 0; + + /** + * Creates a new ClassificationCategory instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.ClassificationCategory + * @static + * @param {google.cloud.language.v1.IClassificationCategory=} [properties] Properties to set + * @returns {google.cloud.language.v1.ClassificationCategory} ClassificationCategory instance + */ + ClassificationCategory.create = function create(properties) { + return new ClassificationCategory(properties); + }; + + /** + * Encodes the specified ClassificationCategory message. Does not implicitly {@link google.cloud.language.v1.ClassificationCategory.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.ClassificationCategory + * @static + * @param {google.cloud.language.v1.IClassificationCategory} message ClassificationCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassificationCategory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.confidence != null && message.hasOwnProperty("confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified ClassificationCategory message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassificationCategory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.ClassificationCategory + * @static + * @param {google.cloud.language.v1.IClassificationCategory} message ClassificationCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassificationCategory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClassificationCategory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.ClassificationCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.ClassificationCategory} ClassificationCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassificationCategory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassificationCategory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.confidence = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClassificationCategory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.ClassificationCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.ClassificationCategory} ClassificationCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassificationCategory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClassificationCategory message. + * @function verify + * @memberof google.cloud.language.v1.ClassificationCategory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClassificationCategory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + return null; + }; + + /** + * Creates a ClassificationCategory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.ClassificationCategory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.ClassificationCategory} ClassificationCategory + */ + ClassificationCategory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.ClassificationCategory) + return object; + var message = new $root.google.cloud.language.v1.ClassificationCategory(); + if (object.name != null) + message.name = String(object.name); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a ClassificationCategory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.ClassificationCategory + * @static + * @param {google.cloud.language.v1.ClassificationCategory} message ClassificationCategory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClassificationCategory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.confidence = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + return object; + }; + + /** + * Converts this ClassificationCategory to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.ClassificationCategory + * @instance + * @returns {Object.} JSON object + */ + ClassificationCategory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClassificationCategory; + })(); + + v1.AnalyzeSentimentRequest = (function() { + + /** + * Properties of an AnalyzeSentimentRequest. + * @memberof google.cloud.language.v1 + * @interface IAnalyzeSentimentRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeSentimentRequest document + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeSentimentRequest encodingType + */ + + /** + * Constructs a new AnalyzeSentimentRequest. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnalyzeSentimentRequest. + * @implements IAnalyzeSentimentRequest + * @constructor + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest=} [properties] Properties to set + */ + function AnalyzeSentimentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeSentimentRequest document. + * @member {google.cloud.language.v1.IDocument|null|undefined} document + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @instance + */ + AnalyzeSentimentRequest.prototype.document = null; + + /** + * AnalyzeSentimentRequest encodingType. + * @member {google.cloud.language.v1.EncodingType} encodingType + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @instance + */ + AnalyzeSentimentRequest.prototype.encodingType = 0; + + /** + * Creates a new AnalyzeSentimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest instance + */ + AnalyzeSentimentRequest.create = function create(properties) { + return new AnalyzeSentimentRequest(properties); + }; + + /** + * Encodes the specified AnalyzeSentimentRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest} message AnalyzeSentimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSentimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnalyzeSentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest} message AnalyzeSentimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSentimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSentimentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSentimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + case 2: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSentimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeSentimentRequest message. + * @function verify + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeSentimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnalyzeSentimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest + */ + AnalyzeSentimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeSentimentRequest) + return object; + var message = new $root.google.cloud.language.v1.AnalyzeSentimentRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSentimentRequest.document: object expected"); + message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeSentimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @static + * @param {google.cloud.language.v1.AnalyzeSentimentRequest} message AnalyzeSentimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeSentimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnalyzeSentimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @instance + * @returns {Object.} JSON object + */ + AnalyzeSentimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeSentimentRequest; + })(); + + v1.AnalyzeSentimentResponse = (function() { + + /** + * Properties of an AnalyzeSentimentResponse. + * @memberof google.cloud.language.v1 + * @interface IAnalyzeSentimentResponse + * @property {google.cloud.language.v1.ISentiment|null} [documentSentiment] AnalyzeSentimentResponse documentSentiment + * @property {string|null} [language] AnalyzeSentimentResponse language + * @property {Array.|null} [sentences] AnalyzeSentimentResponse sentences + */ + + /** + * Constructs a new AnalyzeSentimentResponse. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnalyzeSentimentResponse. + * @implements IAnalyzeSentimentResponse + * @constructor + * @param {google.cloud.language.v1.IAnalyzeSentimentResponse=} [properties] Properties to set + */ + function AnalyzeSentimentResponse(properties) { + this.sentences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeSentimentResponse documentSentiment. + * @member {google.cloud.language.v1.ISentiment|null|undefined} documentSentiment + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @instance + */ + AnalyzeSentimentResponse.prototype.documentSentiment = null; + + /** + * AnalyzeSentimentResponse language. + * @member {string} language + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @instance + */ + AnalyzeSentimentResponse.prototype.language = ""; + + /** + * AnalyzeSentimentResponse sentences. + * @member {Array.} sentences + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @instance + */ + AnalyzeSentimentResponse.prototype.sentences = $util.emptyArray; + + /** + * Creates a new AnalyzeSentimentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeSentimentResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse instance + */ + AnalyzeSentimentResponse.create = function create(properties) { + return new AnalyzeSentimentResponse(properties); + }; + + /** + * Encodes the specified AnalyzeSentimentResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeSentimentResponse} message AnalyzeSentimentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSentimentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + $root.google.cloud.language.v1.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); + if (message.sentences != null && message.sentences.length) + for (var i = 0; i < message.sentences.length; ++i) + $root.google.cloud.language.v1.Sentence.encode(message.sentences[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnalyzeSentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeSentimentResponse} message AnalyzeSentimentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSentimentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSentimentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSentimentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + case 2: + message.language = reader.string(); + break; + case 3: + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSentimentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeSentimentResponse message. + * @function verify + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeSentimentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) { + var error = $root.google.cloud.language.v1.Sentiment.verify(message.documentSentiment); + if (error) + return "documentSentiment." + error; + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + if (message.sentences != null && message.hasOwnProperty("sentences")) { + if (!Array.isArray(message.sentences)) + return "sentences: array expected"; + for (var i = 0; i < message.sentences.length; ++i) { + var error = $root.google.cloud.language.v1.Sentence.verify(message.sentences[i]); + if (error) + return "sentences." + error; + } + } + return null; + }; + + /** + * Creates an AnalyzeSentimentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse + */ + AnalyzeSentimentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeSentimentResponse) + return object; + var message = new $root.google.cloud.language.v1.AnalyzeSentimentResponse(); + if (object.documentSentiment != null) { + if (typeof object.documentSentiment !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSentimentResponse.documentSentiment: object expected"); + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.fromObject(object.documentSentiment); + } + if (object.language != null) + message.language = String(object.language); + if (object.sentences) { + if (!Array.isArray(object.sentences)) + throw TypeError(".google.cloud.language.v1.AnalyzeSentimentResponse.sentences: array expected"); + message.sentences = []; + for (var i = 0; i < object.sentences.length; ++i) { + if (typeof object.sentences[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSentimentResponse.sentences: object expected"); + message.sentences[i] = $root.google.cloud.language.v1.Sentence.fromObject(object.sentences[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeSentimentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @static + * @param {google.cloud.language.v1.AnalyzeSentimentResponse} message AnalyzeSentimentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeSentimentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sentences = []; + if (options.defaults) { + object.documentSentiment = null; + object.language = ""; + } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + object.documentSentiment = $root.google.cloud.language.v1.Sentiment.toObject(message.documentSentiment, options); + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + if (message.sentences && message.sentences.length) { + object.sentences = []; + for (var j = 0; j < message.sentences.length; ++j) + object.sentences[j] = $root.google.cloud.language.v1.Sentence.toObject(message.sentences[j], options); + } + return object; + }; + + /** + * Converts this AnalyzeSentimentResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @instance + * @returns {Object.} JSON object + */ + AnalyzeSentimentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeSentimentResponse; + })(); + + v1.AnalyzeEntitySentimentRequest = (function() { + + /** + * Properties of an AnalyzeEntitySentimentRequest. + * @memberof google.cloud.language.v1 + * @interface IAnalyzeEntitySentimentRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeEntitySentimentRequest document + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeEntitySentimentRequest encodingType + */ + + /** + * Constructs a new AnalyzeEntitySentimentRequest. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnalyzeEntitySentimentRequest. + * @implements IAnalyzeEntitySentimentRequest + * @constructor + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest=} [properties] Properties to set + */ + function AnalyzeEntitySentimentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeEntitySentimentRequest document. + * @member {google.cloud.language.v1.IDocument|null|undefined} document + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @instance + */ + AnalyzeEntitySentimentRequest.prototype.document = null; + + /** + * AnalyzeEntitySentimentRequest encodingType. + * @member {google.cloud.language.v1.EncodingType} encodingType + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @instance + */ + AnalyzeEntitySentimentRequest.prototype.encodingType = 0; + + /** + * Creates a new AnalyzeEntitySentimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest instance + */ + AnalyzeEntitySentimentRequest.create = function create(properties) { + return new AnalyzeEntitySentimentRequest(properties); + }; + + /** + * Encodes the specified AnalyzeEntitySentimentRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitySentimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnalyzeEntitySentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitySentimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitySentimentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + case 2: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitySentimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeEntitySentimentRequest message. + * @function verify + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeEntitySentimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnalyzeEntitySentimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest + */ + AnalyzeEntitySentimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest) + return object; + var message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeEntitySentimentRequest.document: object expected"); + message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeEntitySentimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @static + * @param {google.cloud.language.v1.AnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeEntitySentimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnalyzeEntitySentimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @instance + * @returns {Object.} JSON object + */ + AnalyzeEntitySentimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeEntitySentimentRequest; + })(); + + v1.AnalyzeEntitySentimentResponse = (function() { + + /** + * Properties of an AnalyzeEntitySentimentResponse. + * @memberof google.cloud.language.v1 + * @interface IAnalyzeEntitySentimentResponse + * @property {Array.|null} [entities] AnalyzeEntitySentimentResponse entities + * @property {string|null} [language] AnalyzeEntitySentimentResponse language + */ + + /** + * Constructs a new AnalyzeEntitySentimentResponse. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnalyzeEntitySentimentResponse. + * @implements IAnalyzeEntitySentimentResponse + * @constructor + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse=} [properties] Properties to set + */ + function AnalyzeEntitySentimentResponse(properties) { + this.entities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeEntitySentimentResponse entities. + * @member {Array.} entities + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @instance + */ + AnalyzeEntitySentimentResponse.prototype.entities = $util.emptyArray; + + /** + * AnalyzeEntitySentimentResponse language. + * @member {string} language + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @instance + */ + AnalyzeEntitySentimentResponse.prototype.language = ""; + + /** + * Creates a new AnalyzeEntitySentimentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse instance + */ + AnalyzeEntitySentimentResponse.create = function create(properties) { + return new AnalyzeEntitySentimentResponse(properties); + }; + + /** + * Encodes the specified AnalyzeEntitySentimentResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitySentimentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); + return writer; + }; + + /** + * Encodes the specified AnalyzeEntitySentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitySentimentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitySentimentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); + break; + case 2: + message.language = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitySentimentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeEntitySentimentResponse message. + * @function verify + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeEntitySentimentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.language.v1.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + return null; + }; + + /** + * Creates an AnalyzeEntitySentimentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse + */ + AnalyzeEntitySentimentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse) + return object; + var message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.language.v1.AnalyzeEntitySentimentResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeEntitySentimentResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.language.v1.Entity.fromObject(object.entities[i]); + } + } + if (object.language != null) + message.language = String(object.language); + return message; + }; + + /** + * Creates a plain object from an AnalyzeEntitySentimentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @static + * @param {google.cloud.language.v1.AnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeEntitySentimentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) + object.language = ""; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.language.v1.Entity.toObject(message.entities[j], options); + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + return object; + }; + + /** + * Converts this AnalyzeEntitySentimentResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @instance + * @returns {Object.} JSON object + */ + AnalyzeEntitySentimentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeEntitySentimentResponse; + })(); + + v1.AnalyzeEntitiesRequest = (function() { + + /** + * Properties of an AnalyzeEntitiesRequest. + * @memberof google.cloud.language.v1 + * @interface IAnalyzeEntitiesRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeEntitiesRequest document + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeEntitiesRequest encodingType + */ + + /** + * Constructs a new AnalyzeEntitiesRequest. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnalyzeEntitiesRequest. + * @implements IAnalyzeEntitiesRequest + * @constructor + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest=} [properties] Properties to set + */ + function AnalyzeEntitiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeEntitiesRequest document. + * @member {google.cloud.language.v1.IDocument|null|undefined} document + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @instance + */ + AnalyzeEntitiesRequest.prototype.document = null; + + /** + * AnalyzeEntitiesRequest encodingType. + * @member {google.cloud.language.v1.EncodingType} encodingType + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @instance + */ + AnalyzeEntitiesRequest.prototype.encodingType = 0; + + /** + * Creates a new AnalyzeEntitiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest instance + */ + AnalyzeEntitiesRequest.create = function create(properties) { + return new AnalyzeEntitiesRequest(properties); + }; + + /** + * Encodes the specified AnalyzeEntitiesRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest} message AnalyzeEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnalyzeEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest} message AnalyzeEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + case 2: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeEntitiesRequest message. + * @function verify + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeEntitiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnalyzeEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest + */ + AnalyzeEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitiesRequest) + return object; + var message = new $root.google.cloud.language.v1.AnalyzeEntitiesRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeEntitiesRequest.document: object expected"); + message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeEntitiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @static + * @param {google.cloud.language.v1.AnalyzeEntitiesRequest} message AnalyzeEntitiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeEntitiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnalyzeEntitiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @instance + * @returns {Object.} JSON object + */ + AnalyzeEntitiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeEntitiesRequest; + })(); + + v1.AnalyzeEntitiesResponse = (function() { + + /** + * Properties of an AnalyzeEntitiesResponse. + * @memberof google.cloud.language.v1 + * @interface IAnalyzeEntitiesResponse + * @property {Array.|null} [entities] AnalyzeEntitiesResponse entities + * @property {string|null} [language] AnalyzeEntitiesResponse language + */ + + /** + * Constructs a new AnalyzeEntitiesResponse. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnalyzeEntitiesResponse. + * @implements IAnalyzeEntitiesResponse + * @constructor + * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse=} [properties] Properties to set + */ + function AnalyzeEntitiesResponse(properties) { + this.entities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeEntitiesResponse entities. + * @member {Array.} entities + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @instance + */ + AnalyzeEntitiesResponse.prototype.entities = $util.emptyArray; + + /** + * AnalyzeEntitiesResponse language. + * @member {string} language + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @instance + */ + AnalyzeEntitiesResponse.prototype.language = ""; + + /** + * Creates a new AnalyzeEntitiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse instance + */ + AnalyzeEntitiesResponse.create = function create(properties) { + return new AnalyzeEntitiesResponse(properties); + }; + + /** + * Encodes the specified AnalyzeEntitiesResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse} message AnalyzeEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); + return writer; + }; + + /** + * Encodes the specified AnalyzeEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse} message AnalyzeEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); + break; + case 2: + message.language = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeEntitiesResponse message. + * @function verify + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeEntitiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.language.v1.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + return null; + }; + + /** + * Creates an AnalyzeEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse + */ + AnalyzeEntitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitiesResponse) + return object; + var message = new $root.google.cloud.language.v1.AnalyzeEntitiesResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.language.v1.AnalyzeEntitiesResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeEntitiesResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.language.v1.Entity.fromObject(object.entities[i]); + } + } + if (object.language != null) + message.language = String(object.language); + return message; + }; + + /** + * Creates a plain object from an AnalyzeEntitiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @static + * @param {google.cloud.language.v1.AnalyzeEntitiesResponse} message AnalyzeEntitiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeEntitiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) + object.language = ""; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.language.v1.Entity.toObject(message.entities[j], options); + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + return object; + }; + + /** + * Converts this AnalyzeEntitiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @instance + * @returns {Object.} JSON object + */ + AnalyzeEntitiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeEntitiesResponse; + })(); + + v1.AnalyzeSyntaxRequest = (function() { + + /** + * Properties of an AnalyzeSyntaxRequest. + * @memberof google.cloud.language.v1 + * @interface IAnalyzeSyntaxRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeSyntaxRequest document + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeSyntaxRequest encodingType + */ + + /** + * Constructs a new AnalyzeSyntaxRequest. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnalyzeSyntaxRequest. + * @implements IAnalyzeSyntaxRequest + * @constructor + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest=} [properties] Properties to set + */ + function AnalyzeSyntaxRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeSyntaxRequest document. + * @member {google.cloud.language.v1.IDocument|null|undefined} document + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @instance + */ + AnalyzeSyntaxRequest.prototype.document = null; + + /** + * AnalyzeSyntaxRequest encodingType. + * @member {google.cloud.language.v1.EncodingType} encodingType + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @instance + */ + AnalyzeSyntaxRequest.prototype.encodingType = 0; + + /** + * Creates a new AnalyzeSyntaxRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest instance + */ + AnalyzeSyntaxRequest.create = function create(properties) { + return new AnalyzeSyntaxRequest(properties); + }; + + /** + * Encodes the specified AnalyzeSyntaxRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest} message AnalyzeSyntaxRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSyntaxRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnalyzeSyntaxRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @static + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest} message AnalyzeSyntaxRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSyntaxRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSyntaxRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSyntaxRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + case 2: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSyntaxRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeSyntaxRequest message. + * @function verify + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeSyntaxRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnalyzeSyntaxRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest + */ + AnalyzeSyntaxRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeSyntaxRequest) + return object; + var message = new $root.google.cloud.language.v1.AnalyzeSyntaxRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxRequest.document: object expected"); + message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeSyntaxRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @static + * @param {google.cloud.language.v1.AnalyzeSyntaxRequest} message AnalyzeSyntaxRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeSyntaxRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnalyzeSyntaxRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @instance + * @returns {Object.} JSON object + */ + AnalyzeSyntaxRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeSyntaxRequest; + })(); + + v1.AnalyzeSyntaxResponse = (function() { + + /** + * Properties of an AnalyzeSyntaxResponse. + * @memberof google.cloud.language.v1 + * @interface IAnalyzeSyntaxResponse + * @property {Array.|null} [sentences] AnalyzeSyntaxResponse sentences + * @property {Array.|null} [tokens] AnalyzeSyntaxResponse tokens + * @property {string|null} [language] AnalyzeSyntaxResponse language + */ + + /** + * Constructs a new AnalyzeSyntaxResponse. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnalyzeSyntaxResponse. + * @implements IAnalyzeSyntaxResponse + * @constructor + * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse=} [properties] Properties to set + */ + function AnalyzeSyntaxResponse(properties) { + this.sentences = []; + this.tokens = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeSyntaxResponse sentences. + * @member {Array.} sentences + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @instance + */ + AnalyzeSyntaxResponse.prototype.sentences = $util.emptyArray; + + /** + * AnalyzeSyntaxResponse tokens. + * @member {Array.} tokens + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @instance + */ + AnalyzeSyntaxResponse.prototype.tokens = $util.emptyArray; + + /** + * AnalyzeSyntaxResponse language. + * @member {string} language + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @instance + */ + AnalyzeSyntaxResponse.prototype.language = ""; + + /** + * Creates a new AnalyzeSyntaxResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse instance + */ + AnalyzeSyntaxResponse.create = function create(properties) { + return new AnalyzeSyntaxResponse(properties); + }; + + /** + * Encodes the specified AnalyzeSyntaxResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse} message AnalyzeSyntaxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSyntaxResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sentences != null && message.sentences.length) + for (var i = 0; i < message.sentences.length; ++i) + $root.google.cloud.language.v1.Sentence.encode(message.sentences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokens != null && message.tokens.length) + for (var i = 0; i < message.tokens.length; ++i) + $root.google.cloud.language.v1.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.language); + return writer; + }; + + /** + * Encodes the specified AnalyzeSyntaxResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse} message AnalyzeSyntaxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSyntaxResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSyntaxResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSyntaxResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); + break; + case 3: + message.language = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSyntaxResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeSyntaxResponse message. + * @function verify + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeSyntaxResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sentences != null && message.hasOwnProperty("sentences")) { + if (!Array.isArray(message.sentences)) + return "sentences: array expected"; + for (var i = 0; i < message.sentences.length; ++i) { + var error = $root.google.cloud.language.v1.Sentence.verify(message.sentences[i]); + if (error) + return "sentences." + error; + } + } + if (message.tokens != null && message.hasOwnProperty("tokens")) { + if (!Array.isArray(message.tokens)) + return "tokens: array expected"; + for (var i = 0; i < message.tokens.length; ++i) { + var error = $root.google.cloud.language.v1.Token.verify(message.tokens[i]); + if (error) + return "tokens." + error; + } + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + return null; + }; + + /** + * Creates an AnalyzeSyntaxResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse + */ + AnalyzeSyntaxResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeSyntaxResponse) + return object; + var message = new $root.google.cloud.language.v1.AnalyzeSyntaxResponse(); + if (object.sentences) { + if (!Array.isArray(object.sentences)) + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.sentences: array expected"); + message.sentences = []; + for (var i = 0; i < object.sentences.length; ++i) { + if (typeof object.sentences[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.sentences: object expected"); + message.sentences[i] = $root.google.cloud.language.v1.Sentence.fromObject(object.sentences[i]); + } + } + if (object.tokens) { + if (!Array.isArray(object.tokens)) + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.tokens: array expected"); + message.tokens = []; + for (var i = 0; i < object.tokens.length; ++i) { + if (typeof object.tokens[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.tokens: object expected"); + message.tokens[i] = $root.google.cloud.language.v1.Token.fromObject(object.tokens[i]); + } + } + if (object.language != null) + message.language = String(object.language); + return message; + }; + + /** + * Creates a plain object from an AnalyzeSyntaxResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {google.cloud.language.v1.AnalyzeSyntaxResponse} message AnalyzeSyntaxResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeSyntaxResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sentences = []; + object.tokens = []; + } + if (options.defaults) + object.language = ""; + if (message.sentences && message.sentences.length) { + object.sentences = []; + for (var j = 0; j < message.sentences.length; ++j) + object.sentences[j] = $root.google.cloud.language.v1.Sentence.toObject(message.sentences[j], options); + } + if (message.tokens && message.tokens.length) { + object.tokens = []; + for (var j = 0; j < message.tokens.length; ++j) + object.tokens[j] = $root.google.cloud.language.v1.Token.toObject(message.tokens[j], options); + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + return object; + }; + + /** + * Converts this AnalyzeSyntaxResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @instance + * @returns {Object.} JSON object + */ + AnalyzeSyntaxResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeSyntaxResponse; + })(); + + v1.ClassifyTextRequest = (function() { + + /** + * Properties of a ClassifyTextRequest. + * @memberof google.cloud.language.v1 + * @interface IClassifyTextRequest + * @property {google.cloud.language.v1.IDocument|null} [document] ClassifyTextRequest document + */ + + /** + * Constructs a new ClassifyTextRequest. + * @memberof google.cloud.language.v1 + * @classdesc Represents a ClassifyTextRequest. + * @implements IClassifyTextRequest + * @constructor + * @param {google.cloud.language.v1.IClassifyTextRequest=} [properties] Properties to set + */ + function ClassifyTextRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClassifyTextRequest document. + * @member {google.cloud.language.v1.IDocument|null|undefined} document + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @instance + */ + ClassifyTextRequest.prototype.document = null; + + /** + * Creates a new ClassifyTextRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @static + * @param {google.cloud.language.v1.IClassifyTextRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest instance + */ + ClassifyTextRequest.create = function create(properties) { + return new ClassifyTextRequest(properties); + }; + + /** + * Encodes the specified ClassifyTextRequest message. Does not implicitly {@link google.cloud.language.v1.ClassifyTextRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @static + * @param {google.cloud.language.v1.IClassifyTextRequest} message ClassifyTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClassifyTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassifyTextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @static + * @param {google.cloud.language.v1.IClassifyTextRequest} message ClassifyTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClassifyTextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassifyTextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClassifyTextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClassifyTextRequest message. + * @function verify + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClassifyTextRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1.Document.verify(message.document); + if (error) + return "document." + error; + } + return null; + }; + + /** + * Creates a ClassifyTextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest + */ + ClassifyTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.ClassifyTextRequest) + return object; + var message = new $root.google.cloud.language.v1.ClassifyTextRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1.ClassifyTextRequest.document: object expected"); + message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); + } + return message; + }; + + /** + * Creates a plain object from a ClassifyTextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @static + * @param {google.cloud.language.v1.ClassifyTextRequest} message ClassifyTextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClassifyTextRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.document = null; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); + return object; + }; + + /** + * Converts this ClassifyTextRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @instance + * @returns {Object.} JSON object + */ + ClassifyTextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClassifyTextRequest; + })(); + + v1.ClassifyTextResponse = (function() { + + /** + * Properties of a ClassifyTextResponse. + * @memberof google.cloud.language.v1 + * @interface IClassifyTextResponse + * @property {Array.|null} [categories] ClassifyTextResponse categories + */ + + /** + * Constructs a new ClassifyTextResponse. + * @memberof google.cloud.language.v1 + * @classdesc Represents a ClassifyTextResponse. + * @implements IClassifyTextResponse + * @constructor + * @param {google.cloud.language.v1.IClassifyTextResponse=} [properties] Properties to set + */ + function ClassifyTextResponse(properties) { + this.categories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClassifyTextResponse categories. + * @member {Array.} categories + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @instance + */ + ClassifyTextResponse.prototype.categories = $util.emptyArray; + + /** + * Creates a new ClassifyTextResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1.IClassifyTextResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse instance + */ + ClassifyTextResponse.create = function create(properties) { + return new ClassifyTextResponse(properties); + }; + + /** + * Encodes the specified ClassifyTextResponse message. Does not implicitly {@link google.cloud.language.v1.ClassifyTextResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1.IClassifyTextResponse} message ClassifyTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.language.v1.ClassificationCategory.encode(message.categories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClassifyTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassifyTextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1.IClassifyTextResponse} message ClassifyTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassifyTextResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClassifyTextResponse message. + * @function verify + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClassifyTextResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.language.v1.ClassificationCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } + return null; + }; + + /** + * Creates a ClassifyTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse + */ + ClassifyTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.ClassifyTextResponse) + return object; + var message = new $root.google.cloud.language.v1.ClassifyTextResponse(); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.language.v1.ClassifyTextResponse.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.language.v1.ClassifyTextResponse.categories: object expected"); + message.categories[i] = $root.google.cloud.language.v1.ClassificationCategory.fromObject(object.categories[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ClassifyTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1.ClassifyTextResponse} message ClassifyTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClassifyTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.categories = []; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.language.v1.ClassificationCategory.toObject(message.categories[j], options); + } + return object; + }; + + /** + * Converts this ClassifyTextResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @instance + * @returns {Object.} JSON object + */ + ClassifyTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClassifyTextResponse; + })(); + + v1.AnnotateTextRequest = (function() { + + /** + * Properties of an AnnotateTextRequest. + * @memberof google.cloud.language.v1 + * @interface IAnnotateTextRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnnotateTextRequest document + * @property {google.cloud.language.v1.AnnotateTextRequest.IFeatures|null} [features] AnnotateTextRequest features + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnnotateTextRequest encodingType + */ + + /** + * Constructs a new AnnotateTextRequest. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnnotateTextRequest. + * @implements IAnnotateTextRequest + * @constructor + * @param {google.cloud.language.v1.IAnnotateTextRequest=} [properties] Properties to set + */ + function AnnotateTextRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnnotateTextRequest document. + * @member {google.cloud.language.v1.IDocument|null|undefined} document + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @instance + */ + AnnotateTextRequest.prototype.document = null; + + /** + * AnnotateTextRequest features. + * @member {google.cloud.language.v1.AnnotateTextRequest.IFeatures|null|undefined} features + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @instance + */ + AnnotateTextRequest.prototype.features = null; + + /** + * AnnotateTextRequest encodingType. + * @member {google.cloud.language.v1.EncodingType} encodingType + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @instance + */ + AnnotateTextRequest.prototype.encodingType = 0; + + /** + * Creates a new AnnotateTextRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @static + * @param {google.cloud.language.v1.IAnnotateTextRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest instance + */ + AnnotateTextRequest.create = function create(properties) { + return new AnnotateTextRequest(properties); + }; + + /** + * Encodes the specified AnnotateTextRequest message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @static + * @param {google.cloud.language.v1.IAnnotateTextRequest} message AnnotateTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotateTextRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.features != null && message.hasOwnProperty("features")) + $root.google.cloud.language.v1.AnnotateTextRequest.Features.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnnotateTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @static + * @param {google.cloud.language.v1.IAnnotateTextRequest} message AnnotateTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotateTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnnotateTextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotateTextRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnnotateTextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + case 2: + message.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.decode(reader, reader.uint32()); + break; + case 3: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnnotateTextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotateTextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnnotateTextRequest message. + * @function verify + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnnotateTextRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.cloud.language.v1.AnnotateTextRequest.Features.verify(message.features); + if (error) + return "features." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnnotateTextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest + */ + AnnotateTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnnotateTextRequest) + return object; + var message = new $root.google.cloud.language.v1.AnnotateTextRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextRequest.document: object expected"); + message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextRequest.features: object expected"); + message.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.fromObject(object.features); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnnotateTextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @static + * @param {google.cloud.language.v1.AnnotateTextRequest} message AnnotateTextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnnotateTextRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.features = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.toObject(message.features, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnnotateTextRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @instance + * @returns {Object.} JSON object + */ + AnnotateTextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + AnnotateTextRequest.Features = (function() { + + /** + * Properties of a Features. + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @interface IFeatures + * @property {boolean|null} [extractSyntax] Features extractSyntax + * @property {boolean|null} [extractEntities] Features extractEntities + * @property {boolean|null} [extractDocumentSentiment] Features extractDocumentSentiment + * @property {boolean|null} [extractEntitySentiment] Features extractEntitySentiment + * @property {boolean|null} [classifyText] Features classifyText + */ + + /** + * Constructs a new Features. + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @classdesc Represents a Features. + * @implements IFeatures + * @constructor + * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures=} [properties] Properties to set + */ + function Features(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Features extractSyntax. + * @member {boolean} extractSyntax + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractSyntax = false; + + /** + * Features extractEntities. + * @member {boolean} extractEntities + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractEntities = false; + + /** + * Features extractDocumentSentiment. + * @member {boolean} extractDocumentSentiment + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractDocumentSentiment = false; + + /** + * Features extractEntitySentiment. + * @member {boolean} extractEntitySentiment + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractEntitySentiment = false; + + /** + * Features classifyText. + * @member {boolean} classifyText + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.classifyText = false; + + /** + * Creates a new Features instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features instance + */ + Features.create = function create(properties) { + return new Features(properties); + }; + + /** + * Encodes the specified Features message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.Features.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures} message Features message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Features.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.extractSyntax); + if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.extractEntities); + if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.extractDocumentSentiment); + if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.extractEntitySentiment); + if (message.classifyText != null && message.hasOwnProperty("classifyText")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.classifyText); + return writer; + }; + + /** + * Encodes the specified Features message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.Features.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures} message Features message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Features.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Features message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Features.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnnotateTextRequest.Features(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.extractSyntax = reader.bool(); + break; + case 2: + message.extractEntities = reader.bool(); + break; + case 3: + message.extractDocumentSentiment = reader.bool(); + break; + case 4: + message.extractEntitySentiment = reader.bool(); + break; + case 6: + message.classifyText = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Features message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Features.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Features message. + * @function verify + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Features.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + if (typeof message.extractSyntax !== "boolean") + return "extractSyntax: boolean expected"; + if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + if (typeof message.extractEntities !== "boolean") + return "extractEntities: boolean expected"; + if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + if (typeof message.extractDocumentSentiment !== "boolean") + return "extractDocumentSentiment: boolean expected"; + if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + if (typeof message.extractEntitySentiment !== "boolean") + return "extractEntitySentiment: boolean expected"; + if (message.classifyText != null && message.hasOwnProperty("classifyText")) + if (typeof message.classifyText !== "boolean") + return "classifyText: boolean expected"; + return null; + }; + + /** + * Creates a Features message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features + */ + Features.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnnotateTextRequest.Features) + return object; + var message = new $root.google.cloud.language.v1.AnnotateTextRequest.Features(); + if (object.extractSyntax != null) + message.extractSyntax = Boolean(object.extractSyntax); + if (object.extractEntities != null) + message.extractEntities = Boolean(object.extractEntities); + if (object.extractDocumentSentiment != null) + message.extractDocumentSentiment = Boolean(object.extractDocumentSentiment); + if (object.extractEntitySentiment != null) + message.extractEntitySentiment = Boolean(object.extractEntitySentiment); + if (object.classifyText != null) + message.classifyText = Boolean(object.classifyText); + return message; + }; + + /** + * Creates a plain object from a Features message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1.AnnotateTextRequest.Features} message Features + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Features.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.extractSyntax = false; + object.extractEntities = false; + object.extractDocumentSentiment = false; + object.extractEntitySentiment = false; + object.classifyText = false; + } + if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + object.extractSyntax = message.extractSyntax; + if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + object.extractEntities = message.extractEntities; + if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + object.extractDocumentSentiment = message.extractDocumentSentiment; + if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + object.extractEntitySentiment = message.extractEntitySentiment; + if (message.classifyText != null && message.hasOwnProperty("classifyText")) + object.classifyText = message.classifyText; + return object; + }; + + /** + * Converts this Features to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + * @returns {Object.} JSON object + */ + Features.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Features; + })(); + + return AnnotateTextRequest; + })(); + + v1.AnnotateTextResponse = (function() { + + /** + * Properties of an AnnotateTextResponse. + * @memberof google.cloud.language.v1 + * @interface IAnnotateTextResponse + * @property {Array.|null} [sentences] AnnotateTextResponse sentences + * @property {Array.|null} [tokens] AnnotateTextResponse tokens + * @property {Array.|null} [entities] AnnotateTextResponse entities + * @property {google.cloud.language.v1.ISentiment|null} [documentSentiment] AnnotateTextResponse documentSentiment + * @property {string|null} [language] AnnotateTextResponse language + * @property {Array.|null} [categories] AnnotateTextResponse categories + */ + + /** + * Constructs a new AnnotateTextResponse. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnnotateTextResponse. + * @implements IAnnotateTextResponse + * @constructor + * @param {google.cloud.language.v1.IAnnotateTextResponse=} [properties] Properties to set + */ + function AnnotateTextResponse(properties) { + this.sentences = []; + this.tokens = []; + this.entities = []; + this.categories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnnotateTextResponse sentences. + * @member {Array.} sentences + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.sentences = $util.emptyArray; + + /** + * AnnotateTextResponse tokens. + * @member {Array.} tokens + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.tokens = $util.emptyArray; + + /** + * AnnotateTextResponse entities. + * @member {Array.} entities + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.entities = $util.emptyArray; + + /** + * AnnotateTextResponse documentSentiment. + * @member {google.cloud.language.v1.ISentiment|null|undefined} documentSentiment + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.documentSentiment = null; + + /** + * AnnotateTextResponse language. + * @member {string} language + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.language = ""; + + /** + * AnnotateTextResponse categories. + * @member {Array.} categories + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.categories = $util.emptyArray; + + /** + * Creates a new AnnotateTextResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {google.cloud.language.v1.IAnnotateTextResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse instance + */ + AnnotateTextResponse.create = function create(properties) { + return new AnnotateTextResponse(properties); + }; + + /** + * Encodes the specified AnnotateTextResponse message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {google.cloud.language.v1.IAnnotateTextResponse} message AnnotateTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotateTextResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sentences != null && message.sentences.length) + for (var i = 0; i < message.sentences.length; ++i) + $root.google.cloud.language.v1.Sentence.encode(message.sentences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokens != null && message.tokens.length) + for (var i = 0; i < message.tokens.length; ++i) + $root.google.cloud.language.v1.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + $root.google.cloud.language.v1.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.language); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.language.v1.ClassificationCategory.encode(message.categories[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnnotateTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {google.cloud.language.v1.IAnnotateTextResponse} message AnnotateTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotateTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnnotateTextResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotateTextResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnnotateTextResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); + break; + case 4: + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + case 5: + message.language = reader.string(); + break; + case 6: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnnotateTextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotateTextResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnnotateTextResponse message. + * @function verify + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnnotateTextResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sentences != null && message.hasOwnProperty("sentences")) { + if (!Array.isArray(message.sentences)) + return "sentences: array expected"; + for (var i = 0; i < message.sentences.length; ++i) { + var error = $root.google.cloud.language.v1.Sentence.verify(message.sentences[i]); + if (error) + return "sentences." + error; + } + } + if (message.tokens != null && message.hasOwnProperty("tokens")) { + if (!Array.isArray(message.tokens)) + return "tokens: array expected"; + for (var i = 0; i < message.tokens.length; ++i) { + var error = $root.google.cloud.language.v1.Token.verify(message.tokens[i]); + if (error) + return "tokens." + error; + } + } + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.language.v1.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) { + var error = $root.google.cloud.language.v1.Sentiment.verify(message.documentSentiment); + if (error) + return "documentSentiment." + error; + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.language.v1.ClassificationCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } + return null; + }; + + /** + * Creates an AnnotateTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse + */ + AnnotateTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnnotateTextResponse) + return object; + var message = new $root.google.cloud.language.v1.AnnotateTextResponse(); + if (object.sentences) { + if (!Array.isArray(object.sentences)) + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.sentences: array expected"); + message.sentences = []; + for (var i = 0; i < object.sentences.length; ++i) { + if (typeof object.sentences[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.sentences: object expected"); + message.sentences[i] = $root.google.cloud.language.v1.Sentence.fromObject(object.sentences[i]); + } + } + if (object.tokens) { + if (!Array.isArray(object.tokens)) + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.tokens: array expected"); + message.tokens = []; + for (var i = 0; i < object.tokens.length; ++i) { + if (typeof object.tokens[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.tokens: object expected"); + message.tokens[i] = $root.google.cloud.language.v1.Token.fromObject(object.tokens[i]); + } + } + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.language.v1.Entity.fromObject(object.entities[i]); + } + } + if (object.documentSentiment != null) { + if (typeof object.documentSentiment !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.documentSentiment: object expected"); + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.fromObject(object.documentSentiment); + } + if (object.language != null) + message.language = String(object.language); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.categories: object expected"); + message.categories[i] = $root.google.cloud.language.v1.ClassificationCategory.fromObject(object.categories[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AnnotateTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {google.cloud.language.v1.AnnotateTextResponse} message AnnotateTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnnotateTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sentences = []; + object.tokens = []; + object.entities = []; + object.categories = []; + } + if (options.defaults) { + object.documentSentiment = null; + object.language = ""; + } + if (message.sentences && message.sentences.length) { + object.sentences = []; + for (var j = 0; j < message.sentences.length; ++j) + object.sentences[j] = $root.google.cloud.language.v1.Sentence.toObject(message.sentences[j], options); + } + if (message.tokens && message.tokens.length) { + object.tokens = []; + for (var j = 0; j < message.tokens.length; ++j) + object.tokens[j] = $root.google.cloud.language.v1.Token.toObject(message.tokens[j], options); + } + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.language.v1.Entity.toObject(message.entities[j], options); + } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + object.documentSentiment = $root.google.cloud.language.v1.Sentiment.toObject(message.documentSentiment, options); + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.language.v1.ClassificationCategory.toObject(message.categories[j], options); + } + return object; + }; + + /** + * Converts this AnnotateTextResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @instance + * @returns {Object.} JSON object + */ + AnnotateTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnnotateTextResponse; + })(); + + return v1; + })(); + + language.v1beta2 = (function() { + + /** + * Namespace v1beta2. + * @memberof google.cloud.language + * @namespace + */ + var v1beta2 = {}; + + v1beta2.LanguageService = (function() { + + /** + * Constructs a new LanguageService service. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a LanguageService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function LanguageService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (LanguageService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LanguageService; + + /** + * Creates new LanguageService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.language.v1beta2.LanguageService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LanguageService} RPC service. Useful where requests and/or responses are streamed. + */ + LanguageService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeSentiment}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnalyzeSentimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnalyzeSentimentResponse} [response] AnalyzeSentimentResponse + */ + + /** + * Calls AnalyzeSentiment. + * @function analyzeSentiment + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest} request AnalyzeSentimentRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeSentimentCallback} callback Node-style callback called with the error, if any, and AnalyzeSentimentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.analyzeSentiment = function analyzeSentiment(request, callback) { + return this.rpcCall(analyzeSentiment, $root.google.cloud.language.v1beta2.AnalyzeSentimentRequest, $root.google.cloud.language.v1beta2.AnalyzeSentimentResponse, request, callback); + }, "name", { value: "AnalyzeSentiment" }); + + /** + * Calls AnalyzeSentiment. + * @function analyzeSentiment + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest} request AnalyzeSentimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeEntities}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnalyzeEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnalyzeEntitiesResponse} [response] AnalyzeEntitiesResponse + */ + + /** + * Calls AnalyzeEntities. + * @function analyzeEntities + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest} request AnalyzeEntitiesRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeEntitiesCallback} callback Node-style callback called with the error, if any, and AnalyzeEntitiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.analyzeEntities = function analyzeEntities(request, callback) { + return this.rpcCall(analyzeEntities, $root.google.cloud.language.v1beta2.AnalyzeEntitiesRequest, $root.google.cloud.language.v1beta2.AnalyzeEntitiesResponse, request, callback); + }, "name", { value: "AnalyzeEntities" }); + + /** + * Calls AnalyzeEntities. + * @function analyzeEntities + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest} request AnalyzeEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeEntitySentiment}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnalyzeEntitySentimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse} [response] AnalyzeEntitySentimentResponse + */ + + /** + * Calls AnalyzeEntitySentiment. + * @function analyzeEntitySentiment + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest} request AnalyzeEntitySentimentRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentimentCallback} callback Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.analyzeEntitySentiment = function analyzeEntitySentiment(request, callback) { + return this.rpcCall(analyzeEntitySentiment, $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest, $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse, request, callback); + }, "name", { value: "AnalyzeEntitySentiment" }); + + /** + * Calls AnalyzeEntitySentiment. + * @function analyzeEntitySentiment + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest} request AnalyzeEntitySentimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeSyntax}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnalyzeSyntaxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnalyzeSyntaxResponse} [response] AnalyzeSyntaxResponse + */ + + /** + * Calls AnalyzeSyntax. + * @function analyzeSyntax + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest} request AnalyzeSyntaxRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeSyntaxCallback} callback Node-style callback called with the error, if any, and AnalyzeSyntaxResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.analyzeSyntax = function analyzeSyntax(request, callback) { + return this.rpcCall(analyzeSyntax, $root.google.cloud.language.v1beta2.AnalyzeSyntaxRequest, $root.google.cloud.language.v1beta2.AnalyzeSyntaxResponse, request, callback); + }, "name", { value: "AnalyzeSyntax" }); + + /** + * Calls AnalyzeSyntax. + * @function analyzeSyntax + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest} request AnalyzeSyntaxRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#classifyText}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef ClassifyTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.ClassifyTextResponse} [response] ClassifyTextResponse + */ + + /** + * Calls ClassifyText. + * @function classifyText + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IClassifyTextRequest} request ClassifyTextRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.ClassifyTextCallback} callback Node-style callback called with the error, if any, and ClassifyTextResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.classifyText = function classifyText(request, callback) { + return this.rpcCall(classifyText, $root.google.cloud.language.v1beta2.ClassifyTextRequest, $root.google.cloud.language.v1beta2.ClassifyTextResponse, request, callback); + }, "name", { value: "ClassifyText" }); + + /** + * Calls ClassifyText. + * @function classifyText + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IClassifyTextRequest} request ClassifyTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#annotateText}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnnotateTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnnotateTextResponse} [response] AnnotateTextResponse + */ + + /** + * Calls AnnotateText. + * @function annotateText + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnnotateTextRequest} request AnnotateTextRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnnotateTextCallback} callback Node-style callback called with the error, if any, and AnnotateTextResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LanguageService.prototype.annotateText = function annotateText(request, callback) { + return this.rpcCall(annotateText, $root.google.cloud.language.v1beta2.AnnotateTextRequest, $root.google.cloud.language.v1beta2.AnnotateTextResponse, request, callback); + }, "name", { value: "AnnotateText" }); + + /** + * Calls AnnotateText. + * @function annotateText + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnnotateTextRequest} request AnnotateTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return LanguageService; + })(); + + v1beta2.Document = (function() { + + /** + * Properties of a Document. + * @memberof google.cloud.language.v1beta2 + * @interface IDocument + * @property {google.cloud.language.v1beta2.Document.Type|null} [type] Document type + * @property {string|null} [content] Document content + * @property {string|null} [gcsContentUri] Document gcsContentUri + * @property {string|null} [language] Document language + */ + + /** + * Constructs a new Document. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a Document. + * @implements IDocument + * @constructor + * @param {google.cloud.language.v1beta2.IDocument=} [properties] Properties to set + */ + function Document(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Document type. + * @member {google.cloud.language.v1beta2.Document.Type} type + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.type = 0; + + /** + * Document content. + * @member {string} content + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.content = ""; + + /** + * Document gcsContentUri. + * @member {string} gcsContentUri + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.gcsContentUri = ""; + + /** + * Document language. + * @member {string} language + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.language = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Document source. + * @member {"content"|"gcsContentUri"|undefined} source + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Object.defineProperty(Document.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["content", "gcsContentUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Document instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.Document + * @static + * @param {google.cloud.language.v1beta2.IDocument=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Document} Document instance + */ + Document.create = function create(properties) { + return new Document(properties); + }; + + /** + * Encodes the specified Document message. Does not implicitly {@link google.cloud.language.v1beta2.Document.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.Document + * @static + * @param {google.cloud.language.v1beta2.IDocument} message Document message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Document.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsContentUri); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.language); + return writer; + }; + + /** + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Document.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.Document + * @static + * @param {google.cloud.language.v1beta2.IDocument} message Document message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Document.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Document message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.Document + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.Document} Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Document.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Document(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.content = reader.string(); + break; + case 3: + message.gcsContentUri = reader.string(); + break; + case 4: + message.language = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Document message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.Document + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.Document} Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Document.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Document message. + * @function verify + * @memberof google.cloud.language.v1beta2.Document + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Document.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.content != null && message.hasOwnProperty("content")) { + properties.source = 1; + if (!$util.isString(message.content)) + return "content: string expected"; + } + if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.gcsContentUri)) + return "gcsContentUri: string expected"; + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + return null; + }; + + /** + * Creates a Document message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.Document + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.Document} Document + */ + Document.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Document) + return object; + var message = new $root.google.cloud.language.v1beta2.Document(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PLAIN_TEXT": + case 1: + message.type = 1; + break; + case "HTML": + case 2: + message.type = 2; + break; + } + if (object.content != null) + message.content = String(object.content); + if (object.gcsContentUri != null) + message.gcsContentUri = String(object.gcsContentUri); + if (object.language != null) + message.language = String(object.language); + return message; + }; + + /** + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.Document + * @static + * @param {google.cloud.language.v1beta2.Document} message Document + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Document.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.language = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.language.v1beta2.Document.Type[message.type] : message.type; + if (message.content != null && message.hasOwnProperty("content")) { + object.content = message.content; + if (options.oneofs) + object.source = "content"; + } + if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) { + object.gcsContentUri = message.gcsContentUri; + if (options.oneofs) + object.source = "gcsContentUri"; + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + return object; + }; + + /** + * Converts this Document to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.Document + * @instance + * @returns {Object.} JSON object + */ + Document.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.language.v1beta2.Document.Type + * @enum {string} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} PLAIN_TEXT=1 PLAIN_TEXT value + * @property {number} HTML=2 HTML value + */ + Document.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PLAIN_TEXT"] = 1; + values[valuesById[2] = "HTML"] = 2; + return values; + })(); + + return Document; + })(); + + v1beta2.Sentence = (function() { + + /** + * Properties of a Sentence. + * @memberof google.cloud.language.v1beta2 + * @interface ISentence + * @property {google.cloud.language.v1beta2.ITextSpan|null} [text] Sentence text + * @property {google.cloud.language.v1beta2.ISentiment|null} [sentiment] Sentence sentiment + */ + + /** + * Constructs a new Sentence. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a Sentence. + * @implements ISentence + * @constructor + * @param {google.cloud.language.v1beta2.ISentence=} [properties] Properties to set + */ + function Sentence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Sentence text. + * @member {google.cloud.language.v1beta2.ITextSpan|null|undefined} text + * @memberof google.cloud.language.v1beta2.Sentence + * @instance + */ + Sentence.prototype.text = null; + + /** + * Sentence sentiment. + * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} sentiment + * @memberof google.cloud.language.v1beta2.Sentence + * @instance + */ + Sentence.prototype.sentiment = null; + + /** + * Creates a new Sentence instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.Sentence + * @static + * @param {google.cloud.language.v1beta2.ISentence=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Sentence} Sentence instance + */ + Sentence.create = function create(properties) { + return new Sentence(properties); + }; + + /** + * Encodes the specified Sentence message. Does not implicitly {@link google.cloud.language.v1beta2.Sentence.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.Sentence + * @static + * @param {google.cloud.language.v1beta2.ISentence} message Sentence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sentence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.hasOwnProperty("text")) + $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Sentence message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Sentence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.Sentence + * @static + * @param {google.cloud.language.v1beta2.ISentence} message Sentence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sentence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Sentence message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.Sentence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.Sentence} Sentence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sentence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Sentence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); + break; + case 2: + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Sentence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.Sentence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.Sentence} Sentence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sentence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Sentence message. + * @function verify + * @memberof google.cloud.language.v1beta2.Sentence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sentence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.language.v1beta2.TextSpan.verify(message.text); + if (error) + return "text." + error; + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates a Sentence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.Sentence + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.Sentence} Sentence + */ + Sentence.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Sentence) + return object; + var message = new $root.google.cloud.language.v1beta2.Sentence(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.language.v1beta2.Sentence.text: object expected"); + message.text = $root.google.cloud.language.v1beta2.TextSpan.fromObject(object.text); + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.language.v1beta2.Sentence.sentiment: object expected"); + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from a Sentence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.Sentence + * @static + * @param {google.cloud.language.v1beta2.Sentence} message Sentence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sentence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = null; + object.sentiment = null; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.language.v1beta2.TextSpan.toObject(message.text, options); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this Sentence to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.Sentence + * @instance + * @returns {Object.} JSON object + */ + Sentence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Sentence; + })(); + + v1beta2.Entity = (function() { + + /** + * Properties of an Entity. + * @memberof google.cloud.language.v1beta2 + * @interface IEntity + * @property {string|null} [name] Entity name + * @property {google.cloud.language.v1beta2.Entity.Type|null} [type] Entity type + * @property {Object.|null} [metadata] Entity metadata + * @property {number|null} [salience] Entity salience + * @property {Array.|null} [mentions] Entity mentions + * @property {google.cloud.language.v1beta2.ISentiment|null} [sentiment] Entity sentiment + */ + + /** + * Constructs a new Entity. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.language.v1beta2.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + this.metadata = {}; + this.mentions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entity name. + * @member {string} name + * @memberof google.cloud.language.v1beta2.Entity + * @instance + */ + Entity.prototype.name = ""; + + /** + * Entity type. + * @member {google.cloud.language.v1beta2.Entity.Type} type + * @memberof google.cloud.language.v1beta2.Entity + * @instance + */ + Entity.prototype.type = 0; + + /** + * Entity metadata. + * @member {Object.} metadata + * @memberof google.cloud.language.v1beta2.Entity + * @instance + */ + Entity.prototype.metadata = $util.emptyObject; + + /** + * Entity salience. + * @member {number} salience + * @memberof google.cloud.language.v1beta2.Entity + * @instance + */ + Entity.prototype.salience = 0; + + /** + * Entity mentions. + * @member {Array.} mentions + * @memberof google.cloud.language.v1beta2.Entity + * @instance + */ + Entity.prototype.mentions = $util.emptyArray; + + /** + * Entity sentiment. + * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} sentiment + * @memberof google.cloud.language.v1beta2.Entity + * @instance + */ + Entity.prototype.sentiment = null; + + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {google.cloud.language.v1beta2.IEntity=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.language.v1beta2.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {google.cloud.language.v1beta2.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.metadata != null && message.hasOwnProperty("metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.salience != null && message.hasOwnProperty("salience")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.salience); + if (message.mentions != null && message.mentions.length) + for (var i = 0; i < message.mentions.length; ++i) + $root.google.cloud.language.v1beta2.EntityMention.encode(message.mentions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {google.cloud.language.v1beta2.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Entity(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + case 3: + reader.skip().pos++; + if (message.metadata === $util.emptyObject) + message.metadata = {}; + key = reader.string(); + reader.pos++; + message.metadata[key] = reader.string(); + break; + case 4: + message.salience = reader.float(); + break; + case 5: + if (!(message.mentions && message.mentions.length)) + message.mentions = []; + message.mentions.push($root.google.cloud.language.v1beta2.EntityMention.decode(reader, reader.uint32())); + break; + case 6: + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.salience != null && message.hasOwnProperty("salience")) + if (typeof message.salience !== "number") + return "salience: number expected"; + if (message.mentions != null && message.hasOwnProperty("mentions")) { + if (!Array.isArray(message.mentions)) + return "mentions: array expected"; + for (var i = 0; i < message.mentions.length; ++i) { + var error = $root.google.cloud.language.v1beta2.EntityMention.verify(message.mentions[i]); + if (error) + return "mentions." + error; + } + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Entity) + return object; + var message = new $root.google.cloud.language.v1beta2.Entity(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "PERSON": + case 1: + message.type = 1; + break; + case "LOCATION": + case 2: + message.type = 2; + break; + case "ORGANIZATION": + case 3: + message.type = 3; + break; + case "EVENT": + case 4: + message.type = 4; + break; + case "WORK_OF_ART": + case 5: + message.type = 5; + break; + case "CONSUMER_GOOD": + case 6: + message.type = 6; + break; + case "OTHER": + case 7: + message.type = 7; + break; + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.language.v1beta2.Entity.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.salience != null) + message.salience = Number(object.salience); + if (object.mentions) { + if (!Array.isArray(object.mentions)) + throw TypeError(".google.cloud.language.v1beta2.Entity.mentions: array expected"); + message.mentions = []; + for (var i = 0; i < object.mentions.length; ++i) { + if (typeof object.mentions[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.Entity.mentions: object expected"); + message.mentions[i] = $root.google.cloud.language.v1beta2.EntityMention.fromObject(object.mentions[i]); + } + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.language.v1beta2.Entity.sentiment: object expected"); + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {google.cloud.language.v1beta2.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mentions = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "UNKNOWN" : 0; + object.salience = 0; + object.sentiment = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.language.v1beta2.Entity.Type[message.type] : message.type; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.salience != null && message.hasOwnProperty("salience")) + object.salience = options.json && !isFinite(message.salience) ? String(message.salience) : message.salience; + if (message.mentions && message.mentions.length) { + object.mentions = []; + for (var j = 0; j < message.mentions.length; ++j) + object.mentions[j] = $root.google.cloud.language.v1beta2.EntityMention.toObject(message.mentions[j], options); + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.language.v1beta2.Entity.Type + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} PERSON=1 PERSON value + * @property {number} LOCATION=2 LOCATION value + * @property {number} ORGANIZATION=3 ORGANIZATION value + * @property {number} EVENT=4 EVENT value + * @property {number} WORK_OF_ART=5 WORK_OF_ART value + * @property {number} CONSUMER_GOOD=6 CONSUMER_GOOD value + * @property {number} OTHER=7 OTHER value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "PERSON"] = 1; + values[valuesById[2] = "LOCATION"] = 2; + values[valuesById[3] = "ORGANIZATION"] = 3; + values[valuesById[4] = "EVENT"] = 4; + values[valuesById[5] = "WORK_OF_ART"] = 5; + values[valuesById[6] = "CONSUMER_GOOD"] = 6; + values[valuesById[7] = "OTHER"] = 7; + return values; + })(); + + return Entity; + })(); + + v1beta2.Token = (function() { + + /** + * Properties of a Token. + * @memberof google.cloud.language.v1beta2 + * @interface IToken + * @property {google.cloud.language.v1beta2.ITextSpan|null} [text] Token text + * @property {google.cloud.language.v1beta2.IPartOfSpeech|null} [partOfSpeech] Token partOfSpeech + * @property {google.cloud.language.v1beta2.IDependencyEdge|null} [dependencyEdge] Token dependencyEdge + * @property {string|null} [lemma] Token lemma + */ + + /** + * Constructs a new Token. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a Token. + * @implements IToken + * @constructor + * @param {google.cloud.language.v1beta2.IToken=} [properties] Properties to set + */ + function Token(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Token text. + * @member {google.cloud.language.v1beta2.ITextSpan|null|undefined} text + * @memberof google.cloud.language.v1beta2.Token + * @instance + */ + Token.prototype.text = null; + + /** + * Token partOfSpeech. + * @member {google.cloud.language.v1beta2.IPartOfSpeech|null|undefined} partOfSpeech + * @memberof google.cloud.language.v1beta2.Token + * @instance + */ + Token.prototype.partOfSpeech = null; + + /** + * Token dependencyEdge. + * @member {google.cloud.language.v1beta2.IDependencyEdge|null|undefined} dependencyEdge + * @memberof google.cloud.language.v1beta2.Token + * @instance + */ + Token.prototype.dependencyEdge = null; + + /** + * Token lemma. + * @member {string} lemma + * @memberof google.cloud.language.v1beta2.Token + * @instance + */ + Token.prototype.lemma = ""; + + /** + * Creates a new Token instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.Token + * @static + * @param {google.cloud.language.v1beta2.IToken=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Token} Token instance + */ + Token.create = function create(properties) { + return new Token(properties); + }; + + /** + * Encodes the specified Token message. Does not implicitly {@link google.cloud.language.v1beta2.Token.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.Token + * @static + * @param {google.cloud.language.v1beta2.IToken} message Token message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Token.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.hasOwnProperty("text")) + $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) + $root.google.cloud.language.v1beta2.PartOfSpeech.encode(message.partOfSpeech, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) + $root.google.cloud.language.v1beta2.DependencyEdge.encode(message.dependencyEdge, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lemma != null && message.hasOwnProperty("lemma")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.lemma); + return writer; + }; + + /** + * Encodes the specified Token message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Token.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.Token + * @static + * @param {google.cloud.language.v1beta2.IToken} message Token message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Token.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Token message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.Token + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.Token} Token + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Token.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Token(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); + break; + case 2: + message.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.decode(reader, reader.uint32()); + break; + case 3: + message.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.decode(reader, reader.uint32()); + break; + case 4: + message.lemma = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Token message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.Token + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.Token} Token + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Token.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Token message. + * @function verify + * @memberof google.cloud.language.v1beta2.Token + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Token.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.language.v1beta2.TextSpan.verify(message.text); + if (error) + return "text." + error; + } + if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) { + var error = $root.google.cloud.language.v1beta2.PartOfSpeech.verify(message.partOfSpeech); + if (error) + return "partOfSpeech." + error; + } + if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) { + var error = $root.google.cloud.language.v1beta2.DependencyEdge.verify(message.dependencyEdge); + if (error) + return "dependencyEdge." + error; + } + if (message.lemma != null && message.hasOwnProperty("lemma")) + if (!$util.isString(message.lemma)) + return "lemma: string expected"; + return null; + }; + + /** + * Creates a Token message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.Token + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.Token} Token + */ + Token.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Token) + return object; + var message = new $root.google.cloud.language.v1beta2.Token(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.language.v1beta2.Token.text: object expected"); + message.text = $root.google.cloud.language.v1beta2.TextSpan.fromObject(object.text); + } + if (object.partOfSpeech != null) { + if (typeof object.partOfSpeech !== "object") + throw TypeError(".google.cloud.language.v1beta2.Token.partOfSpeech: object expected"); + message.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.fromObject(object.partOfSpeech); + } + if (object.dependencyEdge != null) { + if (typeof object.dependencyEdge !== "object") + throw TypeError(".google.cloud.language.v1beta2.Token.dependencyEdge: object expected"); + message.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.fromObject(object.dependencyEdge); + } + if (object.lemma != null) + message.lemma = String(object.lemma); + return message; + }; + + /** + * Creates a plain object from a Token message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.Token + * @static + * @param {google.cloud.language.v1beta2.Token} message Token + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Token.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = null; + object.partOfSpeech = null; + object.dependencyEdge = null; + object.lemma = ""; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.language.v1beta2.TextSpan.toObject(message.text, options); + if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) + object.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.toObject(message.partOfSpeech, options); + if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) + object.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.toObject(message.dependencyEdge, options); + if (message.lemma != null && message.hasOwnProperty("lemma")) + object.lemma = message.lemma; + return object; + }; + + /** + * Converts this Token to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.Token + * @instance + * @returns {Object.} JSON object + */ + Token.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Token; + })(); + + v1beta2.Sentiment = (function() { + + /** + * Properties of a Sentiment. + * @memberof google.cloud.language.v1beta2 + * @interface ISentiment + * @property {number|null} [magnitude] Sentiment magnitude + * @property {number|null} [score] Sentiment score + */ + + /** + * Constructs a new Sentiment. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a Sentiment. + * @implements ISentiment + * @constructor + * @param {google.cloud.language.v1beta2.ISentiment=} [properties] Properties to set + */ + function Sentiment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Sentiment magnitude. + * @member {number} magnitude + * @memberof google.cloud.language.v1beta2.Sentiment + * @instance + */ + Sentiment.prototype.magnitude = 0; + + /** + * Sentiment score. + * @member {number} score + * @memberof google.cloud.language.v1beta2.Sentiment + * @instance + */ + Sentiment.prototype.score = 0; + + /** + * Creates a new Sentiment instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {google.cloud.language.v1beta2.ISentiment=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment instance + */ + Sentiment.create = function create(properties) { + return new Sentiment(properties); + }; + + /** + * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.language.v1beta2.Sentiment.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {google.cloud.language.v1beta2.ISentiment} message Sentiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sentiment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.magnitude); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.score); + return writer; + }; + + /** + * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Sentiment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {google.cloud.language.v1beta2.ISentiment} message Sentiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sentiment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Sentiment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sentiment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Sentiment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.magnitude = reader.float(); + break; + case 3: + message.score = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Sentiment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sentiment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Sentiment message. + * @function verify + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sentiment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + if (typeof message.magnitude !== "number") + return "magnitude: number expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + return null; + }; + + /** + * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment + */ + Sentiment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Sentiment) + return object; + var message = new $root.google.cloud.language.v1beta2.Sentiment(); + if (object.magnitude != null) + message.magnitude = Number(object.magnitude); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a Sentiment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {google.cloud.language.v1beta2.Sentiment} message Sentiment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sentiment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.magnitude = 0; + object.score = 0; + } + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + return object; + }; + + /** + * Converts this Sentiment to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.Sentiment + * @instance + * @returns {Object.} JSON object + */ + Sentiment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Sentiment; + })(); + + v1beta2.PartOfSpeech = (function() { + + /** + * Properties of a PartOfSpeech. + * @memberof google.cloud.language.v1beta2 + * @interface IPartOfSpeech + * @property {google.cloud.language.v1beta2.PartOfSpeech.Tag|null} [tag] PartOfSpeech tag + * @property {google.cloud.language.v1beta2.PartOfSpeech.Aspect|null} [aspect] PartOfSpeech aspect + * @property {google.cloud.language.v1beta2.PartOfSpeech.Case|null} ["case"] PartOfSpeech case + * @property {google.cloud.language.v1beta2.PartOfSpeech.Form|null} [form] PartOfSpeech form + * @property {google.cloud.language.v1beta2.PartOfSpeech.Gender|null} [gender] PartOfSpeech gender + * @property {google.cloud.language.v1beta2.PartOfSpeech.Mood|null} [mood] PartOfSpeech mood + * @property {google.cloud.language.v1beta2.PartOfSpeech.Number|null} [number] PartOfSpeech number + * @property {google.cloud.language.v1beta2.PartOfSpeech.Person|null} [person] PartOfSpeech person + * @property {google.cloud.language.v1beta2.PartOfSpeech.Proper|null} [proper] PartOfSpeech proper + * @property {google.cloud.language.v1beta2.PartOfSpeech.Reciprocity|null} [reciprocity] PartOfSpeech reciprocity + * @property {google.cloud.language.v1beta2.PartOfSpeech.Tense|null} [tense] PartOfSpeech tense + * @property {google.cloud.language.v1beta2.PartOfSpeech.Voice|null} [voice] PartOfSpeech voice + */ + + /** + * Constructs a new PartOfSpeech. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a PartOfSpeech. + * @implements IPartOfSpeech + * @constructor + * @param {google.cloud.language.v1beta2.IPartOfSpeech=} [properties] Properties to set + */ + function PartOfSpeech(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartOfSpeech tag. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Tag} tag + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.tag = 0; + + /** + * PartOfSpeech aspect. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Aspect} aspect + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.aspect = 0; + + /** + * PartOfSpeech case. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Case} case + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype["case"] = 0; + + /** + * PartOfSpeech form. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Form} form + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.form = 0; + + /** + * PartOfSpeech gender. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Gender} gender + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.gender = 0; + + /** + * PartOfSpeech mood. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Mood} mood + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.mood = 0; + + /** + * PartOfSpeech number. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Number} number + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.number = 0; + + /** + * PartOfSpeech person. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Person} person + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.person = 0; + + /** + * PartOfSpeech proper. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Proper} proper + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.proper = 0; + + /** + * PartOfSpeech reciprocity. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Reciprocity} reciprocity + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.reciprocity = 0; + + /** + * PartOfSpeech tense. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Tense} tense + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.tense = 0; + + /** + * PartOfSpeech voice. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Voice} voice + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.voice = 0; + + /** + * Creates a new PartOfSpeech instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {google.cloud.language.v1beta2.IPartOfSpeech=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech instance + */ + PartOfSpeech.create = function create(properties) { + return new PartOfSpeech(properties); + }; + + /** + * Encodes the specified PartOfSpeech message. Does not implicitly {@link google.cloud.language.v1beta2.PartOfSpeech.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {google.cloud.language.v1beta2.IPartOfSpeech} message PartOfSpeech message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartOfSpeech.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && message.hasOwnProperty("tag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tag); + if (message.aspect != null && message.hasOwnProperty("aspect")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.aspect); + if (message["case"] != null && message.hasOwnProperty("case")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message["case"]); + if (message.form != null && message.hasOwnProperty("form")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.form); + if (message.gender != null && message.hasOwnProperty("gender")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.gender); + if (message.mood != null && message.hasOwnProperty("mood")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mood); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.number); + if (message.person != null && message.hasOwnProperty("person")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.person); + if (message.proper != null && message.hasOwnProperty("proper")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.proper); + if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.reciprocity); + if (message.tense != null && message.hasOwnProperty("tense")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.tense); + if (message.voice != null && message.hasOwnProperty("voice")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.voice); + return writer; + }; + + /** + * Encodes the specified PartOfSpeech message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.PartOfSpeech.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {google.cloud.language.v1beta2.IPartOfSpeech} message PartOfSpeech message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartOfSpeech.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartOfSpeech.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.PartOfSpeech(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tag = reader.int32(); + break; + case 2: + message.aspect = reader.int32(); + break; + case 3: + message["case"] = reader.int32(); + break; + case 4: + message.form = reader.int32(); + break; + case 5: + message.gender = reader.int32(); + break; + case 6: + message.mood = reader.int32(); + break; + case 7: + message.number = reader.int32(); + break; + case 8: + message.person = reader.int32(); + break; + case 9: + message.proper = reader.int32(); + break; + case 10: + message.reciprocity = reader.int32(); + break; + case 11: + message.tense = reader.int32(); + break; + case 12: + message.voice = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartOfSpeech.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartOfSpeech message. + * @function verify + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartOfSpeech.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + switch (message.tag) { + default: + return "tag: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.aspect != null && message.hasOwnProperty("aspect")) + switch (message.aspect) { + default: + return "aspect: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message["case"] != null && message.hasOwnProperty("case")) + switch (message["case"]) { + default: + return "case: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + break; + } + if (message.form != null && message.hasOwnProperty("form")) + switch (message.form) { + default: + return "form: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + break; + } + if (message.gender != null && message.hasOwnProperty("gender")) + switch (message.gender) { + default: + return "gender: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mood != null && message.hasOwnProperty("mood")) + switch (message.mood) { + default: + return "mood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.number != null && message.hasOwnProperty("number")) + switch (message.number) { + default: + return "number: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.person != null && message.hasOwnProperty("person")) + switch (message.person) { + default: + return "person: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.proper != null && message.hasOwnProperty("proper")) + switch (message.proper) { + default: + return "proper: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + switch (message.reciprocity) { + default: + return "reciprocity: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.tense != null && message.hasOwnProperty("tense")) + switch (message.tense) { + default: + return "tense: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.voice != null && message.hasOwnProperty("voice")) + switch (message.voice) { + default: + return "voice: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a PartOfSpeech message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech + */ + PartOfSpeech.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.PartOfSpeech) + return object; + var message = new $root.google.cloud.language.v1beta2.PartOfSpeech(); + switch (object.tag) { + case "UNKNOWN": + case 0: + message.tag = 0; + break; + case "ADJ": + case 1: + message.tag = 1; + break; + case "ADP": + case 2: + message.tag = 2; + break; + case "ADV": + case 3: + message.tag = 3; + break; + case "CONJ": + case 4: + message.tag = 4; + break; + case "DET": + case 5: + message.tag = 5; + break; + case "NOUN": + case 6: + message.tag = 6; + break; + case "NUM": + case 7: + message.tag = 7; + break; + case "PRON": + case 8: + message.tag = 8; + break; + case "PRT": + case 9: + message.tag = 9; + break; + case "PUNCT": + case 10: + message.tag = 10; + break; + case "VERB": + case 11: + message.tag = 11; + break; + case "X": + case 12: + message.tag = 12; + break; + case "AFFIX": + case 13: + message.tag = 13; + break; + } + switch (object.aspect) { + case "ASPECT_UNKNOWN": + case 0: + message.aspect = 0; + break; + case "PERFECTIVE": + case 1: + message.aspect = 1; + break; + case "IMPERFECTIVE": + case 2: + message.aspect = 2; + break; + case "PROGRESSIVE": + case 3: + message.aspect = 3; + break; + } + switch (object["case"]) { + case "CASE_UNKNOWN": + case 0: + message["case"] = 0; + break; + case "ACCUSATIVE": + case 1: + message["case"] = 1; + break; + case "ADVERBIAL": + case 2: + message["case"] = 2; + break; + case "COMPLEMENTIVE": + case 3: + message["case"] = 3; + break; + case "DATIVE": + case 4: + message["case"] = 4; + break; + case "GENITIVE": + case 5: + message["case"] = 5; + break; + case "INSTRUMENTAL": + case 6: + message["case"] = 6; + break; + case "LOCATIVE": + case 7: + message["case"] = 7; + break; + case "NOMINATIVE": + case 8: + message["case"] = 8; + break; + case "OBLIQUE": + case 9: + message["case"] = 9; + break; + case "PARTITIVE": + case 10: + message["case"] = 10; + break; + case "PREPOSITIONAL": + case 11: + message["case"] = 11; + break; + case "REFLEXIVE_CASE": + case 12: + message["case"] = 12; + break; + case "RELATIVE_CASE": + case 13: + message["case"] = 13; + break; + case "VOCATIVE": + case 14: + message["case"] = 14; + break; + } + switch (object.form) { + case "FORM_UNKNOWN": + case 0: + message.form = 0; + break; + case "ADNOMIAL": + case 1: + message.form = 1; + break; + case "AUXILIARY": + case 2: + message.form = 2; + break; + case "COMPLEMENTIZER": + case 3: + message.form = 3; + break; + case "FINAL_ENDING": + case 4: + message.form = 4; + break; + case "GERUND": + case 5: + message.form = 5; + break; + case "REALIS": + case 6: + message.form = 6; + break; + case "IRREALIS": + case 7: + message.form = 7; + break; + case "SHORT": + case 8: + message.form = 8; + break; + case "LONG": + case 9: + message.form = 9; + break; + case "ORDER": + case 10: + message.form = 10; + break; + case "SPECIFIC": + case 11: + message.form = 11; + break; + } + switch (object.gender) { + case "GENDER_UNKNOWN": + case 0: + message.gender = 0; + break; + case "FEMININE": + case 1: + message.gender = 1; + break; + case "MASCULINE": + case 2: + message.gender = 2; + break; + case "NEUTER": + case 3: + message.gender = 3; + break; + } + switch (object.mood) { + case "MOOD_UNKNOWN": + case 0: + message.mood = 0; + break; + case "CONDITIONAL_MOOD": + case 1: + message.mood = 1; + break; + case "IMPERATIVE": + case 2: + message.mood = 2; + break; + case "INDICATIVE": + case 3: + message.mood = 3; + break; + case "INTERROGATIVE": + case 4: + message.mood = 4; + break; + case "JUSSIVE": + case 5: + message.mood = 5; + break; + case "SUBJUNCTIVE": + case 6: + message.mood = 6; + break; + } + switch (object.number) { + case "NUMBER_UNKNOWN": + case 0: + message.number = 0; + break; + case "SINGULAR": + case 1: + message.number = 1; + break; + case "PLURAL": + case 2: + message.number = 2; + break; + case "DUAL": + case 3: + message.number = 3; + break; + } + switch (object.person) { + case "PERSON_UNKNOWN": + case 0: + message.person = 0; + break; + case "FIRST": + case 1: + message.person = 1; + break; + case "SECOND": + case 2: + message.person = 2; + break; + case "THIRD": + case 3: + message.person = 3; + break; + case "REFLEXIVE_PERSON": + case 4: + message.person = 4; + break; + } + switch (object.proper) { + case "PROPER_UNKNOWN": + case 0: + message.proper = 0; + break; + case "PROPER": + case 1: + message.proper = 1; + break; + case "NOT_PROPER": + case 2: + message.proper = 2; + break; + } + switch (object.reciprocity) { + case "RECIPROCITY_UNKNOWN": + case 0: + message.reciprocity = 0; + break; + case "RECIPROCAL": + case 1: + message.reciprocity = 1; + break; + case "NON_RECIPROCAL": + case 2: + message.reciprocity = 2; + break; + } + switch (object.tense) { + case "TENSE_UNKNOWN": + case 0: + message.tense = 0; + break; + case "CONDITIONAL_TENSE": + case 1: + message.tense = 1; + break; + case "FUTURE": + case 2: + message.tense = 2; + break; + case "PAST": + case 3: + message.tense = 3; + break; + case "PRESENT": + case 4: + message.tense = 4; + break; + case "IMPERFECT": + case 5: + message.tense = 5; + break; + case "PLUPERFECT": + case 6: + message.tense = 6; + break; + } + switch (object.voice) { + case "VOICE_UNKNOWN": + case 0: + message.voice = 0; + break; + case "ACTIVE": + case 1: + message.voice = 1; + break; + case "CAUSATIVE": + case 2: + message.voice = 2; + break; + case "PASSIVE": + case 3: + message.voice = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a PartOfSpeech message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {google.cloud.language.v1beta2.PartOfSpeech} message PartOfSpeech + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartOfSpeech.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tag = options.enums === String ? "UNKNOWN" : 0; + object.aspect = options.enums === String ? "ASPECT_UNKNOWN" : 0; + object["case"] = options.enums === String ? "CASE_UNKNOWN" : 0; + object.form = options.enums === String ? "FORM_UNKNOWN" : 0; + object.gender = options.enums === String ? "GENDER_UNKNOWN" : 0; + object.mood = options.enums === String ? "MOOD_UNKNOWN" : 0; + object.number = options.enums === String ? "NUMBER_UNKNOWN" : 0; + object.person = options.enums === String ? "PERSON_UNKNOWN" : 0; + object.proper = options.enums === String ? "PROPER_UNKNOWN" : 0; + object.reciprocity = options.enums === String ? "RECIPROCITY_UNKNOWN" : 0; + object.tense = options.enums === String ? "TENSE_UNKNOWN" : 0; + object.voice = options.enums === String ? "VOICE_UNKNOWN" : 0; + } + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Tag[message.tag] : message.tag; + if (message.aspect != null && message.hasOwnProperty("aspect")) + object.aspect = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Aspect[message.aspect] : message.aspect; + if (message["case"] != null && message.hasOwnProperty("case")) + object["case"] = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Case[message["case"]] : message["case"]; + if (message.form != null && message.hasOwnProperty("form")) + object.form = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Form[message.form] : message.form; + if (message.gender != null && message.hasOwnProperty("gender")) + object.gender = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Gender[message.gender] : message.gender; + if (message.mood != null && message.hasOwnProperty("mood")) + object.mood = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Mood[message.mood] : message.mood; + if (message.number != null && message.hasOwnProperty("number")) + object.number = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Number[message.number] : message.number; + if (message.person != null && message.hasOwnProperty("person")) + object.person = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Person[message.person] : message.person; + if (message.proper != null && message.hasOwnProperty("proper")) + object.proper = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Proper[message.proper] : message.proper; + if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + object.reciprocity = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity[message.reciprocity] : message.reciprocity; + if (message.tense != null && message.hasOwnProperty("tense")) + object.tense = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Tense[message.tense] : message.tense; + if (message.voice != null && message.hasOwnProperty("voice")) + object.voice = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Voice[message.voice] : message.voice; + return object; + }; + + /** + * Converts this PartOfSpeech to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + * @returns {Object.} JSON object + */ + PartOfSpeech.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Tag enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Tag + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ADJ=1 ADJ value + * @property {number} ADP=2 ADP value + * @property {number} ADV=3 ADV value + * @property {number} CONJ=4 CONJ value + * @property {number} DET=5 DET value + * @property {number} NOUN=6 NOUN value + * @property {number} NUM=7 NUM value + * @property {number} PRON=8 PRON value + * @property {number} PRT=9 PRT value + * @property {number} PUNCT=10 PUNCT value + * @property {number} VERB=11 VERB value + * @property {number} X=12 X value + * @property {number} AFFIX=13 AFFIX value + */ + PartOfSpeech.Tag = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ADJ"] = 1; + values[valuesById[2] = "ADP"] = 2; + values[valuesById[3] = "ADV"] = 3; + values[valuesById[4] = "CONJ"] = 4; + values[valuesById[5] = "DET"] = 5; + values[valuesById[6] = "NOUN"] = 6; + values[valuesById[7] = "NUM"] = 7; + values[valuesById[8] = "PRON"] = 8; + values[valuesById[9] = "PRT"] = 9; + values[valuesById[10] = "PUNCT"] = 10; + values[valuesById[11] = "VERB"] = 11; + values[valuesById[12] = "X"] = 12; + values[valuesById[13] = "AFFIX"] = 13; + return values; + })(); + + /** + * Aspect enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Aspect + * @enum {string} + * @property {number} ASPECT_UNKNOWN=0 ASPECT_UNKNOWN value + * @property {number} PERFECTIVE=1 PERFECTIVE value + * @property {number} IMPERFECTIVE=2 IMPERFECTIVE value + * @property {number} PROGRESSIVE=3 PROGRESSIVE value + */ + PartOfSpeech.Aspect = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ASPECT_UNKNOWN"] = 0; + values[valuesById[1] = "PERFECTIVE"] = 1; + values[valuesById[2] = "IMPERFECTIVE"] = 2; + values[valuesById[3] = "PROGRESSIVE"] = 3; + return values; + })(); + + /** + * Case enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Case + * @enum {string} + * @property {number} CASE_UNKNOWN=0 CASE_UNKNOWN value + * @property {number} ACCUSATIVE=1 ACCUSATIVE value + * @property {number} ADVERBIAL=2 ADVERBIAL value + * @property {number} COMPLEMENTIVE=3 COMPLEMENTIVE value + * @property {number} DATIVE=4 DATIVE value + * @property {number} GENITIVE=5 GENITIVE value + * @property {number} INSTRUMENTAL=6 INSTRUMENTAL value + * @property {number} LOCATIVE=7 LOCATIVE value + * @property {number} NOMINATIVE=8 NOMINATIVE value + * @property {number} OBLIQUE=9 OBLIQUE value + * @property {number} PARTITIVE=10 PARTITIVE value + * @property {number} PREPOSITIONAL=11 PREPOSITIONAL value + * @property {number} REFLEXIVE_CASE=12 REFLEXIVE_CASE value + * @property {number} RELATIVE_CASE=13 RELATIVE_CASE value + * @property {number} VOCATIVE=14 VOCATIVE value + */ + PartOfSpeech.Case = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CASE_UNKNOWN"] = 0; + values[valuesById[1] = "ACCUSATIVE"] = 1; + values[valuesById[2] = "ADVERBIAL"] = 2; + values[valuesById[3] = "COMPLEMENTIVE"] = 3; + values[valuesById[4] = "DATIVE"] = 4; + values[valuesById[5] = "GENITIVE"] = 5; + values[valuesById[6] = "INSTRUMENTAL"] = 6; + values[valuesById[7] = "LOCATIVE"] = 7; + values[valuesById[8] = "NOMINATIVE"] = 8; + values[valuesById[9] = "OBLIQUE"] = 9; + values[valuesById[10] = "PARTITIVE"] = 10; + values[valuesById[11] = "PREPOSITIONAL"] = 11; + values[valuesById[12] = "REFLEXIVE_CASE"] = 12; + values[valuesById[13] = "RELATIVE_CASE"] = 13; + values[valuesById[14] = "VOCATIVE"] = 14; + return values; + })(); + + /** + * Form enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Form + * @enum {string} + * @property {number} FORM_UNKNOWN=0 FORM_UNKNOWN value + * @property {number} ADNOMIAL=1 ADNOMIAL value + * @property {number} AUXILIARY=2 AUXILIARY value + * @property {number} COMPLEMENTIZER=3 COMPLEMENTIZER value + * @property {number} FINAL_ENDING=4 FINAL_ENDING value + * @property {number} GERUND=5 GERUND value + * @property {number} REALIS=6 REALIS value + * @property {number} IRREALIS=7 IRREALIS value + * @property {number} SHORT=8 SHORT value + * @property {number} LONG=9 LONG value + * @property {number} ORDER=10 ORDER value + * @property {number} SPECIFIC=11 SPECIFIC value + */ + PartOfSpeech.Form = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORM_UNKNOWN"] = 0; + values[valuesById[1] = "ADNOMIAL"] = 1; + values[valuesById[2] = "AUXILIARY"] = 2; + values[valuesById[3] = "COMPLEMENTIZER"] = 3; + values[valuesById[4] = "FINAL_ENDING"] = 4; + values[valuesById[5] = "GERUND"] = 5; + values[valuesById[6] = "REALIS"] = 6; + values[valuesById[7] = "IRREALIS"] = 7; + values[valuesById[8] = "SHORT"] = 8; + values[valuesById[9] = "LONG"] = 9; + values[valuesById[10] = "ORDER"] = 10; + values[valuesById[11] = "SPECIFIC"] = 11; + return values; + })(); + + /** + * Gender enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Gender + * @enum {string} + * @property {number} GENDER_UNKNOWN=0 GENDER_UNKNOWN value + * @property {number} FEMININE=1 FEMININE value + * @property {number} MASCULINE=2 MASCULINE value + * @property {number} NEUTER=3 NEUTER value + */ + PartOfSpeech.Gender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GENDER_UNKNOWN"] = 0; + values[valuesById[1] = "FEMININE"] = 1; + values[valuesById[2] = "MASCULINE"] = 2; + values[valuesById[3] = "NEUTER"] = 3; + return values; + })(); + + /** + * Mood enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Mood + * @enum {string} + * @property {number} MOOD_UNKNOWN=0 MOOD_UNKNOWN value + * @property {number} CONDITIONAL_MOOD=1 CONDITIONAL_MOOD value + * @property {number} IMPERATIVE=2 IMPERATIVE value + * @property {number} INDICATIVE=3 INDICATIVE value + * @property {number} INTERROGATIVE=4 INTERROGATIVE value + * @property {number} JUSSIVE=5 JUSSIVE value + * @property {number} SUBJUNCTIVE=6 SUBJUNCTIVE value + */ + PartOfSpeech.Mood = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MOOD_UNKNOWN"] = 0; + values[valuesById[1] = "CONDITIONAL_MOOD"] = 1; + values[valuesById[2] = "IMPERATIVE"] = 2; + values[valuesById[3] = "INDICATIVE"] = 3; + values[valuesById[4] = "INTERROGATIVE"] = 4; + values[valuesById[5] = "JUSSIVE"] = 5; + values[valuesById[6] = "SUBJUNCTIVE"] = 6; + return values; + })(); + + /** + * Number enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Number + * @enum {string} + * @property {number} NUMBER_UNKNOWN=0 NUMBER_UNKNOWN value + * @property {number} SINGULAR=1 SINGULAR value + * @property {number} PLURAL=2 PLURAL value + * @property {number} DUAL=3 DUAL value + */ + PartOfSpeech.Number = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NUMBER_UNKNOWN"] = 0; + values[valuesById[1] = "SINGULAR"] = 1; + values[valuesById[2] = "PLURAL"] = 2; + values[valuesById[3] = "DUAL"] = 3; + return values; + })(); + + /** + * Person enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Person + * @enum {string} + * @property {number} PERSON_UNKNOWN=0 PERSON_UNKNOWN value + * @property {number} FIRST=1 FIRST value + * @property {number} SECOND=2 SECOND value + * @property {number} THIRD=3 THIRD value + * @property {number} REFLEXIVE_PERSON=4 REFLEXIVE_PERSON value + */ + PartOfSpeech.Person = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PERSON_UNKNOWN"] = 0; + values[valuesById[1] = "FIRST"] = 1; + values[valuesById[2] = "SECOND"] = 2; + values[valuesById[3] = "THIRD"] = 3; + values[valuesById[4] = "REFLEXIVE_PERSON"] = 4; + return values; + })(); + + /** + * Proper enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Proper + * @enum {string} + * @property {number} PROPER_UNKNOWN=0 PROPER_UNKNOWN value + * @property {number} PROPER=1 PROPER value + * @property {number} NOT_PROPER=2 NOT_PROPER value + */ + PartOfSpeech.Proper = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPER_UNKNOWN"] = 0; + values[valuesById[1] = "PROPER"] = 1; + values[valuesById[2] = "NOT_PROPER"] = 2; + return values; + })(); + + /** + * Reciprocity enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Reciprocity + * @enum {string} + * @property {number} RECIPROCITY_UNKNOWN=0 RECIPROCITY_UNKNOWN value + * @property {number} RECIPROCAL=1 RECIPROCAL value + * @property {number} NON_RECIPROCAL=2 NON_RECIPROCAL value + */ + PartOfSpeech.Reciprocity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECIPROCITY_UNKNOWN"] = 0; + values[valuesById[1] = "RECIPROCAL"] = 1; + values[valuesById[2] = "NON_RECIPROCAL"] = 2; + return values; + })(); + + /** + * Tense enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Tense + * @enum {string} + * @property {number} TENSE_UNKNOWN=0 TENSE_UNKNOWN value + * @property {number} CONDITIONAL_TENSE=1 CONDITIONAL_TENSE value + * @property {number} FUTURE=2 FUTURE value + * @property {number} PAST=3 PAST value + * @property {number} PRESENT=4 PRESENT value + * @property {number} IMPERFECT=5 IMPERFECT value + * @property {number} PLUPERFECT=6 PLUPERFECT value + */ + PartOfSpeech.Tense = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TENSE_UNKNOWN"] = 0; + values[valuesById[1] = "CONDITIONAL_TENSE"] = 1; + values[valuesById[2] = "FUTURE"] = 2; + values[valuesById[3] = "PAST"] = 3; + values[valuesById[4] = "PRESENT"] = 4; + values[valuesById[5] = "IMPERFECT"] = 5; + values[valuesById[6] = "PLUPERFECT"] = 6; + return values; + })(); + + /** + * Voice enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Voice + * @enum {string} + * @property {number} VOICE_UNKNOWN=0 VOICE_UNKNOWN value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} CAUSATIVE=2 CAUSATIVE value + * @property {number} PASSIVE=3 PASSIVE value + */ + PartOfSpeech.Voice = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VOICE_UNKNOWN"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "CAUSATIVE"] = 2; + values[valuesById[3] = "PASSIVE"] = 3; + return values; + })(); + + return PartOfSpeech; + })(); + + v1beta2.DependencyEdge = (function() { + + /** + * Properties of a DependencyEdge. + * @memberof google.cloud.language.v1beta2 + * @interface IDependencyEdge + * @property {number|null} [headTokenIndex] DependencyEdge headTokenIndex + * @property {google.cloud.language.v1beta2.DependencyEdge.Label|null} [label] DependencyEdge label + */ + + /** + * Constructs a new DependencyEdge. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a DependencyEdge. + * @implements IDependencyEdge + * @constructor + * @param {google.cloud.language.v1beta2.IDependencyEdge=} [properties] Properties to set + */ + function DependencyEdge(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DependencyEdge headTokenIndex. + * @member {number} headTokenIndex + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @instance + */ + DependencyEdge.prototype.headTokenIndex = 0; + + /** + * DependencyEdge label. + * @member {google.cloud.language.v1beta2.DependencyEdge.Label} label + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @instance + */ + DependencyEdge.prototype.label = 0; + + /** + * Creates a new DependencyEdge instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {google.cloud.language.v1beta2.IDependencyEdge=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge instance + */ + DependencyEdge.create = function create(properties) { + return new DependencyEdge(properties); + }; + + /** + * Encodes the specified DependencyEdge message. Does not implicitly {@link google.cloud.language.v1beta2.DependencyEdge.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {google.cloud.language.v1beta2.IDependencyEdge} message DependencyEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyEdge.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headTokenIndex); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.label); + return writer; + }; + + /** + * Encodes the specified DependencyEdge message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.DependencyEdge.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {google.cloud.language.v1beta2.IDependencyEdge} message DependencyEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyEdge.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyEdge.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.DependencyEdge(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.headTokenIndex = reader.int32(); + break; + case 2: + message.label = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyEdge.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DependencyEdge message. + * @function verify + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DependencyEdge.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + if (!$util.isInteger(message.headTokenIndex)) + return "headTokenIndex: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + break; + } + return null; + }; + + /** + * Creates a DependencyEdge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge + */ + DependencyEdge.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.DependencyEdge) + return object; + var message = new $root.google.cloud.language.v1beta2.DependencyEdge(); + if (object.headTokenIndex != null) + message.headTokenIndex = object.headTokenIndex | 0; + switch (object.label) { + case "UNKNOWN": + case 0: + message.label = 0; + break; + case "ABBREV": + case 1: + message.label = 1; + break; + case "ACOMP": + case 2: + message.label = 2; + break; + case "ADVCL": + case 3: + message.label = 3; + break; + case "ADVMOD": + case 4: + message.label = 4; + break; + case "AMOD": + case 5: + message.label = 5; + break; + case "APPOS": + case 6: + message.label = 6; + break; + case "ATTR": + case 7: + message.label = 7; + break; + case "AUX": + case 8: + message.label = 8; + break; + case "AUXPASS": + case 9: + message.label = 9; + break; + case "CC": + case 10: + message.label = 10; + break; + case "CCOMP": + case 11: + message.label = 11; + break; + case "CONJ": + case 12: + message.label = 12; + break; + case "CSUBJ": + case 13: + message.label = 13; + break; + case "CSUBJPASS": + case 14: + message.label = 14; + break; + case "DEP": + case 15: + message.label = 15; + break; + case "DET": + case 16: + message.label = 16; + break; + case "DISCOURSE": + case 17: + message.label = 17; + break; + case "DOBJ": + case 18: + message.label = 18; + break; + case "EXPL": + case 19: + message.label = 19; + break; + case "GOESWITH": + case 20: + message.label = 20; + break; + case "IOBJ": + case 21: + message.label = 21; + break; + case "MARK": + case 22: + message.label = 22; + break; + case "MWE": + case 23: + message.label = 23; + break; + case "MWV": + case 24: + message.label = 24; + break; + case "NEG": + case 25: + message.label = 25; + break; + case "NN": + case 26: + message.label = 26; + break; + case "NPADVMOD": + case 27: + message.label = 27; + break; + case "NSUBJ": + case 28: + message.label = 28; + break; + case "NSUBJPASS": + case 29: + message.label = 29; + break; + case "NUM": + case 30: + message.label = 30; + break; + case "NUMBER": + case 31: + message.label = 31; + break; + case "P": + case 32: + message.label = 32; + break; + case "PARATAXIS": + case 33: + message.label = 33; + break; + case "PARTMOD": + case 34: + message.label = 34; + break; + case "PCOMP": + case 35: + message.label = 35; + break; + case "POBJ": + case 36: + message.label = 36; + break; + case "POSS": + case 37: + message.label = 37; + break; + case "POSTNEG": + case 38: + message.label = 38; + break; + case "PRECOMP": + case 39: + message.label = 39; + break; + case "PRECONJ": + case 40: + message.label = 40; + break; + case "PREDET": + case 41: + message.label = 41; + break; + case "PREF": + case 42: + message.label = 42; + break; + case "PREP": + case 43: + message.label = 43; + break; + case "PRONL": + case 44: + message.label = 44; + break; + case "PRT": + case 45: + message.label = 45; + break; + case "PS": + case 46: + message.label = 46; + break; + case "QUANTMOD": + case 47: + message.label = 47; + break; + case "RCMOD": + case 48: + message.label = 48; + break; + case "RCMODREL": + case 49: + message.label = 49; + break; + case "RDROP": + case 50: + message.label = 50; + break; + case "REF": + case 51: + message.label = 51; + break; + case "REMNANT": + case 52: + message.label = 52; + break; + case "REPARANDUM": + case 53: + message.label = 53; + break; + case "ROOT": + case 54: + message.label = 54; + break; + case "SNUM": + case 55: + message.label = 55; + break; + case "SUFF": + case 56: + message.label = 56; + break; + case "TMOD": + case 57: + message.label = 57; + break; + case "TOPIC": + case 58: + message.label = 58; + break; + case "VMOD": + case 59: + message.label = 59; + break; + case "VOCATIVE": + case 60: + message.label = 60; + break; + case "XCOMP": + case 61: + message.label = 61; + break; + case "SUFFIX": + case 62: + message.label = 62; + break; + case "TITLE": + case 63: + message.label = 63; + break; + case "ADVPHMOD": + case 64: + message.label = 64; + break; + case "AUXCAUS": + case 65: + message.label = 65; + break; + case "AUXVV": + case 66: + message.label = 66; + break; + case "DTMOD": + case 67: + message.label = 67; + break; + case "FOREIGN": + case 68: + message.label = 68; + break; + case "KW": + case 69: + message.label = 69; + break; + case "LIST": + case 70: + message.label = 70; + break; + case "NOMC": + case 71: + message.label = 71; + break; + case "NOMCSUBJ": + case 72: + message.label = 72; + break; + case "NOMCSUBJPASS": + case 73: + message.label = 73; + break; + case "NUMC": + case 74: + message.label = 74; + break; + case "COP": + case 75: + message.label = 75; + break; + case "DISLOCATED": + case 76: + message.label = 76; + break; + case "ASP": + case 77: + message.label = 77; + break; + case "GMOD": + case 78: + message.label = 78; + break; + case "GOBJ": + case 79: + message.label = 79; + break; + case "INFMOD": + case 80: + message.label = 80; + break; + case "MES": + case 81: + message.label = 81; + break; + case "NCOMP": + case 82: + message.label = 82; + break; + } + return message; + }; + + /** + * Creates a plain object from a DependencyEdge message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {google.cloud.language.v1beta2.DependencyEdge} message DependencyEdge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DependencyEdge.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headTokenIndex = 0; + object.label = options.enums === String ? "UNKNOWN" : 0; + } + if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + object.headTokenIndex = message.headTokenIndex; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.cloud.language.v1beta2.DependencyEdge.Label[message.label] : message.label; + return object; + }; + + /** + * Converts this DependencyEdge to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @instance + * @returns {Object.} JSON object + */ + DependencyEdge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Label enum. + * @name google.cloud.language.v1beta2.DependencyEdge.Label + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ABBREV=1 ABBREV value + * @property {number} ACOMP=2 ACOMP value + * @property {number} ADVCL=3 ADVCL value + * @property {number} ADVMOD=4 ADVMOD value + * @property {number} AMOD=5 AMOD value + * @property {number} APPOS=6 APPOS value + * @property {number} ATTR=7 ATTR value + * @property {number} AUX=8 AUX value + * @property {number} AUXPASS=9 AUXPASS value + * @property {number} CC=10 CC value + * @property {number} CCOMP=11 CCOMP value + * @property {number} CONJ=12 CONJ value + * @property {number} CSUBJ=13 CSUBJ value + * @property {number} CSUBJPASS=14 CSUBJPASS value + * @property {number} DEP=15 DEP value + * @property {number} DET=16 DET value + * @property {number} DISCOURSE=17 DISCOURSE value + * @property {number} DOBJ=18 DOBJ value + * @property {number} EXPL=19 EXPL value + * @property {number} GOESWITH=20 GOESWITH value + * @property {number} IOBJ=21 IOBJ value + * @property {number} MARK=22 MARK value + * @property {number} MWE=23 MWE value + * @property {number} MWV=24 MWV value + * @property {number} NEG=25 NEG value + * @property {number} NN=26 NN value + * @property {number} NPADVMOD=27 NPADVMOD value + * @property {number} NSUBJ=28 NSUBJ value + * @property {number} NSUBJPASS=29 NSUBJPASS value + * @property {number} NUM=30 NUM value + * @property {number} NUMBER=31 NUMBER value + * @property {number} P=32 P value + * @property {number} PARATAXIS=33 PARATAXIS value + * @property {number} PARTMOD=34 PARTMOD value + * @property {number} PCOMP=35 PCOMP value + * @property {number} POBJ=36 POBJ value + * @property {number} POSS=37 POSS value + * @property {number} POSTNEG=38 POSTNEG value + * @property {number} PRECOMP=39 PRECOMP value + * @property {number} PRECONJ=40 PRECONJ value + * @property {number} PREDET=41 PREDET value + * @property {number} PREF=42 PREF value + * @property {number} PREP=43 PREP value + * @property {number} PRONL=44 PRONL value + * @property {number} PRT=45 PRT value + * @property {number} PS=46 PS value + * @property {number} QUANTMOD=47 QUANTMOD value + * @property {number} RCMOD=48 RCMOD value + * @property {number} RCMODREL=49 RCMODREL value + * @property {number} RDROP=50 RDROP value + * @property {number} REF=51 REF value + * @property {number} REMNANT=52 REMNANT value + * @property {number} REPARANDUM=53 REPARANDUM value + * @property {number} ROOT=54 ROOT value + * @property {number} SNUM=55 SNUM value + * @property {number} SUFF=56 SUFF value + * @property {number} TMOD=57 TMOD value + * @property {number} TOPIC=58 TOPIC value + * @property {number} VMOD=59 VMOD value + * @property {number} VOCATIVE=60 VOCATIVE value + * @property {number} XCOMP=61 XCOMP value + * @property {number} SUFFIX=62 SUFFIX value + * @property {number} TITLE=63 TITLE value + * @property {number} ADVPHMOD=64 ADVPHMOD value + * @property {number} AUXCAUS=65 AUXCAUS value + * @property {number} AUXVV=66 AUXVV value + * @property {number} DTMOD=67 DTMOD value + * @property {number} FOREIGN=68 FOREIGN value + * @property {number} KW=69 KW value + * @property {number} LIST=70 LIST value + * @property {number} NOMC=71 NOMC value + * @property {number} NOMCSUBJ=72 NOMCSUBJ value + * @property {number} NOMCSUBJPASS=73 NOMCSUBJPASS value + * @property {number} NUMC=74 NUMC value + * @property {number} COP=75 COP value + * @property {number} DISLOCATED=76 DISLOCATED value + * @property {number} ASP=77 ASP value + * @property {number} GMOD=78 GMOD value + * @property {number} GOBJ=79 GOBJ value + * @property {number} INFMOD=80 INFMOD value + * @property {number} MES=81 MES value + * @property {number} NCOMP=82 NCOMP value + */ + DependencyEdge.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ABBREV"] = 1; + values[valuesById[2] = "ACOMP"] = 2; + values[valuesById[3] = "ADVCL"] = 3; + values[valuesById[4] = "ADVMOD"] = 4; + values[valuesById[5] = "AMOD"] = 5; + values[valuesById[6] = "APPOS"] = 6; + values[valuesById[7] = "ATTR"] = 7; + values[valuesById[8] = "AUX"] = 8; + values[valuesById[9] = "AUXPASS"] = 9; + values[valuesById[10] = "CC"] = 10; + values[valuesById[11] = "CCOMP"] = 11; + values[valuesById[12] = "CONJ"] = 12; + values[valuesById[13] = "CSUBJ"] = 13; + values[valuesById[14] = "CSUBJPASS"] = 14; + values[valuesById[15] = "DEP"] = 15; + values[valuesById[16] = "DET"] = 16; + values[valuesById[17] = "DISCOURSE"] = 17; + values[valuesById[18] = "DOBJ"] = 18; + values[valuesById[19] = "EXPL"] = 19; + values[valuesById[20] = "GOESWITH"] = 20; + values[valuesById[21] = "IOBJ"] = 21; + values[valuesById[22] = "MARK"] = 22; + values[valuesById[23] = "MWE"] = 23; + values[valuesById[24] = "MWV"] = 24; + values[valuesById[25] = "NEG"] = 25; + values[valuesById[26] = "NN"] = 26; + values[valuesById[27] = "NPADVMOD"] = 27; + values[valuesById[28] = "NSUBJ"] = 28; + values[valuesById[29] = "NSUBJPASS"] = 29; + values[valuesById[30] = "NUM"] = 30; + values[valuesById[31] = "NUMBER"] = 31; + values[valuesById[32] = "P"] = 32; + values[valuesById[33] = "PARATAXIS"] = 33; + values[valuesById[34] = "PARTMOD"] = 34; + values[valuesById[35] = "PCOMP"] = 35; + values[valuesById[36] = "POBJ"] = 36; + values[valuesById[37] = "POSS"] = 37; + values[valuesById[38] = "POSTNEG"] = 38; + values[valuesById[39] = "PRECOMP"] = 39; + values[valuesById[40] = "PRECONJ"] = 40; + values[valuesById[41] = "PREDET"] = 41; + values[valuesById[42] = "PREF"] = 42; + values[valuesById[43] = "PREP"] = 43; + values[valuesById[44] = "PRONL"] = 44; + values[valuesById[45] = "PRT"] = 45; + values[valuesById[46] = "PS"] = 46; + values[valuesById[47] = "QUANTMOD"] = 47; + values[valuesById[48] = "RCMOD"] = 48; + values[valuesById[49] = "RCMODREL"] = 49; + values[valuesById[50] = "RDROP"] = 50; + values[valuesById[51] = "REF"] = 51; + values[valuesById[52] = "REMNANT"] = 52; + values[valuesById[53] = "REPARANDUM"] = 53; + values[valuesById[54] = "ROOT"] = 54; + values[valuesById[55] = "SNUM"] = 55; + values[valuesById[56] = "SUFF"] = 56; + values[valuesById[57] = "TMOD"] = 57; + values[valuesById[58] = "TOPIC"] = 58; + values[valuesById[59] = "VMOD"] = 59; + values[valuesById[60] = "VOCATIVE"] = 60; + values[valuesById[61] = "XCOMP"] = 61; + values[valuesById[62] = "SUFFIX"] = 62; + values[valuesById[63] = "TITLE"] = 63; + values[valuesById[64] = "ADVPHMOD"] = 64; + values[valuesById[65] = "AUXCAUS"] = 65; + values[valuesById[66] = "AUXVV"] = 66; + values[valuesById[67] = "DTMOD"] = 67; + values[valuesById[68] = "FOREIGN"] = 68; + values[valuesById[69] = "KW"] = 69; + values[valuesById[70] = "LIST"] = 70; + values[valuesById[71] = "NOMC"] = 71; + values[valuesById[72] = "NOMCSUBJ"] = 72; + values[valuesById[73] = "NOMCSUBJPASS"] = 73; + values[valuesById[74] = "NUMC"] = 74; + values[valuesById[75] = "COP"] = 75; + values[valuesById[76] = "DISLOCATED"] = 76; + values[valuesById[77] = "ASP"] = 77; + values[valuesById[78] = "GMOD"] = 78; + values[valuesById[79] = "GOBJ"] = 79; + values[valuesById[80] = "INFMOD"] = 80; + values[valuesById[81] = "MES"] = 81; + values[valuesById[82] = "NCOMP"] = 82; + return values; + })(); + + return DependencyEdge; + })(); + + v1beta2.EntityMention = (function() { + + /** + * Properties of an EntityMention. + * @memberof google.cloud.language.v1beta2 + * @interface IEntityMention + * @property {google.cloud.language.v1beta2.ITextSpan|null} [text] EntityMention text + * @property {google.cloud.language.v1beta2.EntityMention.Type|null} [type] EntityMention type + * @property {google.cloud.language.v1beta2.ISentiment|null} [sentiment] EntityMention sentiment + */ + + /** + * Constructs a new EntityMention. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an EntityMention. + * @implements IEntityMention + * @constructor + * @param {google.cloud.language.v1beta2.IEntityMention=} [properties] Properties to set + */ + function EntityMention(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityMention text. + * @member {google.cloud.language.v1beta2.ITextSpan|null|undefined} text + * @memberof google.cloud.language.v1beta2.EntityMention + * @instance + */ + EntityMention.prototype.text = null; + + /** + * EntityMention type. + * @member {google.cloud.language.v1beta2.EntityMention.Type} type + * @memberof google.cloud.language.v1beta2.EntityMention + * @instance + */ + EntityMention.prototype.type = 0; + + /** + * EntityMention sentiment. + * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} sentiment + * @memberof google.cloud.language.v1beta2.EntityMention + * @instance + */ + EntityMention.prototype.sentiment = null; + + /** + * Creates a new EntityMention instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {google.cloud.language.v1beta2.IEntityMention=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention instance + */ + EntityMention.create = function create(properties) { + return new EntityMention(properties); + }; + + /** + * Encodes the specified EntityMention message. Does not implicitly {@link google.cloud.language.v1beta2.EntityMention.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {google.cloud.language.v1beta2.IEntityMention} message EntityMention message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMention.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.hasOwnProperty("text")) + $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EntityMention message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.EntityMention.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {google.cloud.language.v1beta2.IEntityMention} message EntityMention message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMention.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityMention message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMention.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.EntityMention(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); + break; + case 2: + message.type = reader.int32(); + break; + case 3: + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityMention message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMention.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityMention message. + * @function verify + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityMention.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.language.v1beta2.TextSpan.verify(message.text); + if (error) + return "text." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates an EntityMention message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention + */ + EntityMention.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.EntityMention) + return object; + var message = new $root.google.cloud.language.v1beta2.EntityMention(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.language.v1beta2.EntityMention.text: object expected"); + message.text = $root.google.cloud.language.v1beta2.TextSpan.fromObject(object.text); + } + switch (object.type) { + case "TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "PROPER": + case 1: + message.type = 1; + break; + case "COMMON": + case 2: + message.type = 2; + break; + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.language.v1beta2.EntityMention.sentiment: object expected"); + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from an EntityMention message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {google.cloud.language.v1beta2.EntityMention} message EntityMention + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityMention.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = null; + object.type = options.enums === String ? "TYPE_UNKNOWN" : 0; + object.sentiment = null; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.language.v1beta2.TextSpan.toObject(message.text, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.language.v1beta2.EntityMention.Type[message.type] : message.type; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this EntityMention to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.EntityMention + * @instance + * @returns {Object.} JSON object + */ + EntityMention.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.language.v1beta2.EntityMention.Type + * @enum {string} + * @property {number} TYPE_UNKNOWN=0 TYPE_UNKNOWN value + * @property {number} PROPER=1 PROPER value + * @property {number} COMMON=2 COMMON value + */ + EntityMention.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "PROPER"] = 1; + values[valuesById[2] = "COMMON"] = 2; + return values; + })(); + + return EntityMention; + })(); + + v1beta2.TextSpan = (function() { + + /** + * Properties of a TextSpan. + * @memberof google.cloud.language.v1beta2 + * @interface ITextSpan + * @property {string|null} [content] TextSpan content + * @property {number|null} [beginOffset] TextSpan beginOffset + */ + + /** + * Constructs a new TextSpan. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a TextSpan. + * @implements ITextSpan + * @constructor + * @param {google.cloud.language.v1beta2.ITextSpan=} [properties] Properties to set + */ + function TextSpan(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextSpan content. + * @member {string} content + * @memberof google.cloud.language.v1beta2.TextSpan + * @instance + */ + TextSpan.prototype.content = ""; + + /** + * TextSpan beginOffset. + * @member {number} beginOffset + * @memberof google.cloud.language.v1beta2.TextSpan + * @instance + */ + TextSpan.prototype.beginOffset = 0; + + /** + * Creates a new TextSpan instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {google.cloud.language.v1beta2.ITextSpan=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan instance + */ + TextSpan.create = function create(properties) { + return new TextSpan(properties); + }; + + /** + * Encodes the specified TextSpan message. Does not implicitly {@link google.cloud.language.v1beta2.TextSpan.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {google.cloud.language.v1beta2.ITextSpan} message TextSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSpan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.beginOffset); + return writer; + }; + + /** + * Encodes the specified TextSpan message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.TextSpan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {google.cloud.language.v1beta2.ITextSpan} message TextSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSpan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextSpan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSpan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.TextSpan(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = reader.string(); + break; + case 2: + message.beginOffset = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextSpan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSpan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextSpan message. + * @function verify + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextSpan.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + if (!$util.isInteger(message.beginOffset)) + return "beginOffset: integer expected"; + return null; + }; + + /** + * Creates a TextSpan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan + */ + TextSpan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.TextSpan) + return object; + var message = new $root.google.cloud.language.v1beta2.TextSpan(); + if (object.content != null) + message.content = String(object.content); + if (object.beginOffset != null) + message.beginOffset = object.beginOffset | 0; + return message; + }; + + /** + * Creates a plain object from a TextSpan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {google.cloud.language.v1beta2.TextSpan} message TextSpan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextSpan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.beginOffset = 0; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + object.beginOffset = message.beginOffset; + return object; + }; + + /** + * Converts this TextSpan to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.TextSpan + * @instance + * @returns {Object.} JSON object + */ + TextSpan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextSpan; + })(); + + v1beta2.ClassificationCategory = (function() { + + /** + * Properties of a ClassificationCategory. + * @memberof google.cloud.language.v1beta2 + * @interface IClassificationCategory + * @property {string|null} [name] ClassificationCategory name + * @property {number|null} [confidence] ClassificationCategory confidence + */ + + /** + * Constructs a new ClassificationCategory. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a ClassificationCategory. + * @implements IClassificationCategory + * @constructor + * @param {google.cloud.language.v1beta2.IClassificationCategory=} [properties] Properties to set + */ + function ClassificationCategory(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClassificationCategory name. + * @member {string} name + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @instance + */ + ClassificationCategory.prototype.name = ""; + + /** + * ClassificationCategory confidence. + * @member {number} confidence + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @instance + */ + ClassificationCategory.prototype.confidence = 0; + + /** + * Creates a new ClassificationCategory instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @static + * @param {google.cloud.language.v1beta2.IClassificationCategory=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory instance + */ + ClassificationCategory.create = function create(properties) { + return new ClassificationCategory(properties); + }; + + /** + * Encodes the specified ClassificationCategory message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationCategory.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @static + * @param {google.cloud.language.v1beta2.IClassificationCategory} message ClassificationCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassificationCategory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.confidence != null && message.hasOwnProperty("confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified ClassificationCategory message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationCategory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @static + * @param {google.cloud.language.v1beta2.IClassificationCategory} message ClassificationCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassificationCategory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClassificationCategory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassificationCategory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.ClassificationCategory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.confidence = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClassificationCategory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassificationCategory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClassificationCategory message. + * @function verify + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClassificationCategory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + return null; + }; + + /** + * Creates a ClassificationCategory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory + */ + ClassificationCategory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.ClassificationCategory) + return object; + var message = new $root.google.cloud.language.v1beta2.ClassificationCategory(); + if (object.name != null) + message.name = String(object.name); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a ClassificationCategory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @static + * @param {google.cloud.language.v1beta2.ClassificationCategory} message ClassificationCategory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClassificationCategory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.confidence = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + return object; + }; + + /** + * Converts this ClassificationCategory to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @instance + * @returns {Object.} JSON object + */ + ClassificationCategory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClassificationCategory; + })(); + + v1beta2.AnalyzeSentimentRequest = (function() { + + /** + * Properties of an AnalyzeSentimentRequest. + * @memberof google.cloud.language.v1beta2 + * @interface IAnalyzeSentimentRequest + * @property {google.cloud.language.v1beta2.IDocument|null} [document] AnalyzeSentimentRequest document + * @property {google.cloud.language.v1beta2.EncodingType|null} [encodingType] AnalyzeSentimentRequest encodingType + */ + + /** + * Constructs a new AnalyzeSentimentRequest. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnalyzeSentimentRequest. + * @implements IAnalyzeSentimentRequest + * @constructor + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest=} [properties] Properties to set + */ + function AnalyzeSentimentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeSentimentRequest document. + * @member {google.cloud.language.v1beta2.IDocument|null|undefined} document + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @instance + */ + AnalyzeSentimentRequest.prototype.document = null; + + /** + * AnalyzeSentimentRequest encodingType. + * @member {google.cloud.language.v1beta2.EncodingType} encodingType + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @instance + */ + AnalyzeSentimentRequest.prototype.encodingType = 0; + + /** + * Creates a new AnalyzeSentimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnalyzeSentimentRequest} AnalyzeSentimentRequest instance + */ + AnalyzeSentimentRequest.create = function create(properties) { + return new AnalyzeSentimentRequest(properties); + }; + + /** + * Encodes the specified AnalyzeSentimentRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSentimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest} message AnalyzeSentimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSentimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnalyzeSentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSentimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest} message AnalyzeSentimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSentimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnalyzeSentimentRequest} AnalyzeSentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSentimentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnalyzeSentimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + case 2: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnalyzeSentimentRequest} AnalyzeSentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSentimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeSentimentRequest message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeSentimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1beta2.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnalyzeSentimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnalyzeSentimentRequest} AnalyzeSentimentRequest + */ + AnalyzeSentimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnalyzeSentimentRequest) + return object; + var message = new $root.google.cloud.language.v1beta2.AnalyzeSentimentRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeSentimentRequest.document: object expected"); + message.document = $root.google.cloud.language.v1beta2.Document.fromObject(object.document); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeSentimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @static + * @param {google.cloud.language.v1beta2.AnalyzeSentimentRequest} message AnalyzeSentimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeSentimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1beta2.Document.toObject(message.document, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1beta2.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnalyzeSentimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @instance + * @returns {Object.} JSON object + */ + AnalyzeSentimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeSentimentRequest; + })(); + + v1beta2.AnalyzeSentimentResponse = (function() { + + /** + * Properties of an AnalyzeSentimentResponse. + * @memberof google.cloud.language.v1beta2 + * @interface IAnalyzeSentimentResponse + * @property {google.cloud.language.v1beta2.ISentiment|null} [documentSentiment] AnalyzeSentimentResponse documentSentiment + * @property {string|null} [language] AnalyzeSentimentResponse language + * @property {Array.|null} [sentences] AnalyzeSentimentResponse sentences + */ + + /** + * Constructs a new AnalyzeSentimentResponse. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnalyzeSentimentResponse. + * @implements IAnalyzeSentimentResponse + * @constructor + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentResponse=} [properties] Properties to set + */ + function AnalyzeSentimentResponse(properties) { + this.sentences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeSentimentResponse documentSentiment. + * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} documentSentiment + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @instance + */ + AnalyzeSentimentResponse.prototype.documentSentiment = null; + + /** + * AnalyzeSentimentResponse language. + * @member {string} language + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @instance + */ + AnalyzeSentimentResponse.prototype.language = ""; + + /** + * AnalyzeSentimentResponse sentences. + * @member {Array.} sentences + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @instance + */ + AnalyzeSentimentResponse.prototype.sentences = $util.emptyArray; + + /** + * Creates a new AnalyzeSentimentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnalyzeSentimentResponse} AnalyzeSentimentResponse instance + */ + AnalyzeSentimentResponse.create = function create(properties) { + return new AnalyzeSentimentResponse(properties); + }; + + /** + * Encodes the specified AnalyzeSentimentResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSentimentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentResponse} message AnalyzeSentimentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSentimentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + $root.google.cloud.language.v1beta2.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); + if (message.sentences != null && message.sentences.length) + for (var i = 0; i < message.sentences.length; ++i) + $root.google.cloud.language.v1beta2.Sentence.encode(message.sentences[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnalyzeSentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSentimentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentResponse} message AnalyzeSentimentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSentimentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnalyzeSentimentResponse} AnalyzeSentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSentimentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnalyzeSentimentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + case 2: + message.language = reader.string(); + break; + case 3: + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1beta2.Sentence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnalyzeSentimentResponse} AnalyzeSentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSentimentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeSentimentResponse message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeSentimentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) { + var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.documentSentiment); + if (error) + return "documentSentiment." + error; + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + if (message.sentences != null && message.hasOwnProperty("sentences")) { + if (!Array.isArray(message.sentences)) + return "sentences: array expected"; + for (var i = 0; i < message.sentences.length; ++i) { + var error = $root.google.cloud.language.v1beta2.Sentence.verify(message.sentences[i]); + if (error) + return "sentences." + error; + } + } + return null; + }; + + /** + * Creates an AnalyzeSentimentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnalyzeSentimentResponse} AnalyzeSentimentResponse + */ + AnalyzeSentimentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnalyzeSentimentResponse) + return object; + var message = new $root.google.cloud.language.v1beta2.AnalyzeSentimentResponse(); + if (object.documentSentiment != null) { + if (typeof object.documentSentiment !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeSentimentResponse.documentSentiment: object expected"); + message.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.documentSentiment); + } + if (object.language != null) + message.language = String(object.language); + if (object.sentences) { + if (!Array.isArray(object.sentences)) + throw TypeError(".google.cloud.language.v1beta2.AnalyzeSentimentResponse.sentences: array expected"); + message.sentences = []; + for (var i = 0; i < object.sentences.length; ++i) { + if (typeof object.sentences[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeSentimentResponse.sentences: object expected"); + message.sentences[i] = $root.google.cloud.language.v1beta2.Sentence.fromObject(object.sentences[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeSentimentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @static + * @param {google.cloud.language.v1beta2.AnalyzeSentimentResponse} message AnalyzeSentimentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeSentimentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sentences = []; + if (options.defaults) { + object.documentSentiment = null; + object.language = ""; + } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + object.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.documentSentiment, options); + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + if (message.sentences && message.sentences.length) { + object.sentences = []; + for (var j = 0; j < message.sentences.length; ++j) + object.sentences[j] = $root.google.cloud.language.v1beta2.Sentence.toObject(message.sentences[j], options); + } + return object; + }; + + /** + * Converts this AnalyzeSentimentResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @instance + * @returns {Object.} JSON object + */ + AnalyzeSentimentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeSentimentResponse; + })(); + + v1beta2.AnalyzeEntitySentimentRequest = (function() { + + /** + * Properties of an AnalyzeEntitySentimentRequest. + * @memberof google.cloud.language.v1beta2 + * @interface IAnalyzeEntitySentimentRequest + * @property {google.cloud.language.v1beta2.IDocument|null} [document] AnalyzeEntitySentimentRequest document + * @property {google.cloud.language.v1beta2.EncodingType|null} [encodingType] AnalyzeEntitySentimentRequest encodingType + */ + + /** + * Constructs a new AnalyzeEntitySentimentRequest. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnalyzeEntitySentimentRequest. + * @implements IAnalyzeEntitySentimentRequest + * @constructor + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest=} [properties] Properties to set + */ + function AnalyzeEntitySentimentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeEntitySentimentRequest document. + * @member {google.cloud.language.v1beta2.IDocument|null|undefined} document + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @instance + */ + AnalyzeEntitySentimentRequest.prototype.document = null; + + /** + * AnalyzeEntitySentimentRequest encodingType. + * @member {google.cloud.language.v1beta2.EncodingType} encodingType + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @instance + */ + AnalyzeEntitySentimentRequest.prototype.encodingType = 0; + + /** + * Creates a new AnalyzeEntitySentimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest instance + */ + AnalyzeEntitySentimentRequest.create = function create(properties) { + return new AnalyzeEntitySentimentRequest(properties); + }; + + /** + * Encodes the specified AnalyzeEntitySentimentRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitySentimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnalyzeEntitySentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitySentimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitySentimentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + case 2: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitySentimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeEntitySentimentRequest message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeEntitySentimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1beta2.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnalyzeEntitySentimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest + */ + AnalyzeEntitySentimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest) + return object; + var message = new $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest.document: object expected"); + message.document = $root.google.cloud.language.v1beta2.Document.fromObject(object.document); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeEntitySentimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @static + * @param {google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeEntitySentimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1beta2.Document.toObject(message.document, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1beta2.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnalyzeEntitySentimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @instance + * @returns {Object.} JSON object + */ + AnalyzeEntitySentimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeEntitySentimentRequest; + })(); + + v1beta2.AnalyzeEntitySentimentResponse = (function() { + + /** + * Properties of an AnalyzeEntitySentimentResponse. + * @memberof google.cloud.language.v1beta2 + * @interface IAnalyzeEntitySentimentResponse + * @property {Array.|null} [entities] AnalyzeEntitySentimentResponse entities + * @property {string|null} [language] AnalyzeEntitySentimentResponse language + */ + + /** + * Constructs a new AnalyzeEntitySentimentResponse. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnalyzeEntitySentimentResponse. + * @implements IAnalyzeEntitySentimentResponse + * @constructor + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse=} [properties] Properties to set + */ + function AnalyzeEntitySentimentResponse(properties) { + this.entities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeEntitySentimentResponse entities. + * @member {Array.} entities + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @instance + */ + AnalyzeEntitySentimentResponse.prototype.entities = $util.emptyArray; + + /** + * AnalyzeEntitySentimentResponse language. + * @member {string} language + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @instance + */ + AnalyzeEntitySentimentResponse.prototype.language = ""; + + /** + * Creates a new AnalyzeEntitySentimentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse instance + */ + AnalyzeEntitySentimentResponse.create = function create(properties) { + return new AnalyzeEntitySentimentResponse(properties); + }; + + /** + * Encodes the specified AnalyzeEntitySentimentResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitySentimentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.language.v1beta2.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); + return writer; + }; + + /** + * Encodes the specified AnalyzeEntitySentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitySentimentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitySentimentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1beta2.Entity.decode(reader, reader.uint32())); + break; + case 2: + message.language = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitySentimentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeEntitySentimentResponse message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeEntitySentimentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.language.v1beta2.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + return null; + }; + + /** + * Creates an AnalyzeEntitySentimentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse + */ + AnalyzeEntitySentimentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse) + return object; + var message = new $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.language.v1beta2.Entity.fromObject(object.entities[i]); + } + } + if (object.language != null) + message.language = String(object.language); + return message; + }; + + /** + * Creates a plain object from an AnalyzeEntitySentimentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @static + * @param {google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeEntitySentimentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) + object.language = ""; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.language.v1beta2.Entity.toObject(message.entities[j], options); + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + return object; + }; + + /** + * Converts this AnalyzeEntitySentimentResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @instance + * @returns {Object.} JSON object + */ + AnalyzeEntitySentimentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeEntitySentimentResponse; + })(); + + v1beta2.AnalyzeEntitiesRequest = (function() { + + /** + * Properties of an AnalyzeEntitiesRequest. + * @memberof google.cloud.language.v1beta2 + * @interface IAnalyzeEntitiesRequest + * @property {google.cloud.language.v1beta2.IDocument|null} [document] AnalyzeEntitiesRequest document + * @property {google.cloud.language.v1beta2.EncodingType|null} [encodingType] AnalyzeEntitiesRequest encodingType + */ + + /** + * Constructs a new AnalyzeEntitiesRequest. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnalyzeEntitiesRequest. + * @implements IAnalyzeEntitiesRequest + * @constructor + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest=} [properties] Properties to set + */ + function AnalyzeEntitiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeEntitiesRequest document. + * @member {google.cloud.language.v1beta2.IDocument|null|undefined} document + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @instance + */ + AnalyzeEntitiesRequest.prototype.document = null; + + /** + * AnalyzeEntitiesRequest encodingType. + * @member {google.cloud.language.v1beta2.EncodingType} encodingType + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @instance + */ + AnalyzeEntitiesRequest.prototype.encodingType = 0; + + /** + * Creates a new AnalyzeEntitiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest instance + */ + AnalyzeEntitiesRequest.create = function create(properties) { + return new AnalyzeEntitiesRequest(properties); + }; + + /** + * Encodes the specified AnalyzeEntitiesRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest} message AnalyzeEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnalyzeEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest} message AnalyzeEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnalyzeEntitiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + case 2: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeEntitiesRequest message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeEntitiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1beta2.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnalyzeEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest + */ + AnalyzeEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnalyzeEntitiesRequest) + return object; + var message = new $root.google.cloud.language.v1beta2.AnalyzeEntitiesRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeEntitiesRequest.document: object expected"); + message.document = $root.google.cloud.language.v1beta2.Document.fromObject(object.document); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeEntitiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @static + * @param {google.cloud.language.v1beta2.AnalyzeEntitiesRequest} message AnalyzeEntitiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeEntitiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1beta2.Document.toObject(message.document, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1beta2.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnalyzeEntitiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @instance + * @returns {Object.} JSON object + */ + AnalyzeEntitiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeEntitiesRequest; + })(); + + v1beta2.AnalyzeEntitiesResponse = (function() { + + /** + * Properties of an AnalyzeEntitiesResponse. + * @memberof google.cloud.language.v1beta2 + * @interface IAnalyzeEntitiesResponse + * @property {Array.|null} [entities] AnalyzeEntitiesResponse entities + * @property {string|null} [language] AnalyzeEntitiesResponse language + */ + + /** + * Constructs a new AnalyzeEntitiesResponse. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnalyzeEntitiesResponse. + * @implements IAnalyzeEntitiesResponse + * @constructor + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesResponse=} [properties] Properties to set + */ + function AnalyzeEntitiesResponse(properties) { + this.entities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeEntitiesResponse entities. + * @member {Array.} entities + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @instance + */ + AnalyzeEntitiesResponse.prototype.entities = $util.emptyArray; + + /** + * AnalyzeEntitiesResponse language. + * @member {string} language + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @instance + */ + AnalyzeEntitiesResponse.prototype.language = ""; + + /** + * Creates a new AnalyzeEntitiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse instance + */ + AnalyzeEntitiesResponse.create = function create(properties) { + return new AnalyzeEntitiesResponse(properties); + }; + + /** + * Encodes the specified AnalyzeEntitiesResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesResponse} message AnalyzeEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.language.v1beta2.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); + return writer; + }; + + /** + * Encodes the specified AnalyzeEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesResponse} message AnalyzeEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnalyzeEntitiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1beta2.Entity.decode(reader, reader.uint32())); + break; + case 2: + message.language = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeEntitiesResponse message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeEntitiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.language.v1beta2.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + return null; + }; + + /** + * Creates an AnalyzeEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse + */ + AnalyzeEntitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnalyzeEntitiesResponse) + return object; + var message = new $root.google.cloud.language.v1beta2.AnalyzeEntitiesResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.language.v1beta2.AnalyzeEntitiesResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeEntitiesResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.language.v1beta2.Entity.fromObject(object.entities[i]); + } + } + if (object.language != null) + message.language = String(object.language); + return message; + }; + + /** + * Creates a plain object from an AnalyzeEntitiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @static + * @param {google.cloud.language.v1beta2.AnalyzeEntitiesResponse} message AnalyzeEntitiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeEntitiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) + object.language = ""; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.language.v1beta2.Entity.toObject(message.entities[j], options); + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + return object; + }; + + /** + * Converts this AnalyzeEntitiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @instance + * @returns {Object.} JSON object + */ + AnalyzeEntitiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeEntitiesResponse; + })(); + + v1beta2.AnalyzeSyntaxRequest = (function() { + + /** + * Properties of an AnalyzeSyntaxRequest. + * @memberof google.cloud.language.v1beta2 + * @interface IAnalyzeSyntaxRequest + * @property {google.cloud.language.v1beta2.IDocument|null} [document] AnalyzeSyntaxRequest document + * @property {google.cloud.language.v1beta2.EncodingType|null} [encodingType] AnalyzeSyntaxRequest encodingType + */ + + /** + * Constructs a new AnalyzeSyntaxRequest. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnalyzeSyntaxRequest. + * @implements IAnalyzeSyntaxRequest + * @constructor + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest=} [properties] Properties to set + */ + function AnalyzeSyntaxRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeSyntaxRequest document. + * @member {google.cloud.language.v1beta2.IDocument|null|undefined} document + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @instance + */ + AnalyzeSyntaxRequest.prototype.document = null; + + /** + * AnalyzeSyntaxRequest encodingType. + * @member {google.cloud.language.v1beta2.EncodingType} encodingType + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @instance + */ + AnalyzeSyntaxRequest.prototype.encodingType = 0; + + /** + * Creates a new AnalyzeSyntaxRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest instance + */ + AnalyzeSyntaxRequest.create = function create(properties) { + return new AnalyzeSyntaxRequest(properties); + }; + + /** + * Encodes the specified AnalyzeSyntaxRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSyntaxRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest} message AnalyzeSyntaxRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSyntaxRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnalyzeSyntaxRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSyntaxRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest} message AnalyzeSyntaxRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSyntaxRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSyntaxRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnalyzeSyntaxRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + case 2: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSyntaxRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeSyntaxRequest message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeSyntaxRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1beta2.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnalyzeSyntaxRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest + */ + AnalyzeSyntaxRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnalyzeSyntaxRequest) + return object; + var message = new $root.google.cloud.language.v1beta2.AnalyzeSyntaxRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeSyntaxRequest.document: object expected"); + message.document = $root.google.cloud.language.v1beta2.Document.fromObject(object.document); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeSyntaxRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @static + * @param {google.cloud.language.v1beta2.AnalyzeSyntaxRequest} message AnalyzeSyntaxRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeSyntaxRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1beta2.Document.toObject(message.document, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1beta2.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnalyzeSyntaxRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @instance + * @returns {Object.} JSON object + */ + AnalyzeSyntaxRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeSyntaxRequest; + })(); + + v1beta2.AnalyzeSyntaxResponse = (function() { + + /** + * Properties of an AnalyzeSyntaxResponse. + * @memberof google.cloud.language.v1beta2 + * @interface IAnalyzeSyntaxResponse + * @property {Array.|null} [sentences] AnalyzeSyntaxResponse sentences + * @property {Array.|null} [tokens] AnalyzeSyntaxResponse tokens + * @property {string|null} [language] AnalyzeSyntaxResponse language + */ + + /** + * Constructs a new AnalyzeSyntaxResponse. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnalyzeSyntaxResponse. + * @implements IAnalyzeSyntaxResponse + * @constructor + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxResponse=} [properties] Properties to set + */ + function AnalyzeSyntaxResponse(properties) { + this.sentences = []; + this.tokens = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeSyntaxResponse sentences. + * @member {Array.} sentences + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @instance + */ + AnalyzeSyntaxResponse.prototype.sentences = $util.emptyArray; + + /** + * AnalyzeSyntaxResponse tokens. + * @member {Array.} tokens + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @instance + */ + AnalyzeSyntaxResponse.prototype.tokens = $util.emptyArray; + + /** + * AnalyzeSyntaxResponse language. + * @member {string} language + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @instance + */ + AnalyzeSyntaxResponse.prototype.language = ""; + + /** + * Creates a new AnalyzeSyntaxResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse instance + */ + AnalyzeSyntaxResponse.create = function create(properties) { + return new AnalyzeSyntaxResponse(properties); + }; + + /** + * Encodes the specified AnalyzeSyntaxResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxResponse} message AnalyzeSyntaxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSyntaxResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sentences != null && message.sentences.length) + for (var i = 0; i < message.sentences.length; ++i) + $root.google.cloud.language.v1beta2.Sentence.encode(message.sentences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokens != null && message.tokens.length) + for (var i = 0; i < message.tokens.length; ++i) + $root.google.cloud.language.v1beta2.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.language); + return writer; + }; + + /** + * Encodes the specified AnalyzeSyntaxResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @static + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxResponse} message AnalyzeSyntaxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeSyntaxResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSyntaxResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnalyzeSyntaxResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1beta2.Sentence.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1beta2.Token.decode(reader, reader.uint32())); + break; + case 3: + message.language = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeSyntaxResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeSyntaxResponse message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeSyntaxResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sentences != null && message.hasOwnProperty("sentences")) { + if (!Array.isArray(message.sentences)) + return "sentences: array expected"; + for (var i = 0; i < message.sentences.length; ++i) { + var error = $root.google.cloud.language.v1beta2.Sentence.verify(message.sentences[i]); + if (error) + return "sentences." + error; + } + } + if (message.tokens != null && message.hasOwnProperty("tokens")) { + if (!Array.isArray(message.tokens)) + return "tokens: array expected"; + for (var i = 0; i < message.tokens.length; ++i) { + var error = $root.google.cloud.language.v1beta2.Token.verify(message.tokens[i]); + if (error) + return "tokens." + error; + } + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + return null; + }; + + /** + * Creates an AnalyzeSyntaxResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse + */ + AnalyzeSyntaxResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnalyzeSyntaxResponse) + return object; + var message = new $root.google.cloud.language.v1beta2.AnalyzeSyntaxResponse(); + if (object.sentences) { + if (!Array.isArray(object.sentences)) + throw TypeError(".google.cloud.language.v1beta2.AnalyzeSyntaxResponse.sentences: array expected"); + message.sentences = []; + for (var i = 0; i < object.sentences.length; ++i) { + if (typeof object.sentences[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeSyntaxResponse.sentences: object expected"); + message.sentences[i] = $root.google.cloud.language.v1beta2.Sentence.fromObject(object.sentences[i]); + } + } + if (object.tokens) { + if (!Array.isArray(object.tokens)) + throw TypeError(".google.cloud.language.v1beta2.AnalyzeSyntaxResponse.tokens: array expected"); + message.tokens = []; + for (var i = 0; i < object.tokens.length; ++i) { + if (typeof object.tokens[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnalyzeSyntaxResponse.tokens: object expected"); + message.tokens[i] = $root.google.cloud.language.v1beta2.Token.fromObject(object.tokens[i]); + } + } + if (object.language != null) + message.language = String(object.language); + return message; + }; + + /** + * Creates a plain object from an AnalyzeSyntaxResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @static + * @param {google.cloud.language.v1beta2.AnalyzeSyntaxResponse} message AnalyzeSyntaxResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeSyntaxResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sentences = []; + object.tokens = []; + } + if (options.defaults) + object.language = ""; + if (message.sentences && message.sentences.length) { + object.sentences = []; + for (var j = 0; j < message.sentences.length; ++j) + object.sentences[j] = $root.google.cloud.language.v1beta2.Sentence.toObject(message.sentences[j], options); + } + if (message.tokens && message.tokens.length) { + object.tokens = []; + for (var j = 0; j < message.tokens.length; ++j) + object.tokens[j] = $root.google.cloud.language.v1beta2.Token.toObject(message.tokens[j], options); + } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + return object; + }; + + /** + * Converts this AnalyzeSyntaxResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @instance + * @returns {Object.} JSON object + */ + AnalyzeSyntaxResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnalyzeSyntaxResponse; + })(); + + v1beta2.ClassifyTextRequest = (function() { + + /** + * Properties of a ClassifyTextRequest. + * @memberof google.cloud.language.v1beta2 + * @interface IClassifyTextRequest + * @property {google.cloud.language.v1beta2.IDocument|null} [document] ClassifyTextRequest document + */ + + /** + * Constructs a new ClassifyTextRequest. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a ClassifyTextRequest. + * @implements IClassifyTextRequest + * @constructor + * @param {google.cloud.language.v1beta2.IClassifyTextRequest=} [properties] Properties to set + */ + function ClassifyTextRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClassifyTextRequest document. + * @member {google.cloud.language.v1beta2.IDocument|null|undefined} document + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @instance + */ + ClassifyTextRequest.prototype.document = null; + + /** + * Creates a new ClassifyTextRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @static + * @param {google.cloud.language.v1beta2.IClassifyTextRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.ClassifyTextRequest} ClassifyTextRequest instance + */ + ClassifyTextRequest.create = function create(properties) { + return new ClassifyTextRequest(properties); + }; + + /** + * Encodes the specified ClassifyTextRequest message. Does not implicitly {@link google.cloud.language.v1beta2.ClassifyTextRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @static + * @param {google.cloud.language.v1beta2.IClassifyTextRequest} message ClassifyTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClassifyTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassifyTextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @static + * @param {google.cloud.language.v1beta2.IClassifyTextRequest} message ClassifyTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClassifyTextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.ClassifyTextRequest} ClassifyTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.ClassifyTextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClassifyTextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.ClassifyTextRequest} ClassifyTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClassifyTextRequest message. + * @function verify + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClassifyTextRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1beta2.Document.verify(message.document); + if (error) + return "document." + error; + } + return null; + }; + + /** + * Creates a ClassifyTextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.ClassifyTextRequest} ClassifyTextRequest + */ + ClassifyTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.ClassifyTextRequest) + return object; + var message = new $root.google.cloud.language.v1beta2.ClassifyTextRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1beta2.ClassifyTextRequest.document: object expected"); + message.document = $root.google.cloud.language.v1beta2.Document.fromObject(object.document); + } + return message; + }; + + /** + * Creates a plain object from a ClassifyTextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @static + * @param {google.cloud.language.v1beta2.ClassifyTextRequest} message ClassifyTextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClassifyTextRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.document = null; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1beta2.Document.toObject(message.document, options); + return object; + }; + + /** + * Converts this ClassifyTextRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @instance + * @returns {Object.} JSON object + */ + ClassifyTextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClassifyTextRequest; + })(); + + v1beta2.ClassifyTextResponse = (function() { + + /** + * Properties of a ClassifyTextResponse. + * @memberof google.cloud.language.v1beta2 + * @interface IClassifyTextResponse + * @property {Array.|null} [categories] ClassifyTextResponse categories + */ + + /** + * Constructs a new ClassifyTextResponse. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a ClassifyTextResponse. + * @implements IClassifyTextResponse + * @constructor + * @param {google.cloud.language.v1beta2.IClassifyTextResponse=} [properties] Properties to set + */ + function ClassifyTextResponse(properties) { + this.categories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClassifyTextResponse categories. + * @member {Array.} categories + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @instance + */ + ClassifyTextResponse.prototype.categories = $util.emptyArray; + + /** + * Creates a new ClassifyTextResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1beta2.IClassifyTextResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.ClassifyTextResponse} ClassifyTextResponse instance + */ + ClassifyTextResponse.create = function create(properties) { + return new ClassifyTextResponse(properties); + }; + + /** + * Encodes the specified ClassifyTextResponse message. Does not implicitly {@link google.cloud.language.v1beta2.ClassifyTextResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1beta2.IClassifyTextResponse} message ClassifyTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.language.v1beta2.ClassificationCategory.encode(message.categories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClassifyTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassifyTextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1beta2.IClassifyTextResponse} message ClassifyTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.ClassifyTextResponse} ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.ClassifyTextResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1beta2.ClassificationCategory.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.ClassifyTextResponse} ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClassifyTextResponse message. + * @function verify + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClassifyTextResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.language.v1beta2.ClassificationCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } + return null; + }; + + /** + * Creates a ClassifyTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.ClassifyTextResponse} ClassifyTextResponse + */ + ClassifyTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.ClassifyTextResponse) + return object; + var message = new $root.google.cloud.language.v1beta2.ClassifyTextResponse(); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.language.v1beta2.ClassifyTextResponse.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.ClassifyTextResponse.categories: object expected"); + message.categories[i] = $root.google.cloud.language.v1beta2.ClassificationCategory.fromObject(object.categories[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ClassifyTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1beta2.ClassifyTextResponse} message ClassifyTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClassifyTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.categories = []; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.language.v1beta2.ClassificationCategory.toObject(message.categories[j], options); + } + return object; + }; + + /** + * Converts this ClassifyTextResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @instance + * @returns {Object.} JSON object + */ + ClassifyTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClassifyTextResponse; + })(); + + v1beta2.AnnotateTextRequest = (function() { + + /** + * Properties of an AnnotateTextRequest. + * @memberof google.cloud.language.v1beta2 + * @interface IAnnotateTextRequest + * @property {google.cloud.language.v1beta2.IDocument|null} [document] AnnotateTextRequest document + * @property {google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures|null} [features] AnnotateTextRequest features + * @property {google.cloud.language.v1beta2.EncodingType|null} [encodingType] AnnotateTextRequest encodingType + */ + + /** + * Constructs a new AnnotateTextRequest. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnnotateTextRequest. + * @implements IAnnotateTextRequest + * @constructor + * @param {google.cloud.language.v1beta2.IAnnotateTextRequest=} [properties] Properties to set + */ + function AnnotateTextRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnnotateTextRequest document. + * @member {google.cloud.language.v1beta2.IDocument|null|undefined} document + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @instance + */ + AnnotateTextRequest.prototype.document = null; + + /** + * AnnotateTextRequest features. + * @member {google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures|null|undefined} features + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @instance + */ + AnnotateTextRequest.prototype.features = null; + + /** + * AnnotateTextRequest encodingType. + * @member {google.cloud.language.v1beta2.EncodingType} encodingType + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @instance + */ + AnnotateTextRequest.prototype.encodingType = 0; + + /** + * Creates a new AnnotateTextRequest instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @static + * @param {google.cloud.language.v1beta2.IAnnotateTextRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnnotateTextRequest} AnnotateTextRequest instance + */ + AnnotateTextRequest.create = function create(properties) { + return new AnnotateTextRequest(properties); + }; + + /** + * Encodes the specified AnnotateTextRequest message. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @static + * @param {google.cloud.language.v1beta2.IAnnotateTextRequest} message AnnotateTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotateTextRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.document != null && message.hasOwnProperty("document")) + $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.features != null && message.hasOwnProperty("features")) + $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encodingType); + return writer; + }; + + /** + * Encodes the specified AnnotateTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @static + * @param {google.cloud.language.v1beta2.IAnnotateTextRequest} message AnnotateTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotateTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnnotateTextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnnotateTextRequest} AnnotateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotateTextRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnnotateTextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + case 2: + message.features = $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features.decode(reader, reader.uint32()); + break; + case 3: + message.encodingType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnnotateTextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnnotateTextRequest} AnnotateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotateTextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnnotateTextRequest message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnnotateTextRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1beta2.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features.verify(message.features); + if (error) + return "features." + error; + } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AnnotateTextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnnotateTextRequest} AnnotateTextRequest + */ + AnnotateTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnnotateTextRequest) + return object; + var message = new $root.google.cloud.language.v1beta2.AnnotateTextRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextRequest.document: object expected"); + message.document = $root.google.cloud.language.v1beta2.Document.fromObject(object.document); + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextRequest.features: object expected"); + message.features = $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features.fromObject(object.features); + } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnnotateTextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @static + * @param {google.cloud.language.v1beta2.AnnotateTextRequest} message AnnotateTextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnnotateTextRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.document = null; + object.features = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1beta2.Document.toObject(message.document, options); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features.toObject(message.features, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1beta2.EncodingType[message.encodingType] : message.encodingType; + return object; + }; + + /** + * Converts this AnnotateTextRequest to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @instance + * @returns {Object.} JSON object + */ + AnnotateTextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + AnnotateTextRequest.Features = (function() { + + /** + * Properties of a Features. + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @interface IFeatures + * @property {boolean|null} [extractSyntax] Features extractSyntax + * @property {boolean|null} [extractEntities] Features extractEntities + * @property {boolean|null} [extractDocumentSentiment] Features extractDocumentSentiment + * @property {boolean|null} [extractEntitySentiment] Features extractEntitySentiment + * @property {boolean|null} [classifyText] Features classifyText + */ + + /** + * Constructs a new Features. + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @classdesc Represents a Features. + * @implements IFeatures + * @constructor + * @param {google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures=} [properties] Properties to set + */ + function Features(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Features extractSyntax. + * @member {boolean} extractSyntax + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractSyntax = false; + + /** + * Features extractEntities. + * @member {boolean} extractEntities + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractEntities = false; + + /** + * Features extractDocumentSentiment. + * @member {boolean} extractDocumentSentiment + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractDocumentSentiment = false; + + /** + * Features extractEntitySentiment. + * @member {boolean} extractEntitySentiment + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractEntitySentiment = false; + + /** + * Features classifyText. + * @member {boolean} classifyText + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.classifyText = false; + + /** + * Creates a new Features instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnnotateTextRequest.Features} Features instance + */ + Features.create = function create(properties) { + return new Features(properties); + }; + + /** + * Encodes the specified Features message. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextRequest.Features.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures} message Features message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Features.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.extractSyntax); + if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.extractEntities); + if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.extractDocumentSentiment); + if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.extractEntitySentiment); + if (message.classifyText != null && message.hasOwnProperty("classifyText")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.classifyText); + return writer; + }; + + /** + * Encodes the specified Features message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextRequest.Features.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures} message Features message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Features.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Features message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnnotateTextRequest.Features} Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Features.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.extractSyntax = reader.bool(); + break; + case 2: + message.extractEntities = reader.bool(); + break; + case 3: + message.extractDocumentSentiment = reader.bool(); + break; + case 4: + message.extractEntitySentiment = reader.bool(); + break; + case 6: + message.classifyText = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Features message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnnotateTextRequest.Features} Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Features.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Features message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Features.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + if (typeof message.extractSyntax !== "boolean") + return "extractSyntax: boolean expected"; + if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + if (typeof message.extractEntities !== "boolean") + return "extractEntities: boolean expected"; + if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + if (typeof message.extractDocumentSentiment !== "boolean") + return "extractDocumentSentiment: boolean expected"; + if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + if (typeof message.extractEntitySentiment !== "boolean") + return "extractEntitySentiment: boolean expected"; + if (message.classifyText != null && message.hasOwnProperty("classifyText")) + if (typeof message.classifyText !== "boolean") + return "classifyText: boolean expected"; + return null; + }; + + /** + * Creates a Features message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnnotateTextRequest.Features} Features + */ + Features.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features) + return object; + var message = new $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features(); + if (object.extractSyntax != null) + message.extractSyntax = Boolean(object.extractSyntax); + if (object.extractEntities != null) + message.extractEntities = Boolean(object.extractEntities); + if (object.extractDocumentSentiment != null) + message.extractDocumentSentiment = Boolean(object.extractDocumentSentiment); + if (object.extractEntitySentiment != null) + message.extractEntitySentiment = Boolean(object.extractEntitySentiment); + if (object.classifyText != null) + message.classifyText = Boolean(object.classifyText); + return message; + }; + + /** + * Creates a plain object from a Features message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1beta2.AnnotateTextRequest.Features} message Features + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Features.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.extractSyntax = false; + object.extractEntities = false; + object.extractDocumentSentiment = false; + object.extractEntitySentiment = false; + object.classifyText = false; + } + if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + object.extractSyntax = message.extractSyntax; + if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + object.extractEntities = message.extractEntities; + if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + object.extractDocumentSentiment = message.extractDocumentSentiment; + if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + object.extractEntitySentiment = message.extractEntitySentiment; + if (message.classifyText != null && message.hasOwnProperty("classifyText")) + object.classifyText = message.classifyText; + return object; + }; + + /** + * Converts this Features to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @instance + * @returns {Object.} JSON object + */ + Features.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Features; + })(); + + return AnnotateTextRequest; + })(); + + v1beta2.AnnotateTextResponse = (function() { + + /** + * Properties of an AnnotateTextResponse. + * @memberof google.cloud.language.v1beta2 + * @interface IAnnotateTextResponse + * @property {Array.|null} [sentences] AnnotateTextResponse sentences + * @property {Array.|null} [tokens] AnnotateTextResponse tokens + * @property {Array.|null} [entities] AnnotateTextResponse entities + * @property {google.cloud.language.v1beta2.ISentiment|null} [documentSentiment] AnnotateTextResponse documentSentiment + * @property {string|null} [language] AnnotateTextResponse language + * @property {Array.|null} [categories] AnnotateTextResponse categories + */ + + /** + * Constructs a new AnnotateTextResponse. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an AnnotateTextResponse. + * @implements IAnnotateTextResponse + * @constructor + * @param {google.cloud.language.v1beta2.IAnnotateTextResponse=} [properties] Properties to set + */ + function AnnotateTextResponse(properties) { + this.sentences = []; + this.tokens = []; + this.entities = []; + this.categories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnnotateTextResponse sentences. + * @member {Array.} sentences + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.sentences = $util.emptyArray; + + /** + * AnnotateTextResponse tokens. + * @member {Array.} tokens + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.tokens = $util.emptyArray; + + /** + * AnnotateTextResponse entities. + * @member {Array.} entities + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.entities = $util.emptyArray; + + /** + * AnnotateTextResponse documentSentiment. + * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} documentSentiment + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.documentSentiment = null; + + /** + * AnnotateTextResponse language. + * @member {string} language + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.language = ""; + + /** + * AnnotateTextResponse categories. + * @member {Array.} categories + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @instance + */ + AnnotateTextResponse.prototype.categories = $util.emptyArray; + + /** + * Creates a new AnnotateTextResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @static + * @param {google.cloud.language.v1beta2.IAnnotateTextResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.AnnotateTextResponse} AnnotateTextResponse instance + */ + AnnotateTextResponse.create = function create(properties) { + return new AnnotateTextResponse(properties); + }; + + /** + * Encodes the specified AnnotateTextResponse message. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @static + * @param {google.cloud.language.v1beta2.IAnnotateTextResponse} message AnnotateTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotateTextResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sentences != null && message.sentences.length) + for (var i = 0; i < message.sentences.length; ++i) + $root.google.cloud.language.v1beta2.Sentence.encode(message.sentences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokens != null && message.tokens.length) + for (var i = 0; i < message.tokens.length; ++i) + $root.google.cloud.language.v1beta2.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.language.v1beta2.Entity.encode(message.entities[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + $root.google.cloud.language.v1beta2.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.language != null && message.hasOwnProperty("language")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.language); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.language.v1beta2.ClassificationCategory.encode(message.categories[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnnotateTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.AnnotateTextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @static + * @param {google.cloud.language.v1beta2.IAnnotateTextResponse} message AnnotateTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotateTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnnotateTextResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.AnnotateTextResponse} AnnotateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotateTextResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.AnnotateTextResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1beta2.Sentence.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1beta2.Token.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1beta2.Entity.decode(reader, reader.uint32())); + break; + case 4: + message.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + case 5: + message.language = reader.string(); + break; + case 6: + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1beta2.ClassificationCategory.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnnotateTextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.AnnotateTextResponse} AnnotateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotateTextResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnnotateTextResponse message. + * @function verify + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnnotateTextResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sentences != null && message.hasOwnProperty("sentences")) { + if (!Array.isArray(message.sentences)) + return "sentences: array expected"; + for (var i = 0; i < message.sentences.length; ++i) { + var error = $root.google.cloud.language.v1beta2.Sentence.verify(message.sentences[i]); + if (error) + return "sentences." + error; + } + } + if (message.tokens != null && message.hasOwnProperty("tokens")) { + if (!Array.isArray(message.tokens)) + return "tokens: array expected"; + for (var i = 0; i < message.tokens.length; ++i) { + var error = $root.google.cloud.language.v1beta2.Token.verify(message.tokens[i]); + if (error) + return "tokens." + error; + } + } + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.language.v1beta2.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) { + var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.documentSentiment); + if (error) + return "documentSentiment." + error; + } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.language.v1beta2.ClassificationCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } + return null; + }; + + /** + * Creates an AnnotateTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.AnnotateTextResponse} AnnotateTextResponse + */ + AnnotateTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.AnnotateTextResponse) + return object; + var message = new $root.google.cloud.language.v1beta2.AnnotateTextResponse(); + if (object.sentences) { + if (!Array.isArray(object.sentences)) + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextResponse.sentences: array expected"); + message.sentences = []; + for (var i = 0; i < object.sentences.length; ++i) { + if (typeof object.sentences[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextResponse.sentences: object expected"); + message.sentences[i] = $root.google.cloud.language.v1beta2.Sentence.fromObject(object.sentences[i]); + } + } + if (object.tokens) { + if (!Array.isArray(object.tokens)) + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextResponse.tokens: array expected"); + message.tokens = []; + for (var i = 0; i < object.tokens.length; ++i) { + if (typeof object.tokens[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextResponse.tokens: object expected"); + message.tokens[i] = $root.google.cloud.language.v1beta2.Token.fromObject(object.tokens[i]); + } + } + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.language.v1beta2.Entity.fromObject(object.entities[i]); + } + } + if (object.documentSentiment != null) { + if (typeof object.documentSentiment !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextResponse.documentSentiment: object expected"); + message.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.documentSentiment); + } + if (object.language != null) + message.language = String(object.language); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextResponse.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextResponse.categories: object expected"); + message.categories[i] = $root.google.cloud.language.v1beta2.ClassificationCategory.fromObject(object.categories[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AnnotateTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @static + * @param {google.cloud.language.v1beta2.AnnotateTextResponse} message AnnotateTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnnotateTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sentences = []; + object.tokens = []; + object.entities = []; + object.categories = []; + } + if (options.defaults) { + object.documentSentiment = null; + object.language = ""; + } + if (message.sentences && message.sentences.length) { + object.sentences = []; + for (var j = 0; j < message.sentences.length; ++j) + object.sentences[j] = $root.google.cloud.language.v1beta2.Sentence.toObject(message.sentences[j], options); + } + if (message.tokens && message.tokens.length) { + object.tokens = []; + for (var j = 0; j < message.tokens.length; ++j) + object.tokens[j] = $root.google.cloud.language.v1beta2.Token.toObject(message.tokens[j], options); + } + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.language.v1beta2.Entity.toObject(message.entities[j], options); + } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + object.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.documentSentiment, options); + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.language.v1beta2.ClassificationCategory.toObject(message.categories[j], options); + } + return object; + }; + + /** + * Converts this AnnotateTextResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @instance + * @returns {Object.} JSON object + */ + AnnotateTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnnotateTextResponse; + })(); + + /** + * EncodingType enum. + * @name google.cloud.language.v1beta2.EncodingType + * @enum {string} + * @property {number} NONE=0 NONE value + * @property {number} UTF8=1 UTF8 value + * @property {number} UTF16=2 UTF16 value + * @property {number} UTF32=3 UTF32 value + */ + v1beta2.EncodingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "UTF8"] = 1; + values[valuesById[2] = "UTF16"] = 2; + values[valuesById[3] = "UTF32"] = 3; + return values; + })(); + + return v1beta2; + })(); + + return language; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && message.hasOwnProperty("package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && message.hasOwnProperty("syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && message.hasOwnProperty("extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && message.hasOwnProperty("typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {string} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {string} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && message.hasOwnProperty("inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && message.hasOwnProperty("outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = false; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = false; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {string} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && message.hasOwnProperty("ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && message.hasOwnProperty("packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && message.hasOwnProperty("lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && message.hasOwnProperty("jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && message.hasOwnProperty("weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {string} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {string} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {string} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && message.hasOwnProperty("begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && message.hasOwnProperty("type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && message.hasOwnProperty("done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && message.hasOwnProperty("error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && message.hasOwnProperty("response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && message.hasOwnProperty("timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && message.hasOwnProperty("responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.responseType = reader.string(); + break; + case 2: + message.metadataType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && message.hasOwnProperty("code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && message.hasOwnProperty("message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 8ec798a7dfc..49fa702e118 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-31T11:13:46.304357Z", + "updateTime": "2019-09-20T11:17:08.823437Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.1", - "dockerImage": "googleapis/artman@sha256:7c20f006c7a62d9d782e2665647d52290c37a952ef3cd134624d5dd62b3f71bd" + "version": "0.36.3", + "dockerImage": "googleapis/artman@sha256:66ca01f27ef7dc50fbfb7743b67028115a6a8acf43b2d82f9fc826de008adac4" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "82809578652607c8ee29d9e199c21f28f81a03e0", - "internalRef": "266247326" + "sha": "44e588d97e7497dff01107d39b6a19062f9a4ffa", + "internalRef": "270200097" } }, { From 684f45899adb2f332a7f1435f544d471a6f32cf7 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Wed, 25 Sep 2019 20:42:22 -0400 Subject: [PATCH 275/488] fix(deps): update dependency google-gax to ^1.6.1 (#299) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index d31b6cf46bc..dd355fa9b12 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -42,7 +42,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^1.0.0" + "google-gax": "^1.6.1" }, "devDependencies": { "codecov": "^3.0.2", From 14da44e14dfc0d56ce45a1183d28ac5ffe5bd2e9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2019 12:58:06 -0400 Subject: [PATCH 276/488] chore: release 3.4.0 (#297) --- packages/google-cloud-language/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-language/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index b6dcb380b56..9a74d30aff2 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [3.4.0](https://www.github.com/googleapis/nodejs-language/compare/v3.3.0...v3.4.0) (2019-09-26) + + +### Bug Fixes + +* **deps:** update dependency google-gax to ^1.6.1 ([#299](https://www.github.com/googleapis/nodejs-language/issues/299)) ([976bfab](https://www.github.com/googleapis/nodejs-language/commit/976bfab)) + + +### Features + +* .d.ts for protos ([#296](https://www.github.com/googleapis/nodejs-language/issues/296)) ([c279ff1](https://www.github.com/googleapis/nodejs-language/commit/c279ff1)) + ## [3.3.0](https://www.github.com/googleapis/nodejs-language/compare/v3.2.6...v3.3.0) (2019-09-16) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index dd355fa9b12..4a8b24f437a 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.3.0", + "version": "3.4.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { From 46f0c720416005d6db64d9e0d44a332aaae4dc90 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 1 Oct 2019 20:15:00 -0700 Subject: [PATCH 277/488] fix: use compatible version of google-gax * fix: use compatible version of google-gax * fix: use gax v1.6.3 --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 4a8b24f437a..de8650f754c 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -42,7 +42,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^1.6.1" + "google-gax": "^1.6.3" }, "devDependencies": { "codecov": "^3.0.2", From bdbd9356bc8616fc1e79ee5638e5fc00d1162e5d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Oct 2019 11:05:28 -0700 Subject: [PATCH 278/488] feat: introduces additional message types (#302) --- .../language/v1beta2/language_service.proto | 228 +- .../google-cloud-language/protos/protos.d.ts | 1324 +------ .../google-cloud-language/protos/protos.js | 3158 +---------------- .../google-cloud-language/protos/protos.json | 303 +- .../language/v1beta2/doc_language_service.js | 138 +- .../src/v1beta2/language_service_client.js | 20 +- packages/google-cloud-language/synth.metadata | 10 +- 7 files changed, 480 insertions(+), 4701 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto index 0263be04aed..d0242e59975 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,15 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.language.v1beta2; import "google/api/annotations.proto"; -import "google/longrunning/operations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1beta2;language"; option java_multiple_files = true; @@ -29,36 +30,42 @@ option java_package = "com.google.cloud.language.v1beta2"; // Provides text analysis operations such as sentiment analysis and entity // recognition. service LanguageService { + option (google.api.default_host) = "language.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-language," + "https://www.googleapis.com/auth/cloud-platform"; + // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) - returns (AnalyzeSentimentResponse) { + rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { option (google.api.http) = { post: "/v1beta2/documents:analyzeSentiment" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Finds named entities (currently proper names and common nouns) in the text // along with entity types, salience, mentions for each entity, and // other properties. - rpc AnalyzeEntities(AnalyzeEntitiesRequest) - returns (AnalyzeEntitiesResponse) { + rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { option (google.api.http) = { post: "/v1beta2/documents:analyzeEntities" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } - // Finds entities, similar to - // [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] - // in the text and analyzes sentiment associated with each entity and its - // mentions. - rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) - returns (AnalyzeEntitySentimentResponse) { + // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes + // sentiment associated with each entity and its mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { option (google.api.http) = { post: "/v1beta2/documents:analyzeEntitySentiment" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Analyzes the syntax of the text and provides sentence boundaries and @@ -69,6 +76,8 @@ service LanguageService { post: "/v1beta2/documents:analyzeSyntax" body: "*" }; + option (google.api.method_signature) = "document,encoding_type"; + option (google.api.method_signature) = "document"; } // Classifies a document into categories. @@ -77,6 +86,7 @@ service LanguageService { post: "/v1beta2/documents:classifyText" body: "*" }; + option (google.api.method_signature) = "document"; } // A convenience method that provides all syntax, sentiment, entity, and @@ -86,6 +96,8 @@ service LanguageService { post: "/v1beta2/documents:annotateText" body: "*" }; + option (google.api.method_signature) = "document,features,encoding_type"; + option (google.api.method_signature) = "document,features"; } } @@ -113,6 +125,7 @@ message Document { // Google Cloud Storage URI. oneof source { // The content of the input in string format. + // Cloud audit logging exempt since it is based on user data. string content = 2; // The Google Cloud Storage URI where the file content is located. @@ -139,8 +152,8 @@ message Sentence { TextSpan text = 1; // For calls to [AnalyzeSentiment][] or if - // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] - // is set to true, this field will contain the sentiment for the sentence. + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to + // true, this field will contain the sentiment for the sentence. Sentiment sentiment = 2; } @@ -148,7 +161,10 @@ message Sentence { // a person, an organization, or location. The API associates information, such // as salience and mentions, with entities. message Entity { - // The type of the entity. + // The type of the entity. For most entity types, the associated metadata is a + // Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table + // below lists the associated fields for entities that have different + // metadata. enum Type { // Unknown UNKNOWN = 0; @@ -165,14 +181,63 @@ message Entity { // Event EVENT = 4; - // Work of art + // Artwork WORK_OF_ART = 5; - // Consumer goods + // Consumer product CONSUMER_GOOD = 6; - // Other types + // Other types of entities OTHER = 7; + + // Phone number + // + // The metadata lists the phone number, formatted according to local + // convention, plus whichever additional elements appear in the text: + // + // * `number` - the actual number, broken down into sections as per local + // convention + // * `national_prefix` - country code, if detected + // * `area_code` - region or area code, if detected + // * `extension` - phone extension (to be dialed after connection), if + // detected + PHONE_NUMBER = 9; + + // Address + // + // The metadata identifies the street number and locality plus whichever + // additional elements appear in the text: + // + // * `street_number` - street number + // * `locality` - city or town + // * `street_name` - street/route name, if detected + // * `postal_code` - postal code, if detected + // * `country` - country, if detected< + // * `broad_region` - administrative area, such as the state, if detected + // * `narrow_region` - smaller administrative area, such as county, if + // detected + // * `sublocality` - used in Asian addresses to demark a district within a + // city, if detected + ADDRESS = 10; + + // Date + // + // The metadata identifies the components of the date: + // + // * `year` - four digit year, if detected + // * `month` - two digit month number, if detected + // * `day` - two digit day number, if detected + DATE = 11; + + // Number + // + // The metadata is the number itself. + NUMBER = 12; + + // Price + // + // The metadata identifies the `value` and `currency`. + PRICE = 13; } // The representative name for the entity. @@ -183,8 +248,9 @@ message Entity { // Metadata associated with the entity. // - // Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if - // available. The associated keys are "wikipedia_url" and "mid", respectively. + // For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + // and Knowledge Graph MID (`mid`), if they are available. For the metadata + // associated with other entity types, see the Type table below. map metadata = 3; // The salience score associated with the entity in the [0, 1.0] range. @@ -200,12 +266,38 @@ message Entity { repeated EntityMention mentions = 5; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - // is set to true, this field will contain the aggregate sentiment expressed - // for this entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the aggregate sentiment expressed for this + // entity in the provided document. Sentiment sentiment = 6; } +// Represents the text encoding that the caller uses to process the output. +// Providing an `EncodingType` is recommended because the API provides the +// beginning offsets for various outputs, such as tokens and mentions, and +// languages that natively use different text encodings may access offsets +// differently. +enum EncodingType { + // If `EncodingType` is not specified, encoding-dependent information (such as + // `begin_offset`) will be set at `-1`. + NONE = 0; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-8 encoding of the input. C++ and Go are examples of languages + // that use this encoding natively. + UTF8 = 1; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-16 encoding of the input. Java and JavaScript are examples of + // languages that use this encoding natively. + UTF16 = 2; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-32 encoding of the input. Python is an example of a language + // that uses this encoding natively. + UTF32 = 3; +} + // Represents the smallest syntactic building block of the text. message Token { // The token text. @@ -223,6 +315,7 @@ message Token { // Represents the feeling associated with the entire text or entities in // the text. +// Next ID: 6 message Sentiment { // A non-negative number in the [0, +inf) range, which represents // the absolute magnitude of sentiment regardless of score (positive or @@ -849,9 +942,9 @@ message EntityMention { Type type = 2; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - // is set to true, this field will contain the sentiment expressed for this - // mention of the entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the sentiment expressed for this mention of + // the entity in the provided document. Sentiment sentiment = 3; } @@ -861,15 +954,14 @@ message TextSpan { string content = 1; // The API calculates the beginning offset of the content in the original - // document according to the - // [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the - // API request. + // document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. int32 begin_offset = 2; } // Represents a category returned from the text classifier. message ClassificationCategory { - // The name of the category representing the document. + // The name of the category representing the document, from the [predefined + // taxonomy](/natural-language/docs/categories). string name = 1; // The classifier's confidence of the category. Number represents how certain @@ -879,8 +971,8 @@ message ClassificationCategory { // The sentiment analysis request message. message AnalyzeSentimentRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate sentence offsets for the // sentence sentiment. @@ -894,8 +986,7 @@ message AnalyzeSentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 2; // The sentiment for all the sentences in the document. @@ -904,8 +995,8 @@ message AnalyzeSentimentResponse { // The entity-level sentiment analysis request message. message AnalyzeEntitySentimentRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -918,15 +1009,14 @@ message AnalyzeEntitySentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 2; } // The entity analysis request message. message AnalyzeEntitiesRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -939,15 +1029,14 @@ message AnalyzeEntitiesResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 2; } // The syntax analysis request message. message AnalyzeSyntaxRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 2; @@ -963,15 +1052,14 @@ message AnalyzeSyntaxResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 3; } // The document classification request message. message ClassifyTextRequest { - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; } // The document classification response message. @@ -985,6 +1073,7 @@ message ClassifyTextResponse { message AnnotateTextRequest { // All available features for sentiment, syntax, and semantic analysis. // Setting each one to true will enable that specific analysis for the input. + // Next ID: 10 message Features { // Extract syntax information. bool extract_syntax = 1; @@ -998,15 +1087,17 @@ message AnnotateTextRequest { // Extract entities and their associated sentiment. bool extract_entity_sentiment = 4; - // Classify the full document into categories. + // Classify the full document into categories. If this is true, + // the API will use the default model which classifies into a + // [predefined taxonomy](/natural-language/docs/categories). bool classify_text = 6; } - // Input document. - Document document = 1; + // Required. Input document. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; - // The enabled features. - Features features = 2; + // Required. The enabled features. + Features features = 2 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. EncodingType encoding_type = 3; @@ -1034,36 +1125,9 @@ message AnnotateTextResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1beta2.Document.language] - // field for more details. + // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. string language = 5; // Categories identified in the input document. repeated ClassificationCategory categories = 6; } - -// Represents the text encoding that the caller uses to process the output. -// Providing an `EncodingType` is recommended because the API provides the -// beginning offsets for various outputs, such as tokens and mentions, and -// languages that natively use different text encodings may access offsets -// differently. -enum EncodingType { - // If `EncodingType` is not specified, encoding-dependent information (such as - // `begin_offset`) will be set at `-1`. - NONE = 0; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-8 encoding of the input. C++ and Go are examples of languages - // that use this encoding natively. - UTF8 = 1; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-16 encoding of the input. Java and Javascript are examples of - // languages that use this encoding natively. - UTF16 = 2; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-32 encoding of the input. Python is an example of a language - // that uses this encoding natively. - UTF32 = 3; -} diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index 7a8d8f5b58c..0560dbe2df7 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -3310,10 +3310,23 @@ export namespace google { EVENT = 4, WORK_OF_ART = 5, CONSUMER_GOOD = 6, - OTHER = 7 + OTHER = 7, + PHONE_NUMBER = 9, + ADDRESS = 10, + DATE = 11, + NUMBER = 12, + PRICE = 13 } } + /** EncodingType enum. */ + enum EncodingType { + NONE = 0, + UTF8 = 1, + UTF16 = 2, + UTF32 = 3 + } + /** Properties of a Token. */ interface IToken { @@ -5595,14 +5608,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** EncodingType enum. */ - enum EncodingType { - NONE = 0, - UTF8 = 1, - UTF16 = 2, - UTF32 = 3 - } } } } @@ -8340,9 +8345,6 @@ export namespace google { /** MethodOptions .google.api.methodSignature */ ".google.api.methodSignature"?: (string[]|null); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); } /** Represents a MethodOptions. */ @@ -9077,282 +9079,6 @@ export namespace google { } } - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: Uint8Array; - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a Timestamp. */ interface ITimestamp { @@ -9449,1026 +9175,4 @@ export namespace google { public toJSON(): { [k: string]: any }; } } - - /** Namespace longrunning. */ - namespace longrunning { - - /** Represents an Operations */ - class Operations extends $protobuf.rpc.Service { - - /** - * Constructs a new Operations service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Operations service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @returns Promise - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @returns Promise - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; - } - - namespace Operations { - - /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation metadata */ - metadata?: (google.protobuf.IAny|null); - - /** Operation done */ - done?: (boolean|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - - /** Operation response */ - response?: (google.protobuf.IAny|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation metadata. */ - public metadata?: (google.protobuf.IAny|null); - - /** Operation done. */ - public done: boolean; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** Operation response. */ - public response?: (google.protobuf.IAny|null); - - /** Operation result. */ - public result?: ("error"|"response"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; - - /** - * Verifies an Operation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IGetOperationRequest); - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; - - /** - * Verifies a GetOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest name */ - name?: (string|null); - - /** ListOperationsRequest filter */ - filter?: (string|null); - - /** ListOperationsRequest pageSize */ - pageSize?: (number|null); - - /** ListOperationsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsRequest); - - /** ListOperationsRequest name. */ - public name: string; - - /** ListOperationsRequest filter. */ - public filter: string; - - /** ListOperationsRequest pageSize. */ - public pageSize: number; - - /** ListOperationsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.longrunning.IOperation[]|null); - - /** ListOperationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.longrunning.IOperation[]; - - /** ListOperationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.ICancelOperationRequest); - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteOperationRequest. */ - interface IDeleteOperationRequest { - - /** DeleteOperationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteOperationRequest. */ - class DeleteOperationRequest implements IDeleteOperationRequest { - - /** - * Constructs a new DeleteOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IDeleteOperationRequest); - - /** DeleteOperationRequest name. */ - public name: string; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOperationRequest instance - */ - public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; - - /** - * Verifies a DeleteOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @param message DeleteOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a WaitOperationRequest. */ - interface IWaitOperationRequest { - - /** WaitOperationRequest name */ - name?: (string|null); - - /** WaitOperationRequest timeout */ - timeout?: (google.protobuf.IDuration|null); - } - - /** Represents a WaitOperationRequest. */ - class WaitOperationRequest implements IWaitOperationRequest { - - /** - * Constructs a new WaitOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IWaitOperationRequest); - - /** WaitOperationRequest name. */ - public name: string; - - /** WaitOperationRequest timeout. */ - public timeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitOperationRequest instance - */ - public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; - - /** - * Verifies a WaitOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @param message WaitOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an OperationInfo. */ - interface IOperationInfo { - - /** OperationInfo responseType */ - responseType?: (string|null); - - /** OperationInfo metadataType */ - metadataType?: (string|null); - } - - /** Represents an OperationInfo. */ - class OperationInfo implements IOperationInfo { - - /** - * Constructs a new OperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperationInfo); - - /** OperationInfo responseType. */ - public responseType: string; - - /** OperationInfo metadataType. */ - public metadataType: string; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationInfo instance - */ - public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; - - /** - * Verifies an OperationInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationInfo - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @param message OperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } } diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index ecf7daedad0..0ce889d9777 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -8708,6 +8708,11 @@ case 5: case 6: case 7: + case 9: + case 10: + case 11: + case 12: + case 13: break; } if (message.metadata != null && message.hasOwnProperty("metadata")) { @@ -8785,6 +8790,26 @@ case 7: message.type = 7; break; + case "PHONE_NUMBER": + case 9: + message.type = 9; + break; + case "ADDRESS": + case 10: + message.type = 10; + break; + case "DATE": + case 11: + message.type = 11; + break; + case "NUMBER": + case 12: + message.type = 12; + break; + case "PRICE": + case 13: + message.type = 13; + break; } if (object.metadata) { if (typeof object.metadata !== "object") @@ -8881,6 +8906,11 @@ * @property {number} WORK_OF_ART=5 WORK_OF_ART value * @property {number} CONSUMER_GOOD=6 CONSUMER_GOOD value * @property {number} OTHER=7 OTHER value + * @property {number} PHONE_NUMBER=9 PHONE_NUMBER value + * @property {number} ADDRESS=10 ADDRESS value + * @property {number} DATE=11 DATE value + * @property {number} NUMBER=12 NUMBER value + * @property {number} PRICE=13 PRICE value */ Entity.Type = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -8892,12 +8922,35 @@ values[valuesById[5] = "WORK_OF_ART"] = 5; values[valuesById[6] = "CONSUMER_GOOD"] = 6; values[valuesById[7] = "OTHER"] = 7; + values[valuesById[9] = "PHONE_NUMBER"] = 9; + values[valuesById[10] = "ADDRESS"] = 10; + values[valuesById[11] = "DATE"] = 11; + values[valuesById[12] = "NUMBER"] = 12; + values[valuesById[13] = "PRICE"] = 13; return values; })(); return Entity; })(); + /** + * EncodingType enum. + * @name google.cloud.language.v1beta2.EncodingType + * @enum {string} + * @property {number} NONE=0 NONE value + * @property {number} UTF8=1 UTF8 value + * @property {number} UTF16=2 UTF16 value + * @property {number} UTF32=3 UTF32 value + */ + v1beta2.EncodingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "UTF8"] = 1; + values[valuesById[2] = "UTF16"] = 2; + values[valuesById[3] = "UTF32"] = 3; + return values; + })(); + v1beta2.Token = (function() { /** @@ -15315,24 +15368,6 @@ return AnnotateTextResponse; })(); - /** - * EncodingType enum. - * @name google.cloud.language.v1beta2.EncodingType - * @enum {string} - * @property {number} NONE=0 NONE value - * @property {number} UTF8=1 UTF8 value - * @property {number} UTF16=2 UTF16 value - * @property {number} UTF32=3 UTF32 value - */ - v1beta2.EncodingType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "UTF8"] = 1; - values[valuesById[2] = "UTF16"] = 2; - values[valuesById[3] = "UTF32"] = 3; - return values; - })(); - return v1beta2; })(); @@ -22875,7 +22910,6 @@ * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ /** @@ -22935,14 +22969,6 @@ */ MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - /** * Creates a new MethodOptions instance using the specified properties. * @function create @@ -22974,8 +23000,6 @@ if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); @@ -23034,9 +23058,6 @@ message[".google.api.methodSignature"] = []; message[".google.api.methodSignature"].push(reader.string()); break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -23105,11 +23126,6 @@ if (!$util.isString(message[".google.api.methodSignature"][i])) return ".google.api.methodSignature: string[] expected"; } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } return null; }; @@ -23163,11 +23179,6 @@ for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } return message; }; @@ -23191,7 +23202,6 @@ if (options.defaults) { object.deprecated = false; object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.longrunning.operationInfo"] = null; object[".google.api.http"] = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -23203,8 +23213,6 @@ for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { object[".google.api.methodSignature"] = []; for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) @@ -24871,25 +24879,25 @@ return GeneratedCodeInfo; })(); - protobuf.Any = (function() { + protobuf.Timestamp = (function() { /** - * Properties of an Any. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new Any. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function Any(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24897,88 +24905,88 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - Any.prototype.type_url = ""; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp * @instance */ - Any.prototype.value = $util.newBuffer([]); + Timestamp.prototype.nanos = 0; /** - * Creates a new Any instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - Any.create = function create(properties) { - return new Any(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && message.hasOwnProperty("type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type_url = reader.string(); + message.seconds = reader.int64(); break; case 2: - message.value = reader.bytes(); + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -24989,2983 +24997,113 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Any.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Timestamp} Timestamp */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this Any to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Any; + return Timestamp; })(); - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Duration; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Empty; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Timestamp; - })(); - - return protobuf; - })(); - - google.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. - */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - longrunning.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.longrunning - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {google.protobuf.IAny|null} [metadata] Operation metadata - * @property {boolean|null} [done] Operation done - * @property {google.rpc.IStatus|null} [error] Operation error - * @property {google.protobuf.IAny|null} [response] Operation response - */ - - /** - * Constructs a new Operation. - * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set - */ - function Operation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation metadata. - * @member {google.protobuf.IAny|null|undefined} metadata - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.metadata = null; - - /** - * Operation done. - * @member {boolean} done - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.done = false; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Operation response. - * @member {google.protobuf.IAny|null|undefined} response - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.response = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation - * @instance - */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encode - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.metadata != null && message.hasOwnProperty("metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && message.hasOwnProperty("done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && message.hasOwnProperty("error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && message.hasOwnProperty("response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.done = reader.bool(); - break; - case 4: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.longrunning.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.response != null && message.hasOwnProperty("response")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Any.verify(message.response); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) - return object; - var message = new $root.google.longrunning.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.longrunning.Operation.metadata: object expected"); - message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.longrunning.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".google.longrunning.Operation.response: object expected"); - message.response = $root.google.protobuf.Any.fromObject(object.response); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.metadata = null; - object.done = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); - if (options.oneofs) - object.result = "response"; - } - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.longrunning.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Operation; - })(); - - longrunning.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.longrunning.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetOperationRequest; - })(); - - longrunning.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.longrunning - * @interface IListOperationsRequest - * @property {string|null} [name] ListOperationsRequest name - * @property {string|null} [filter] ListOperationsRequest filter - * @property {number|null} [pageSize] ListOperationsRequest pageSize - * @property {string|null} [pageToken] ListOperationsRequest pageToken - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsRequest name. - * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageSize = 0; - - /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.filter = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - var message = new $root.google.longrunning.ListOperationsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListOperationsRequest; - })(); - - longrunning.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - var message = new $root.google.longrunning.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListOperationsResponse; - })(); - - longrunning.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteOperationRequest; - })(); - - longrunning.WaitOperationRequest = (function() { - - /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout - */ - - /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest - * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - */ - function WaitOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.name = ""; - - /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.timeout = null; - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance - */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); - }; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.timeout != null && message.hasOwnProperty("timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitOperationRequest message. - * @function verify - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - var message = new $root.google.longrunning.WaitOperationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.timeout = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - return object; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && message.hasOwnProperty("responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.responseType = reader.string(); - break; - case 2: - message.metadataType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationInfo message. - * @function verify - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - if (!$util.isString(message.responseType)) - return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - if (!$util.isString(message.metadataType)) - return "metadataType: string expected"; - return null; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - var message = new $root.google.longrunning.OperationInfo(); - if (object.responseType != null) - message.responseType = String(object.responseType); - if (object.metadataType != null) - message.metadataType = String(object.metadataType); - return message; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; - } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; - return object; - }; - - /** - * Converts this OperationInfo to JSON. - * @function toJSON - * @memberof google.longrunning.OperationInfo - * @instance - * @returns {Object.} JSON object - */ - OperationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return OperationInfo; - })(); - - return longrunning; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && message.hasOwnProperty("code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && message.hasOwnProperty("message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Status; - })(); - - return rpc; + return protobuf; })(); return google; diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index e591def945b..53978c4d70c 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -780,13 +780,18 @@ }, "nested": { "LanguageService": { + "options": { + "(google.api.default_host)": "language.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-language,https://www.googleapis.com/auth/cloud-platform" + }, "methods": { "AnalyzeSentiment": { "requestType": "AnalyzeSentimentRequest", "responseType": "AnalyzeSentimentResponse", "options": { "(google.api.http).post": "/v1beta2/documents:analyzeSentiment", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" } }, "AnalyzeEntities": { @@ -794,7 +799,8 @@ "responseType": "AnalyzeEntitiesResponse", "options": { "(google.api.http).post": "/v1beta2/documents:analyzeEntities", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" } }, "AnalyzeEntitySentiment": { @@ -802,7 +808,8 @@ "responseType": "AnalyzeEntitySentimentResponse", "options": { "(google.api.http).post": "/v1beta2/documents:analyzeEntitySentiment", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" } }, "AnalyzeSyntax": { @@ -810,7 +817,8 @@ "responseType": "AnalyzeSyntaxResponse", "options": { "(google.api.http).post": "/v1beta2/documents:analyzeSyntax", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" } }, "ClassifyText": { @@ -818,7 +826,8 @@ "responseType": "ClassifyTextResponse", "options": { "(google.api.http).post": "/v1beta2/documents:classifyText", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "document" } }, "AnnotateText": { @@ -826,7 +835,8 @@ "responseType": "AnnotateTextResponse", "options": { "(google.api.http).post": "/v1beta2/documents:annotateText", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "document,features" } } } @@ -919,11 +929,24 @@ "EVENT": 4, "WORK_OF_ART": 5, "CONSUMER_GOOD": 6, - "OTHER": 7 + "OTHER": 7, + "PHONE_NUMBER": 9, + "ADDRESS": 10, + "DATE": 11, + "NUMBER": 12, + "PRICE": 13 } } } }, + "EncodingType": { + "values": { + "NONE": 0, + "UTF8": 1, + "UTF16": 2, + "UTF32": 3 + } + }, "Token": { "fields": { "text": { @@ -1294,7 +1317,10 @@ "fields": { "document": { "type": "Document", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "encodingType": { "type": "EncodingType", @@ -1323,7 +1349,10 @@ "fields": { "document": { "type": "Document", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "encodingType": { "type": "EncodingType", @@ -1348,7 +1377,10 @@ "fields": { "document": { "type": "Document", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "encodingType": { "type": "EncodingType", @@ -1373,7 +1405,10 @@ "fields": { "document": { "type": "Document", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "encodingType": { "type": "EncodingType", @@ -1403,7 +1438,10 @@ "fields": { "document": { "type": "Document", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1420,11 +1458,17 @@ "fields": { "document": { "type": "Document", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "features": { "type": "Features", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "encodingType": { "type": "EncodingType", @@ -1489,14 +1533,6 @@ "id": 6 } } - }, - "EncodingType": { - "values": { - "NONE": 0, - "UTF8": 1, - "UTF16": 2, - "UTF32": 3 - } } } } @@ -2526,33 +2562,6 @@ } } }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, "Timestamp": { "fields": { "seconds": { @@ -2566,202 +2575,6 @@ } } } - }, - "longrunning": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.LongRunning", - "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", - "java_multiple_files": true, - "java_outer_classname": "OperationsProto", - "java_package": "com.google.longrunning", - "php_namespace": "Google\\LongRunning" - }, - "nested": { - "operationInfo": { - "type": "google.longrunning.OperationInfo", - "id": 1049, - "extend": "google.protobuf.MethodOptions" - }, - "Operations": { - "methods": { - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{name=operations}" - } - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=operations/**}" - } - }, - "DeleteOperation": { - "requestType": "DeleteOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=operations/**}" - } - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*" - } - }, - "WaitOperation": { - "requestType": "WaitOperationRequest", - "responseType": "Operation" - } - } - }, - "Operation": { - "oneofs": { - "result": { - "oneof": [ - "error", - "response" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "metadata": { - "type": "google.protobuf.Any", - "id": 2 - }, - "done": { - "type": "bool", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - }, - "response": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "GetOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListOperationsRequest": { - "fields": { - "name": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeleteOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "WaitOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "timeout": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "OperationInfo": { - "fields": { - "responseType": { - "type": "string", - "id": 1 - }, - "metadataType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } } } } diff --git a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js index 522c395332a..4f3676875b8 100644 --- a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js +++ b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js @@ -28,6 +28,7 @@ * * @property {string} content * The content of the input in string format. + * Cloud audit logging exempt since it is based on user data. * * @property {string} gcsContentUri * The Google Cloud Storage URI where the file content is located. @@ -87,8 +88,8 @@ const Document = { * * @property {Object} sentiment * For calls to AnalyzeSentiment or if - * AnnotateTextRequest.Features.extract_document_sentiment - * is set to true, this field will contain the sentiment for the sentence. + * AnnotateTextRequest.Features.extract_document_sentiment is set to + * true, this field will contain the sentiment for the sentence. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * @@ -116,8 +117,9 @@ const Sentence = { * @property {Object.} metadata * Metadata associated with the entity. * - * Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if - * available. The associated keys are "wikipedia_url" and "mid", respectively. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. * * @property {number} salience * The salience score associated with the entity in the [0, 1.0] range. @@ -135,9 +137,9 @@ const Sentence = { * * @property {Object} sentiment * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. + * AnnotateTextRequest.Features.extract_entity_sentiment is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * @@ -149,7 +151,10 @@ const Entity = { // This is for documentation. Actual contents will be loaded by gRPC. /** - * The type of the entity. + * The type of the entity. For most entity types, the associated metadata is a + * Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table + * below lists the associated fields for entities that have different + * metadata. * * @enum {number} * @memberof google.cloud.language.v1beta2 @@ -182,19 +187,78 @@ const Entity = { EVENT: 4, /** - * Work of art + * Artwork */ WORK_OF_ART: 5, /** - * Consumer goods + * Consumer product */ CONSUMER_GOOD: 6, /** - * Other types + * Other types of entities */ - OTHER: 7 + OTHER: 7, + + /** + * Phone number + * + * The metadata lists the phone number, formatted according to local + * convention, plus whichever additional elements appear in the text: + * + * * `number` - the actual number, broken down into sections as per local + * convention + * * `national_prefix` - country code, if detected + * * `area_code` - region or area code, if detected + * * `extension` - phone extension (to be dialed after connection), if + * detected + */ + PHONE_NUMBER: 9, + + /** + * Address + * + * The metadata identifies the street number and locality plus whichever + * additional elements appear in the text: + * + * * `street_number` - street number + * * `locality` - city or town + * * `street_name` - street/route name, if detected + * * `postal_code` - postal code, if detected + * * `country` - country, if detected< + * * `broad_region` - administrative area, such as the state, if detected + * * `narrow_region` - smaller administrative area, such as county, if + * detected + * * `sublocality` - used in Asian addresses to demark a district within a + * city, if detected + */ + ADDRESS: 10, + + /** + * Date + * + * The metadata identifies the components of the date: + * + * * `year` - four digit year, if detected + * * `month` - two digit month number, if detected + * * `day` - two digit day number, if detected + */ + DATE: 11, + + /** + * Number + * + * The metadata is the number itself. + */ + NUMBER: 12, + + /** + * Price + * + * The metadata identifies the `value` and `currency`. + */ + PRICE: 13 } }; @@ -230,6 +294,7 @@ const Token = { /** * Represents the feeling associated with the entire text or entities in * the text. + * Next ID: 6 * * @property {number} magnitude * A non-negative number in the [0, +inf) range, which represents @@ -1307,9 +1372,9 @@ const DependencyEdge = { * * @property {Object} sentiment * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. + * AnnotateTextRequest.Features.extract_entity_sentiment is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. * * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} * @@ -1353,9 +1418,7 @@ const EntityMention = { * * @property {number} beginOffset * The API calculates the beginning offset of the content in the original - * document according to the - * EncodingType specified in the - * API request. + * document according to the EncodingType specified in the API request. * * @typedef TextSpan * @memberof google.cloud.language.v1beta2 @@ -1369,7 +1432,8 @@ const TextSpan = { * Represents a category returned from the text classifier. * * @property {string} name - * The name of the category representing the document. + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). * * @property {number} confidence * The classifier's confidence of the category. Number represents how certain @@ -1387,7 +1451,7 @@ const ClassificationCategory = { * The sentiment analysis request message. * * @property {Object} document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @@ -1416,8 +1480,7 @@ const AnalyzeSentimentRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language - * field for more details. + * See Document.language field for more details. * * @property {Object[]} sentences * The sentiment for all the sentences in the document. @@ -1436,7 +1499,7 @@ const AnalyzeSentimentResponse = { * The entity-level sentiment analysis request message. * * @property {Object} document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @@ -1464,8 +1527,7 @@ const AnalyzeEntitySentimentRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language - * field for more details. + * See Document.language field for more details. * * @typedef AnalyzeEntitySentimentResponse * @memberof google.cloud.language.v1beta2 @@ -1479,7 +1541,7 @@ const AnalyzeEntitySentimentResponse = { * The entity analysis request message. * * @property {Object} document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @@ -1507,8 +1569,7 @@ const AnalyzeEntitiesRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language - * field for more details. + * See Document.language field for more details. * * @typedef AnalyzeEntitiesResponse * @memberof google.cloud.language.v1beta2 @@ -1522,7 +1583,7 @@ const AnalyzeEntitiesResponse = { * The syntax analysis request message. * * @property {Object} document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @@ -1555,8 +1616,7 @@ const AnalyzeSyntaxRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language - * field for more details. + * See Document.language field for more details. * * @typedef AnalyzeSyntaxResponse * @memberof google.cloud.language.v1beta2 @@ -1570,7 +1630,7 @@ const AnalyzeSyntaxResponse = { * The document classification request message. * * @property {Object} document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @@ -1603,12 +1663,12 @@ const ClassifyTextResponse = { * analysis types (sentiment, entities, and syntax) in one call. * * @property {Object} document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * * @property {Object} features - * The enabled features. + * Required. The enabled features. * * This object should have the same structure as [Features]{@link google.cloud.language.v1beta2.Features} * @@ -1627,6 +1687,7 @@ const AnnotateTextRequest = { /** * All available features for sentiment, syntax, and semantic analysis. * Setting each one to true will enable that specific analysis for the input. + * Next ID: 10 * * @property {boolean} extractSyntax * Extract syntax information. @@ -1641,7 +1702,9 @@ const AnnotateTextRequest = { * Extract entities and their associated sentiment. * * @property {boolean} classifyText - * Classify the full document into categories. + * Classify the full document into categories. If this is true, + * the API will use the default model which classifies into a + * [predefined taxonomy](https://cloud.google.com/natural-language/docs/categories). * * @typedef Features * @memberof google.cloud.language.v1beta2 @@ -1684,8 +1747,7 @@ const AnnotateTextRequest = { * @property {string} language * The language of the text, which will be the same as the language specified * in the request or, if not specified, the automatically-detected language. - * See Document.language - * field for more details. + * See Document.language field for more details. * * @property {Object[]} categories * Categories identified in the input document. @@ -1727,7 +1789,7 @@ const EncodingType = { /** * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-16 encoding of the input. Java and Javascript are examples of + * on the UTF-16 encoding of the input. Java and JavaScript are examples of * languages that use this encoding natively. */ UTF16: 2, diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 22acc8f96d8..4457e2479a9 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -220,7 +220,7 @@ class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @param {number} [request.encodingType] @@ -276,7 +276,7 @@ class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @param {number} [request.encodingType] @@ -324,15 +324,13 @@ class LanguageServiceClient { } /** - * Finds entities, similar to - * AnalyzeEntities - * in the text and analyzes sentiment associated with each entity and its - * mentions. + * Finds entities, similar to AnalyzeEntities in the text and analyzes + * sentiment associated with each entity and its mentions. * * @param {Object} request * The request object that will be sent. * @param {Object} request.document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @param {number} [request.encodingType] @@ -391,7 +389,7 @@ class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @param {number} [request.encodingType] @@ -444,7 +442,7 @@ class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @param {Object} [options] @@ -494,11 +492,11 @@ class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.document - * Input document. + * Required. Input document. * * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} * @param {Object} request.features - * The enabled features. + * Required. The enabled features. * * This object should have the same structure as [Features]{@link google.cloud.language.v1beta2.Features} * @param {number} [request.encodingType] diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 49fa702e118..8e92d759b10 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-09-20T11:17:08.823437Z", + "updateTime": "2019-10-01T11:22:18.378664Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.3", - "dockerImage": "googleapis/artman@sha256:66ca01f27ef7dc50fbfb7743b67028115a6a8acf43b2d82f9fc826de008adac4" + "version": "0.37.1", + "dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "44e588d97e7497dff01107d39b6a19062f9a4ffa", - "internalRef": "270200097" + "sha": "ce3c574d1266026cebea3a893247790bd68191c2", + "internalRef": "272147209" } }, { From 1fae2efa5852003123a9d1cc2829600078c8ea7b Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 8 Oct 2019 17:23:56 -0700 Subject: [PATCH 279/488] chore: update CONTRIBUTING.md and make releaseType node (#310) --- packages/google-cloud-language/CONTRIBUTING.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/google-cloud-language/CONTRIBUTING.md b/packages/google-cloud-language/CONTRIBUTING.md index 78aaa61b269..f6c4cf010e3 100644 --- a/packages/google-cloud-language/CONTRIBUTING.md +++ b/packages/google-cloud-language/CONTRIBUTING.md @@ -34,6 +34,7 @@ accept your pull requests. 1. Ensure that your code adheres to the existing style in the code to which you are contributing. 1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. ## Running the tests @@ -46,8 +47,17 @@ accept your pull requests. 1. Run the tests: + # Run unit tests. npm test + # Run sample integration tests. + gcloud auth application-default login + npm run samples-test + + # Run all system tests. + gcloud auth application-default login + npm run system-test + 1. Lint (and maybe fix) any changes: npm run fix From 944db9cb67bd1be8bfefc7c63aa05aeaff94adb1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2019 21:15:58 -0700 Subject: [PATCH 280/488] chore: release 3.5.0 (#308) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-language/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-language/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 9a74d30aff2..071aa2c6afc 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [3.5.0](https://www.github.com/googleapis/nodejs-language/compare/v3.4.0...v3.5.0) (2019-10-09) + + +### Bug Fixes + +* update analyze.v1.js ([#306](https://www.github.com/googleapis/nodejs-language/issues/306)) ([1624e83](https://www.github.com/googleapis/nodejs-language/commit/1624e83)) +* use compatible version of google-gax ([2edf66e](https://www.github.com/googleapis/nodejs-language/commit/2edf66e)) + + +### Features + +* introduces additional message types ([#302](https://www.github.com/googleapis/nodejs-language/issues/302)) ([b094572](https://www.github.com/googleapis/nodejs-language/commit/b094572)) + ## [3.4.0](https://www.github.com/googleapis/nodejs-language/compare/v3.3.0...v3.4.0) (2019-09-26) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index de8650f754c..bba9b66090f 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.4.0", + "version": "3.5.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { From a135259c11c7ce32af487c7de89091f79cac583f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 19 Oct 2019 01:41:56 +0300 Subject: [PATCH 281/488] fix(deps): update dependency @google-cloud/storage to v4 (#311) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 6d21de018f3..18488034f27 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -18,7 +18,7 @@ "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", "@google-cloud/language": "^3.3.0", - "@google-cloud/storage": "^3.0.0", + "@google-cloud/storage": "^4.0.0", "yargs": "^14.0.0" }, "devDependencies": { From d24369bbb0d297b25c687934154845b8a83ac4af Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 21 Oct 2019 18:14:24 -0700 Subject: [PATCH 282/488] fix(deps): bump google-gax to 1.7.5 (#313) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index bba9b66090f..cb04c100c85 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -42,7 +42,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^1.6.3" + "google-gax": "^1.7.5" }, "devDependencies": { "codecov": "^3.0.2", From 38a9f8047a67a4dc1f9cf10b8f6088bd3d3d30b5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2019 12:09:46 -0700 Subject: [PATCH 283/488] chore: release 3.5.1 (#312) --- packages/google-cloud-language/CHANGELOG.md | 8 ++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 071aa2c6afc..90c9c528f7e 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.5.1](https://www.github.com/googleapis/nodejs-language/compare/v3.5.0...v3.5.1) (2019-10-22) + + +### Bug Fixes + +* **deps:** bump google-gax to 1.7.5 ([#313](https://www.github.com/googleapis/nodejs-language/issues/313)) ([8aeff90](https://www.github.com/googleapis/nodejs-language/commit/8aeff908bb5a1315d9e46f4b057bee3d20dc4f61)) +* **deps:** update dependency @google-cloud/storage to v4 ([#311](https://www.github.com/googleapis/nodejs-language/issues/311)) ([7178243](https://www.github.com/googleapis/nodejs-language/commit/71782436efbb3e987d8a3b31f2e5b3a485b777b2)) + ## [3.5.0](https://www.github.com/googleapis/nodejs-language/compare/v3.4.0...v3.5.0) (2019-10-09) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index cb04c100c85..8e52d59faf4 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.5.0", + "version": "3.5.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 18488034f27..78965214a63 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.3.0", + "@google-cloud/language": "^3.5.1", "@google-cloud/storage": "^4.0.0", "yargs": "^14.0.0" }, From cbed37f3ed9dc5a5448b5f6efdae6eb419f725c8 Mon Sep 17 00:00:00 2001 From: Brad Miro Date: Mon, 28 Oct 2019 20:30:14 -0400 Subject: [PATCH 284/488] feat: added endpoint samples and updated docs for language api (#315) --- packages/google-cloud-language/README.md | 1 + .../linkinator.config.json | 3 ++- .../google-cloud-language/samples/README.md | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 33d0a843ceb..9a2c5a33065 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -98,6 +98,7 @@ has instructions for running the samples. | Automl Natural Language Model | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageModel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageModel.js,samples/README.md) | | Automl Natural Language Predict | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguagePredict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguagePredict.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Set Endpoint | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/setEndpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) | diff --git a/packages/google-cloud-language/linkinator.config.json b/packages/google-cloud-language/linkinator.config.json index d780d6bfff5..cad97afdc56 100644 --- a/packages/google-cloud-language/linkinator.config.json +++ b/packages/google-cloud-language/linkinator.config.json @@ -2,6 +2,7 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com" + "www.googleapis.com", + "setEndpoint.js" ] } diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 472cf7b82f8..51ffa149052 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -20,6 +20,7 @@ analysis, and syntax analysis. This API is part of the larger Cloud Machine Lear * [Automl Natural Language Model](#automl-natural-language-model) * [Automl Natural Language Predict](#automl-natural-language-predict) * [Quickstart](#quickstart) + * [Set Endpoint](#set-endpoint) ## Before you begin @@ -126,6 +127,23 @@ __Usage:__ `node quickstart.js` +----- + + + + +### Set Endpoint + +View the [source code]https://github.com/googleapis/nodejs-language/blob/master/samples/setEndpoint.js) + +[![Open in Cloud shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) + +__Usage:__ + +`node setEndpoint.js` + +----- + From 9e7c79179f3edfa3cb888ff4b4242ea73a06ef3b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 5 Nov 2019 11:45:22 -0800 Subject: [PATCH 285/488] docs: update set endpoint readme sample verbiage (#319) --- packages/google-cloud-language/.nycrc | 1 - packages/google-cloud-language/samples/README.md | 8 ++++---- packages/google-cloud-language/synth.metadata | 12 ++++++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/google-cloud-language/.nycrc b/packages/google-cloud-language/.nycrc index 23e322204ec..367688844eb 100644 --- a/packages/google-cloud-language/.nycrc +++ b/packages/google-cloud-language/.nycrc @@ -10,7 +10,6 @@ "**/docs", "**/samples", "**/scripts", - "**/src/**/v*/**/*.js", "**/protos", "**/test", ".jsdoc.js", diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 51ffa149052..a93b62ac4c0 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -127,6 +127,7 @@ __Usage:__ `node quickstart.js` + ----- @@ -134,15 +135,14 @@ __Usage:__ ### Set Endpoint -View the [source code]https://github.com/googleapis/nodejs-language/blob/master/samples/setEndpoint.js) +View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/setEndpoint.js). -[![Open in Cloud shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) __Usage:__ -`node setEndpoint.js` ------ +`node setEndpoint.js` diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 8e92d759b10..272e7013175 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-10-01T11:22:18.378664Z", + "updateTime": "2019-11-05T12:17:09.955908Z", "sources": [ { "generator": { "name": "artman", - "version": "0.37.1", - "dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80" + "version": "0.41.0", + "dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ce3c574d1266026cebea3a893247790bd68191c2", - "internalRef": "272147209" + "sha": "8c6569ced063c08a48272de2e887860d0c40d388", + "internalRef": "278552094" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ], From a7fac367d9b275c2be00a7917e9c73acf9a66fb8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2019 20:14:03 -0800 Subject: [PATCH 286/488] chore: release 3.6.0 (#317) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 90c9c528f7e..92bbdda49e4 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [3.6.0](https://www.github.com/googleapis/nodejs-language/compare/v3.5.1...v3.6.0) (2019-11-05) + + +### Features + +* added endpoint samples and updated docs for language api ([#315](https://www.github.com/googleapis/nodejs-language/issues/315)) ([0a01ee5](https://www.github.com/googleapis/nodejs-language/commit/0a01ee571464a042a2bd953ee2f7a45fd189d7ce)) + ### [3.5.1](https://www.github.com/googleapis/nodejs-language/compare/v3.5.0...v3.5.1) (2019-10-22) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 8e52d59faf4..84f828e9f0e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.5.1", + "version": "3.6.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 78965214a63..59822924319 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.5.1", + "@google-cloud/language": "^3.6.0", "@google-cloud/storage": "^4.0.0", "yargs": "^14.0.0" }, From 086e10c95d7d06f1d5ac1abc675418e1472e5db1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 13 Nov 2019 12:09:15 -0800 Subject: [PATCH 287/488] fix: import long into proto ts declaration file (#323) --- packages/google-cloud-language/protos/protos.d.ts | 1 + packages/google-cloud-language/synth.metadata | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index 0560dbe2df7..c48b14752c7 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -1,3 +1,4 @@ +import * as Long from "long"; import * as $protobuf from "protobufjs"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 272e7013175..b0d2506557d 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-05T12:17:09.955908Z", + "updateTime": "2019-11-12T12:18:48.573564Z", "sources": [ { "generator": { "name": "artman", - "version": "0.41.0", - "dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9" + "version": "0.41.1", + "dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8c6569ced063c08a48272de2e887860d0c40d388", - "internalRef": "278552094" + "sha": "f69562be0608904932bdcfbc5ad8b9a22d9dceb8", + "internalRef": "279774957" } }, { From 985116b921229bbffc1641a45d17ecf3f0fde515 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 13 Nov 2019 12:31:57 -0800 Subject: [PATCH 288/488] fix(docs): snippets are now replaced in jsdoc comments (#322) --- packages/google-cloud-language/.jsdoc.js | 3 ++- packages/google-cloud-language/package.json | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index d6289080b88..92f704f07aa 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -26,7 +26,8 @@ module.exports = { destination: './docs/' }, plugins: [ - 'plugins/markdown' + 'plugins/markdown', + 'jsdoc-region-tag' ], source: { excludePattern: '(^|\\/|\\\\)[._]', diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 84f828e9f0e..32591825e67 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -50,13 +50,14 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", - "jsdoc-fresh": "^1.0.1", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", "mocha": "^6.0.0", "nyc": "^14.0.0", "power-assert": "^1.6.0", - "prettier": "^1.13.5", - "linkinator": "^1.5.0" + "prettier": "^1.13.5" } } From b46463ec00c5ffac6a81b3119d6eb0b7412e26d6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2019 16:58:14 -0800 Subject: [PATCH 289/488] chore: release 3.6.1 (#324) --- packages/google-cloud-language/CHANGELOG.md | 8 ++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 92bbdda49e4..dd41d977ae2 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.6.1](https://www.github.com/googleapis/nodejs-language/compare/v3.6.0...v3.6.1) (2019-11-14) + + +### Bug Fixes + +* import long into proto ts declaration file ([#323](https://www.github.com/googleapis/nodejs-language/issues/323)) ([d327d99](https://www.github.com/googleapis/nodejs-language/commit/d327d997c78ea2ec76fa6ca75fe94097965b7b71)) +* **docs:** snippets are now replaced in jsdoc comments ([#322](https://www.github.com/googleapis/nodejs-language/issues/322)) ([e316d9a](https://www.github.com/googleapis/nodejs-language/commit/e316d9a69de76c673ce273fe72b692e2e29a3756)) + ## [3.6.0](https://www.github.com/googleapis/nodejs-language/compare/v3.5.1...v3.6.0) (2019-11-05) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 32591825e67..d493bf60e57 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.6.0", + "version": "3.6.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 59822924319..f1726f5a5fc 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.6.0", + "@google-cloud/language": "^3.6.1", "@google-cloud/storage": "^4.0.0", "yargs": "^14.0.0" }, From 4e8d17e51d86d2a9914eccb8d641a0d7b8b7ae48 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 14 Nov 2019 17:17:35 -0800 Subject: [PATCH 290/488] docs: add license header --- packages/google-cloud-language/protos/protos.d.ts | 14 ++++++++++++++ packages/google-cloud-language/synth.metadata | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index c48b14752c7..bad81b55b99 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -1,3 +1,17 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import * as Long from "long"; import * as $protobuf from "protobufjs"; /** Namespace google. */ diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index b0d2506557d..124074915d1 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-11-12T12:18:48.573564Z", + "updateTime": "2019-11-14T12:19:14.714792Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f69562be0608904932bdcfbc5ad8b9a22d9dceb8", - "internalRef": "279774957" + "sha": "4f747bda9b099b4426f495985680d16d0227fa5f", + "internalRef": "280394936" } }, { From 2df213cbd7c8651547ae137b70accfd5a8771711 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 15 Nov 2019 11:56:35 -0800 Subject: [PATCH 291/488] docs: add license header --- packages/google-cloud-language/protos/protos.js | 14 ++++++++++++++ packages/google-cloud-language/synth.metadata | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 0ce889d9777..5f1b49b8c2b 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -1,3 +1,17 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ (function(global, factory) { /* global define, require, module */ diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 124074915d1..272660b3f8c 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-11-14T12:19:14.714792Z", + "updateTime": "2019-11-15T12:17:11.261163Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4f747bda9b099b4426f495985680d16d0227fa5f", - "internalRef": "280394936" + "sha": "f6808ff4e8b966cd571e99279d4a2780ed97dff2", + "internalRef": "280581337" } }, { From 1cafa87e69e2cf8aea57e6e073ab4c745f511577 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 18 Nov 2019 21:53:44 +0100 Subject: [PATCH 292/488] fix(deps): update dependency yargs to v15 (#328) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index f1726f5a5fc..8f550b78d5e 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -19,7 +19,7 @@ "mathjs": "^6.0.0", "@google-cloud/language": "^3.6.1", "@google-cloud/storage": "^4.0.0", - "yargs": "^14.0.0" + "yargs": "^15.0.0" }, "devDependencies": { "chai": "^4.2.0", From 4680b87224d9352965bd7943fd49ee8a73c4fdd5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2019 13:41:49 -0800 Subject: [PATCH 293/488] chore: release 3.6.2 (#329) --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index dd41d977ae2..22e1f937963 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.6.2](https://www.github.com/googleapis/nodejs-language/compare/v3.6.1...v3.6.2) (2019-11-18) + + +### Bug Fixes + +* **deps:** update dependency yargs to v15 ([#328](https://www.github.com/googleapis/nodejs-language/issues/328)) ([f035a45](https://www.github.com/googleapis/nodejs-language/commit/f035a4596f5b48d44289474fb7f46432be3a6123)) + ### [3.6.1](https://www.github.com/googleapis/nodejs-language/compare/v3.6.0...v3.6.1) (2019-11-14) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index d493bf60e57..6e973ee0e74 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.6.1", + "version": "3.6.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 8f550b78d5e..0eb4bee8d79 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.6.1", + "@google-cloud/language": "^3.6.2", "@google-cloud/storage": "^4.0.0", "yargs": "^15.0.0" }, From 69f1bb69f2ed97f4678c9725b755f0707e81a0a0 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 25 Nov 2019 08:54:42 -0800 Subject: [PATCH 294/488] chore: update license headers --- .../samples/quickstart.js | 27 +++++++++---------- .../samples/test/quickstart.test.js | 27 +++++++++---------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/packages/google-cloud-language/samples/quickstart.js b/packages/google-cloud-language/samples/quickstart.js index 858c30b011a..7eb7b5a4a29 100644 --- a/packages/google-cloud-language/samples/quickstart.js +++ b/packages/google-cloud-language/samples/quickstart.js @@ -1,17 +1,16 @@ -/** - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; diff --git a/packages/google-cloud-language/samples/test/quickstart.test.js b/packages/google-cloud-language/samples/test/quickstart.test.js index b2e879dc9b3..4e8e465a24c 100644 --- a/packages/google-cloud-language/samples/test/quickstart.test.js +++ b/packages/google-cloud-language/samples/test/quickstart.test.js @@ -1,17 +1,16 @@ -/** - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2017 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; From 6ae74251b4c3551a4ff9fbb7717e042c4284ff7a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2019 15:52:04 -0800 Subject: [PATCH 295/488] chore: release 3.6.3 (#336) --- packages/google-cloud-language/CHANGELOG.md | 8 ++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 22e1f937963..71cdf5dd056 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.6.3](https://www.github.com/googleapis/nodejs-language/compare/v3.6.2...v3.6.3) (2019-12-05) + + +### Bug Fixes + +* **deps:** pin TypeScript below 3.7.0 ([d93b13e](https://www.github.com/googleapis/nodejs-language/commit/d93b13e7fe29e093ff1e2af134098113a06dab00)) +* correct AutoML Natural Language region tags to match with all other languages. ([#335](https://www.github.com/googleapis/nodejs-language/issues/335)) ([e20276a](https://www.github.com/googleapis/nodejs-language/commit/e20276a70d0008cd2776191467a1a58b373be6f3)) + ### [3.6.2](https://www.github.com/googleapis/nodejs-language/compare/v3.6.1...v3.6.2) (2019-11-18) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6e973ee0e74..637050502c0 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.6.2", + "version": "3.6.3", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 0eb4bee8d79..a0dd8a70b9e 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.6.2", + "@google-cloud/language": "^3.6.3", "@google-cloud/storage": "^4.0.0", "yargs": "^15.0.0" }, From a473ef0e859461761d83b6bc1ade1b9a2a376cd2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 10 Dec 2019 10:36:29 -0800 Subject: [PATCH 296/488] refactor: re-order proto token message (#337) --- .../language/v1beta2/language_service.proto | 32 ++++++++--------- .../google-cloud-language/protos/protos.d.ts | 16 ++++----- .../google-cloud-language/protos/protos.js | 36 +++++++++---------- .../google-cloud-language/protos/protos.json | 16 ++++----- .../src/v1beta2/language_service_client.js | 2 +- packages/google-cloud-language/synth.metadata | 10 +++--- 6 files changed, 56 insertions(+), 56 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto index d0242e59975..384cdf91923 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -69,7 +69,7 @@ service LanguageService { } // Analyzes the syntax of the text and provides sentence boundaries and - // tokenization along with part of speech tags, dependency trees, and other + // tokenization along with part-of-speech tags, dependency trees, and other // properties. rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) { option (google.api.http) = { @@ -272,6 +272,21 @@ message Entity { Sentiment sentiment = 6; } +// Represents the smallest syntactic building block of the text. +message Token { + // The token text. + TextSpan text = 1; + + // Parts of speech tag for this token. + PartOfSpeech part_of_speech = 2; + + // Dependency tree parse for this token. + DependencyEdge dependency_edge = 3; + + // [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + string lemma = 4; +} + // Represents the text encoding that the caller uses to process the output. // Providing an `EncodingType` is recommended because the API provides the // beginning offsets for various outputs, such as tokens and mentions, and @@ -298,21 +313,6 @@ enum EncodingType { UTF32 = 3; } -// Represents the smallest syntactic building block of the text. -message Token { - // The token text. - TextSpan text = 1; - - // Parts of speech tag for this token. - PartOfSpeech part_of_speech = 2; - - // Dependency tree parse for this token. - DependencyEdge dependency_edge = 3; - - // [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - string lemma = 4; -} - // Represents the feeling associated with the entire text or entities in // the text. // Next ID: 6 diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index bad81b55b99..5fb81e22502 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -3334,14 +3334,6 @@ export namespace google { } } - /** EncodingType enum. */ - enum EncodingType { - NONE = 0, - UTF8 = 1, - UTF16 = 2, - UTF32 = 3 - } - /** Properties of a Token. */ interface IToken { @@ -3450,6 +3442,14 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** EncodingType enum. */ + enum EncodingType { + NONE = 0, + UTF8 = 1, + UTF16 = 2, + UTF32 = 3 + } + /** Properties of a Sentiment. */ interface ISentiment { diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 5f1b49b8c2b..34e54c42509 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -8947,24 +8947,6 @@ return Entity; })(); - /** - * EncodingType enum. - * @name google.cloud.language.v1beta2.EncodingType - * @enum {string} - * @property {number} NONE=0 NONE value - * @property {number} UTF8=1 UTF8 value - * @property {number} UTF16=2 UTF16 value - * @property {number} UTF32=3 UTF32 value - */ - v1beta2.EncodingType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "UTF8"] = 1; - values[valuesById[2] = "UTF16"] = 2; - values[valuesById[3] = "UTF32"] = 3; - return values; - })(); - v1beta2.Token = (function() { /** @@ -9234,6 +9216,24 @@ return Token; })(); + /** + * EncodingType enum. + * @name google.cloud.language.v1beta2.EncodingType + * @enum {string} + * @property {number} NONE=0 NONE value + * @property {number} UTF8=1 UTF8 value + * @property {number} UTF16=2 UTF16 value + * @property {number} UTF32=3 UTF32 value + */ + v1beta2.EncodingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "UTF8"] = 1; + values[valuesById[2] = "UTF16"] = 2; + values[valuesById[3] = "UTF32"] = 3; + return values; + })(); + v1beta2.Sentiment = (function() { /** diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index 53978c4d70c..f38753e06c7 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -939,14 +939,6 @@ } } }, - "EncodingType": { - "values": { - "NONE": 0, - "UTF8": 1, - "UTF16": 2, - "UTF32": 3 - } - }, "Token": { "fields": { "text": { @@ -967,6 +959,14 @@ } } }, + "EncodingType": { + "values": { + "NONE": 0, + "UTF8": 1, + "UTF16": 2, + "UTF32": 3 + } + }, "Sentiment": { "fields": { "magnitude": { diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js index 4457e2479a9..6a144c249b1 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.js @@ -383,7 +383,7 @@ class LanguageServiceClient { /** * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other + * tokenization along with part-of-speech tags, dependency trees, and other * properties. * * @param {Object} request diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 272660b3f8c..257637ad190 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-15T12:17:11.261163Z", + "updateTime": "2019-12-10T12:18:40.168211Z", "sources": [ { "generator": { "name": "artman", - "version": "0.41.1", - "dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e" + "version": "0.42.1", + "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f6808ff4e8b966cd571e99279d4a2780ed97dff2", - "internalRef": "280581337" + "sha": "6cc9499e225a4f6a5e34fe07e390f67055d7991c", + "internalRef": "284643689" } }, { From 1bb99bde07e368dece899c0b4243857ad9e43c46 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Wed, 18 Dec 2019 16:32:01 -0800 Subject: [PATCH 297/488] feat: move library to typescript code generation (#338) * move to typescript * run synth tool * rerun synthtool to pick up new timeout number * clean package json * rerun synth tool * try eslintrc rules --- packages/google-cloud-language/.gitignore | 2 + packages/google-cloud-language/.jsdoc.js | 2 +- .../linkinator.config.json | 3 +- packages/google-cloud-language/package.json | 41 +- .../smoke-test/language_service_smoke_test.js | 40 - packages/google-cloud-language/src/index.js | 98 - packages/google-cloud-language/src/index.ts | 26 + .../cloud/language/v1/doc_language_service.js | 1793 ---------------- .../src/{browser.js => v1/index.ts} | 12 +- .../src/v1/language_service_client.js | 554 ----- .../src/v1/language_service_client.ts | 691 +++++++ .../v1/language_service_client_config.json | 22 +- .../language/v1beta2/doc_language_service.js | 1803 ----------------- .../src/{v1/index.js => v1beta2/index.ts} | 10 +- .../src/v1beta2/language_service_client.js | 552 ----- .../src/v1beta2/language_service_client.ts | 734 +++++++ .../language_service_client_config.json | 18 +- packages/google-cloud-language/synth.metadata | 349 +++- packages/google-cloud-language/synth.py | 16 +- .../system-test/.eslintrc.yml | 3 +- .../system-test/fixtures/sample/src/index.js | 27 + .../fixtures/sample/src/index.ts} | 12 +- .../system-test/install.ts | 50 + ...1beta2.js => gapic-language_service-v1.ts} | 330 ++- ...1.js => gapic-language_service-v1beta2.ts} | 332 ++- packages/google-cloud-language/tsconfig.json | 19 + packages/google-cloud-language/tslint.json | 3 + .../google-cloud-language/webpack.config.js | 38 +- 28 files changed, 2256 insertions(+), 5324 deletions(-) delete mode 100644 packages/google-cloud-language/smoke-test/language_service_smoke_test.js delete mode 100644 packages/google-cloud-language/src/index.js create mode 100644 packages/google-cloud-language/src/index.ts delete mode 100644 packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js rename packages/google-cloud-language/src/{browser.js => v1/index.ts} (69%) delete mode 100644 packages/google-cloud-language/src/v1/language_service_client.js create mode 100644 packages/google-cloud-language/src/v1/language_service_client.ts delete mode 100644 packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js rename packages/google-cloud-language/src/{v1/index.js => v1beta2/index.ts} (69%) delete mode 100644 packages/google-cloud-language/src/v1beta2/language_service_client.js create mode 100644 packages/google-cloud-language/src/v1beta2/language_service_client.ts create mode 100644 packages/google-cloud-language/system-test/fixtures/sample/src/index.js rename packages/google-cloud-language/{src/v1beta2/index.js => system-test/fixtures/sample/src/index.ts} (62%) create mode 100644 packages/google-cloud-language/system-test/install.ts rename packages/google-cloud-language/test/{gapic-v1beta2.js => gapic-language_service-v1.ts} (55%) rename packages/google-cloud-language/test/{gapic-v1.js => gapic-language_service-v1beta2.ts} (54%) create mode 100644 packages/google-cloud-language/tsconfig.json create mode 100644 packages/google-cloud-language/tslint.json diff --git a/packages/google-cloud-language/.gitignore b/packages/google-cloud-language/.gitignore index 7320a52910d..dd48b9d7f36 100644 --- a/packages/google-cloud-language/.gitignore +++ b/packages/google-cloud-language/.gitignore @@ -9,3 +9,5 @@ system-test/*key.json *.lock package-lock.json __pycache__/ +.DS_Store +build/ diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index 92f704f07aa..4794bf6e1d2 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -32,7 +32,7 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'src' + 'build/src' ], includePattern: '\\.js$' }, diff --git a/packages/google-cloud-language/linkinator.config.json b/packages/google-cloud-language/linkinator.config.json index cad97afdc56..d780d6bfff5 100644 --- a/packages/google-cloud-language/linkinator.config.json +++ b/packages/google-cloud-language/linkinator.config.json @@ -2,7 +2,6 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com", - "setEndpoint.js" + "www.googleapis.com" ] } diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 637050502c0..6ba79bb6d28 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -8,10 +8,10 @@ "node": ">=8.10.0" }, "repository": "googleapis/nodejs-language", - "main": "src/index.js", + "main": "build/src/index.js", "files": [ - "protos", - "src", + "build/protos", + "build/src", "AUTHORS", "CONTRIBUTORS", "LICENSE" @@ -30,34 +30,45 @@ "Google Cloud Natural Language API" ], "scripts": { - "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", - "lint": "eslint '**/*.js'", - "samples-test": "cd samples/ && npm test && cd ../", - "system-test": "mocha system-test/*.js --timeout 600000", - "test-no-cover": "mocha test/*.js", - "test": "npm run cover", - "fix": "eslint --fix '**/*.js'", + "lint": "gts fix && eslint --fix samples/*.js", + "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", + "system-test": "mocha build/system-test", + "test": "c8 mocha build/test", + "fix": "gts fix", "docs-test": "linkinator docs", - "predocs-test": "npm run docs" + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "predocs-test": "npm run docs", + "prepare": "npm run compile" }, "dependencies": { - "google-gax": "^1.7.5" + "google-gax": "^1.9.0" }, "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", "codecov": "^3.0.2", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", + "gts": "^1.0.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "nyc": "^14.0.0", + "mocha": "^6.1.4", + "null-loader": "^3.0.0", + "pack-n-play": "^1.0.0-2", "power-assert": "^1.6.0", - "prettier": "^1.13.5" + "prettier": "^1.11.1", + "ts-loader": "^6.2.1", + "typescript": "^3.7.0", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" } } diff --git a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js b/packages/google-cloud-language/smoke-test/language_service_smoke_test.js deleted file mode 100644 index 50f18735062..00000000000 --- a/packages/google-cloud-language/smoke-test/language_service_smoke_test.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2019 Google LLC -// -// 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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -describe('LanguageServiceSmokeTest', () => { - it('successfully makes a call to the service', done => { - const language = require('../src'); - - const client = new language.v1beta2.LanguageServiceClient({ - // optional auth parameters. - }); - - const content = 'Hello, world!'; - const type = 'PLAIN_TEXT'; - const document = { - content: content, - type: type, - }; - client - .analyzeSentiment({document: document}) - .then(responses => { - const response = responses[0]; - console.log(response); - }) - .then(done) - .catch(done); - }); -}); diff --git a/packages/google-cloud-language/src/index.js b/packages/google-cloud-language/src/index.js deleted file mode 100644 index b34ed1fc877..00000000000 --- a/packages/google-cloud-language/src/index.js +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2017, Google Inc. All rights reserved. -// -// 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 -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @namespace google - */ -/** - * @namespace google.cloud - */ -/** - * @namespace google.cloud.language - */ -/** - * @namespace google.cloud.language.v1 - */ -/** - * @namespace google.cloud.language.v1beta2 - */ - -'use strict'; - -// Import the clients for each version supported by this package. -const gapic = Object.freeze({ - v1: require('./v1'), - v1beta2: require('./v1beta2'), -}); - -/** - * The `@google-cloud/language` package has the following named exports: - * - * - `LanguageServiceClient` - Reference to - * {@link v1.LanguageServiceClient} - * - `v1` - This is used for selecting or pinning a - * particular backend service version. It exports: - * - `LanguageServiceClient` - Reference to - * {@link v1.LanguageServiceClient} - * - `v1beta2` - This is used for selecting or pinning a - * particular backend service version. It exports: - * - `LanguageServiceClient` - Reference to - * {@link v1beta2.LanguageServiceClient} - * - * @module {object} @google-cloud/language - * @alias nodejs-language - * - * @example Install the client library with npm: - * npm install --save @google-cloud/language - * - * @example Import the client library: - * const language = require('@google-cloud/language'); - * - * @example Create a client that uses Application Default Credentials (ADC): - * const client = new language.LanguageServiceClient(); - * - * @example Create a client with explicit credentials: - * const client = new language.LanguageServiceClient({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json', - * }); - * - * @example include:samples/quickstart.js - * region_tag:language_quickstart - * Full quickstart example: - */ - -/** - * @type {object} - * @property {constructor} LanguageServiceClient - * Reference to {@link v1.LanguageServiceClient} - */ -module.exports = gapic.v1; - -/** - * @type {object} - * @property {constructor} LanguageServiceClient - * Reference to {@link v1.LanguageServiceClient} - */ -module.exports.v1 = gapic.v1; - -/** - * @type {object} - * @property {constructor} LanguageServiceClient - * Reference to {@link v1beta2.LanguageServiceClient} - */ -module.exports.v1beta2 = gapic.v1beta2; - -// Alias `module.exports` as `module.exports.default`, for future-proofing. -module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-cloud-language/src/index.ts b/packages/google-cloud-language/src/index.ts new file mode 100644 index 00000000000..c7557cf407c --- /dev/null +++ b/packages/google-cloud-language/src/index.ts @@ -0,0 +1,26 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1beta2 from './v1beta2'; +import * as v1 from './v1'; + +const LanguageServiceClient = v1.LanguageServiceClient; +export {v1, v1beta2, LanguageServiceClient}; +// For compatibility with JavaScript libraries we need to provide this default export: +// tslint:disable-next-line no-default-export +export default {v1, v1beta2, LanguageServiceClient}; diff --git a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js b/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js deleted file mode 100644 index bb6be889493..00000000000 --- a/packages/google-cloud-language/src/v1/doc/google/cloud/language/v1/doc_language_service.js +++ /dev/null @@ -1,1793 +0,0 @@ -// Copyright 2019 Google LLC -// -// 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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * ################################################################ # - * - * Represents the input to API methods. - * - * @property {number} type - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * The number should be among the values of [Type]{@link google.cloud.language.v1.Type} - * - * @property {string} content - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * @property {string} gcsContentUri - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * @property {string} language - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language Support](https://cloud.google.com/natural-language/docs/languages) - * lists currently supported languages for each API method. - * If the language (either specified by the caller or automatically detected) - * is not supported by the called API method, an `INVALID_ARGUMENT` error - * is returned. - * - * @typedef Document - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const Document = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The document types enum. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Type: { - - /** - * The content type is not specified. - */ - TYPE_UNSPECIFIED: 0, - - /** - * Plain text - */ - PLAIN_TEXT: 1, - - /** - * HTML - */ - HTML: 2 - } -}; - -/** - * Represents a sentence in the input document. - * - * @property {Object} text - * The sentence text. - * - * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1.TextSpan} - * - * @property {Object} sentiment - * For calls to AnalyzeSentiment or if - * AnnotateTextRequest.Features.extract_document_sentiment is set to - * true, this field will contain the sentiment for the sentence. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} - * - * @typedef Sentence - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.Sentence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const Sentence = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents a phrase in the text that is a known entity, such as - * a person, an organization, or location. The API associates information, such - * as salience and mentions, with entities. - * - * @property {string} name - * The representative name for the entity. - * - * @property {number} type - * The entity type. - * - * The number should be among the values of [Type]{@link google.cloud.language.v1.Type} - * - * @property {Object.} metadata - * Metadata associated with the entity. - * - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * @property {number} salience - * The salience score associated with the entity in the [0, 1.0] range. - * - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * @property {Object[]} mentions - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * This object should have the same structure as [EntityMention]{@link google.cloud.language.v1.EntityMention} - * - * @property {Object} sentiment - * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} - * - * @typedef Entity - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const Entity = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The type of the entity. For most entity types, the associated metadata is a - * Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table - * below lists the associated fields for entities that have different - * metadata. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Type: { - - /** - * Unknown - */ - UNKNOWN: 0, - - /** - * Person - */ - PERSON: 1, - - /** - * Location - */ - LOCATION: 2, - - /** - * Organization - */ - ORGANIZATION: 3, - - /** - * Event - */ - EVENT: 4, - - /** - * Artwork - */ - WORK_OF_ART: 5, - - /** - * Consumer product - */ - CONSUMER_GOOD: 6, - - /** - * Other types of entities - */ - OTHER: 7, - - /** - * Phone number

- * The metadata lists the phone number, formatted according to local - * convention, plus whichever additional elements appear in the text:
    - *
  • number – the actual number, broken down into - * sections as per local convention
  • national_prefix - * – country code, if detected
  • area_code – - * region or area code, if detected
  • extension – - * phone extension (to be dialed after connection), if detected
- */ - PHONE_NUMBER: 9, - - /** - * Address

- * The metadata identifies the street number and locality plus whichever - * additional elements appear in the text:
    - *
  • street_number – street number
  • - *
  • locality – city or town
  • - *
  • street_name – street/route name, if detected
  • - *
  • postal_code – postal code, if detected
  • - *
  • country – country, if detected
  • - *
  • broad_region – administrative area, such as the - * state, if detected
  • narrow_region – smaller - * administrative area, such as county, if detected
  • - *
  • sublocality – used in Asian addresses to demark a - * district within a city, if detected
- */ - ADDRESS: 10, - - /** - * Date

- * The metadata identifies the components of the date:
    - *
  • year – four digit year, if detected
  • - *
  • month – two digit month number, if detected
  • - *
  • day – two digit day number, if detected
- */ - DATE: 11, - - /** - * Number

- * The metadata is the number itself. - */ - NUMBER: 12, - - /** - * Price

- * The metadata identifies the value and currency. - */ - PRICE: 13 - } -}; - -/** - * Represents the smallest syntactic building block of the text. - * - * @property {Object} text - * The token text. - * - * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1.TextSpan} - * - * @property {Object} partOfSpeech - * Parts of speech tag for this token. - * - * This object should have the same structure as [PartOfSpeech]{@link google.cloud.language.v1.PartOfSpeech} - * - * @property {Object} dependencyEdge - * Dependency tree parse for this token. - * - * This object should have the same structure as [DependencyEdge]{@link google.cloud.language.v1.DependencyEdge} - * - * @property {string} lemma - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * @typedef Token - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.Token definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const Token = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents the feeling associated with the entire text or entities in - * the text. - * - * @property {number} magnitude - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * @property {number} score - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * @typedef Sentiment - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.Sentiment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const Sentiment = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents part of speech information for a token. Parts of speech - * are as defined in - * http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf - * - * @property {number} tag - * The part of speech tag. - * - * The number should be among the values of [Tag]{@link google.cloud.language.v1.Tag} - * - * @property {number} aspect - * The grammatical aspect. - * - * The number should be among the values of [Aspect]{@link google.cloud.language.v1.Aspect} - * - * @property {number} case - * The grammatical case. - * - * The number should be among the values of [Case]{@link google.cloud.language.v1.Case} - * - * @property {number} form - * The grammatical form. - * - * The number should be among the values of [Form]{@link google.cloud.language.v1.Form} - * - * @property {number} gender - * The grammatical gender. - * - * The number should be among the values of [Gender]{@link google.cloud.language.v1.Gender} - * - * @property {number} mood - * The grammatical mood. - * - * The number should be among the values of [Mood]{@link google.cloud.language.v1.Mood} - * - * @property {number} number - * The grammatical number. - * - * The number should be among the values of [Number]{@link google.cloud.language.v1.Number} - * - * @property {number} person - * The grammatical person. - * - * The number should be among the values of [Person]{@link google.cloud.language.v1.Person} - * - * @property {number} proper - * The grammatical properness. - * - * The number should be among the values of [Proper]{@link google.cloud.language.v1.Proper} - * - * @property {number} reciprocity - * The grammatical reciprocity. - * - * The number should be among the values of [Reciprocity]{@link google.cloud.language.v1.Reciprocity} - * - * @property {number} tense - * The grammatical tense. - * - * The number should be among the values of [Tense]{@link google.cloud.language.v1.Tense} - * - * @property {number} voice - * The grammatical voice. - * - * The number should be among the values of [Voice]{@link google.cloud.language.v1.Voice} - * - * @typedef PartOfSpeech - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.PartOfSpeech definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const PartOfSpeech = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The characteristic of a verb that expresses time flow during an event. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Aspect: { - - /** - * Aspect is not applicable in the analyzed language or is not predicted. - */ - ASPECT_UNKNOWN: 0, - - /** - * Perfective - */ - PERFECTIVE: 1, - - /** - * Imperfective - */ - IMPERFECTIVE: 2, - - /** - * Progressive - */ - PROGRESSIVE: 3 - }, - - /** - * The grammatical function performed by a noun or pronoun in a phrase, - * clause, or sentence. In some languages, other parts of speech, such as - * adjective and determiner, take case inflection in agreement with the noun. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Case: { - - /** - * Case is not applicable in the analyzed language or is not predicted. - */ - CASE_UNKNOWN: 0, - - /** - * Accusative - */ - ACCUSATIVE: 1, - - /** - * Adverbial - */ - ADVERBIAL: 2, - - /** - * Complementive - */ - COMPLEMENTIVE: 3, - - /** - * Dative - */ - DATIVE: 4, - - /** - * Genitive - */ - GENITIVE: 5, - - /** - * Instrumental - */ - INSTRUMENTAL: 6, - - /** - * Locative - */ - LOCATIVE: 7, - - /** - * Nominative - */ - NOMINATIVE: 8, - - /** - * Oblique - */ - OBLIQUE: 9, - - /** - * Partitive - */ - PARTITIVE: 10, - - /** - * Prepositional - */ - PREPOSITIONAL: 11, - - /** - * Reflexive - */ - REFLEXIVE_CASE: 12, - - /** - * Relative - */ - RELATIVE_CASE: 13, - - /** - * Vocative - */ - VOCATIVE: 14 - }, - - /** - * Depending on the language, Form can be categorizing different forms of - * verbs, adjectives, adverbs, etc. For example, categorizing inflected - * endings of verbs and adjectives or distinguishing between short and long - * forms of adjectives and participles - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Form: { - - /** - * Form is not applicable in the analyzed language or is not predicted. - */ - FORM_UNKNOWN: 0, - - /** - * Adnomial - */ - ADNOMIAL: 1, - - /** - * Auxiliary - */ - AUXILIARY: 2, - - /** - * Complementizer - */ - COMPLEMENTIZER: 3, - - /** - * Final ending - */ - FINAL_ENDING: 4, - - /** - * Gerund - */ - GERUND: 5, - - /** - * Realis - */ - REALIS: 6, - - /** - * Irrealis - */ - IRREALIS: 7, - - /** - * Short form - */ - SHORT: 8, - - /** - * Long form - */ - LONG: 9, - - /** - * Order form - */ - ORDER: 10, - - /** - * Specific form - */ - SPECIFIC: 11 - }, - - /** - * Gender classes of nouns reflected in the behaviour of associated words. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Gender: { - - /** - * Gender is not applicable in the analyzed language or is not predicted. - */ - GENDER_UNKNOWN: 0, - - /** - * Feminine - */ - FEMININE: 1, - - /** - * Masculine - */ - MASCULINE: 2, - - /** - * Neuter - */ - NEUTER: 3 - }, - - /** - * The grammatical feature of verbs, used for showing modality and attitude. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Mood: { - - /** - * Mood is not applicable in the analyzed language or is not predicted. - */ - MOOD_UNKNOWN: 0, - - /** - * Conditional - */ - CONDITIONAL_MOOD: 1, - - /** - * Imperative - */ - IMPERATIVE: 2, - - /** - * Indicative - */ - INDICATIVE: 3, - - /** - * Interrogative - */ - INTERROGATIVE: 4, - - /** - * Jussive - */ - JUSSIVE: 5, - - /** - * Subjunctive - */ - SUBJUNCTIVE: 6 - }, - - /** - * Count distinctions. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Number: { - - /** - * Number is not applicable in the analyzed language or is not predicted. - */ - NUMBER_UNKNOWN: 0, - - /** - * Singular - */ - SINGULAR: 1, - - /** - * Plural - */ - PLURAL: 2, - - /** - * Dual - */ - DUAL: 3 - }, - - /** - * The distinction between the speaker, second person, third person, etc. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Person: { - - /** - * Person is not applicable in the analyzed language or is not predicted. - */ - PERSON_UNKNOWN: 0, - - /** - * First - */ - FIRST: 1, - - /** - * Second - */ - SECOND: 2, - - /** - * Third - */ - THIRD: 3, - - /** - * Reflexive - */ - REFLEXIVE_PERSON: 4 - }, - - /** - * This category shows if the token is part of a proper name. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Proper: { - - /** - * Proper is not applicable in the analyzed language or is not predicted. - */ - PROPER_UNKNOWN: 0, - - /** - * Proper - */ - PROPER: 1, - - /** - * Not proper - */ - NOT_PROPER: 2 - }, - - /** - * Reciprocal features of a pronoun. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Reciprocity: { - - /** - * Reciprocity is not applicable in the analyzed language or is not - * predicted. - */ - RECIPROCITY_UNKNOWN: 0, - - /** - * Reciprocal - */ - RECIPROCAL: 1, - - /** - * Non-reciprocal - */ - NON_RECIPROCAL: 2 - }, - - /** - * The part of speech tags enum. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Tag: { - - /** - * Unknown - */ - UNKNOWN: 0, - - /** - * Adjective - */ - ADJ: 1, - - /** - * Adposition (preposition and postposition) - */ - ADP: 2, - - /** - * Adverb - */ - ADV: 3, - - /** - * Conjunction - */ - CONJ: 4, - - /** - * Determiner - */ - DET: 5, - - /** - * Noun (common and proper) - */ - NOUN: 6, - - /** - * Cardinal number - */ - NUM: 7, - - /** - * Pronoun - */ - PRON: 8, - - /** - * Particle or other function word - */ - PRT: 9, - - /** - * Punctuation - */ - PUNCT: 10, - - /** - * Verb (all tenses and modes) - */ - VERB: 11, - - /** - * Other: foreign words, typos, abbreviations - */ - X: 12, - - /** - * Affix - */ - AFFIX: 13 - }, - - /** - * Time reference. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Tense: { - - /** - * Tense is not applicable in the analyzed language or is not predicted. - */ - TENSE_UNKNOWN: 0, - - /** - * Conditional - */ - CONDITIONAL_TENSE: 1, - - /** - * Future - */ - FUTURE: 2, - - /** - * Past - */ - PAST: 3, - - /** - * Present - */ - PRESENT: 4, - - /** - * Imperfect - */ - IMPERFECT: 5, - - /** - * Pluperfect - */ - PLUPERFECT: 6 - }, - - /** - * The relationship between the action that a verb expresses and the - * participants identified by its arguments. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Voice: { - - /** - * Voice is not applicable in the analyzed language or is not predicted. - */ - VOICE_UNKNOWN: 0, - - /** - * Active - */ - ACTIVE: 1, - - /** - * Causative - */ - CAUSATIVE: 2, - - /** - * Passive - */ - PASSIVE: 3 - } -}; - -/** - * Represents dependency parse tree information for a token. (For more - * information on dependency labels, see - * http://www.aclweb.org/anthology/P13-2017 - * - * @property {number} headTokenIndex - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * @property {number} label - * The parse label for the token. - * - * The number should be among the values of [Label]{@link google.cloud.language.v1.Label} - * - * @typedef DependencyEdge - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.DependencyEdge definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const DependencyEdge = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The parse label enum for the token. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Label: { - - /** - * Unknown - */ - UNKNOWN: 0, - - /** - * Abbreviation modifier - */ - ABBREV: 1, - - /** - * Adjectival complement - */ - ACOMP: 2, - - /** - * Adverbial clause modifier - */ - ADVCL: 3, - - /** - * Adverbial modifier - */ - ADVMOD: 4, - - /** - * Adjectival modifier of an NP - */ - AMOD: 5, - - /** - * Appositional modifier of an NP - */ - APPOS: 6, - - /** - * Attribute dependent of a copular verb - */ - ATTR: 7, - - /** - * Auxiliary (non-main) verb - */ - AUX: 8, - - /** - * Passive auxiliary - */ - AUXPASS: 9, - - /** - * Coordinating conjunction - */ - CC: 10, - - /** - * Clausal complement of a verb or adjective - */ - CCOMP: 11, - - /** - * Conjunct - */ - CONJ: 12, - - /** - * Clausal subject - */ - CSUBJ: 13, - - /** - * Clausal passive subject - */ - CSUBJPASS: 14, - - /** - * Dependency (unable to determine) - */ - DEP: 15, - - /** - * Determiner - */ - DET: 16, - - /** - * Discourse - */ - DISCOURSE: 17, - - /** - * Direct object - */ - DOBJ: 18, - - /** - * Expletive - */ - EXPL: 19, - - /** - * Goes with (part of a word in a text not well edited) - */ - GOESWITH: 20, - - /** - * Indirect object - */ - IOBJ: 21, - - /** - * Marker (word introducing a subordinate clause) - */ - MARK: 22, - - /** - * Multi-word expression - */ - MWE: 23, - - /** - * Multi-word verbal expression - */ - MWV: 24, - - /** - * Negation modifier - */ - NEG: 25, - - /** - * Noun compound modifier - */ - NN: 26, - - /** - * Noun phrase used as an adverbial modifier - */ - NPADVMOD: 27, - - /** - * Nominal subject - */ - NSUBJ: 28, - - /** - * Passive nominal subject - */ - NSUBJPASS: 29, - - /** - * Numeric modifier of a noun - */ - NUM: 30, - - /** - * Element of compound number - */ - NUMBER: 31, - - /** - * Punctuation mark - */ - P: 32, - - /** - * Parataxis relation - */ - PARATAXIS: 33, - - /** - * Participial modifier - */ - PARTMOD: 34, - - /** - * The complement of a preposition is a clause - */ - PCOMP: 35, - - /** - * Object of a preposition - */ - POBJ: 36, - - /** - * Possession modifier - */ - POSS: 37, - - /** - * Postverbal negative particle - */ - POSTNEG: 38, - - /** - * Predicate complement - */ - PRECOMP: 39, - - /** - * Preconjunt - */ - PRECONJ: 40, - - /** - * Predeterminer - */ - PREDET: 41, - - /** - * Prefix - */ - PREF: 42, - - /** - * Prepositional modifier - */ - PREP: 43, - - /** - * The relationship between a verb and verbal morpheme - */ - PRONL: 44, - - /** - * Particle - */ - PRT: 45, - - /** - * Associative or possessive marker - */ - PS: 46, - - /** - * Quantifier phrase modifier - */ - QUANTMOD: 47, - - /** - * Relative clause modifier - */ - RCMOD: 48, - - /** - * Complementizer in relative clause - */ - RCMODREL: 49, - - /** - * Ellipsis without a preceding predicate - */ - RDROP: 50, - - /** - * Referent - */ - REF: 51, - - /** - * Remnant - */ - REMNANT: 52, - - /** - * Reparandum - */ - REPARANDUM: 53, - - /** - * Root - */ - ROOT: 54, - - /** - * Suffix specifying a unit of number - */ - SNUM: 55, - - /** - * Suffix - */ - SUFF: 56, - - /** - * Temporal modifier - */ - TMOD: 57, - - /** - * Topic marker - */ - TOPIC: 58, - - /** - * Clause headed by an infinite form of the verb that modifies a noun - */ - VMOD: 59, - - /** - * Vocative - */ - VOCATIVE: 60, - - /** - * Open clausal complement - */ - XCOMP: 61, - - /** - * Name suffix - */ - SUFFIX: 62, - - /** - * Name title - */ - TITLE: 63, - - /** - * Adverbial phrase modifier - */ - ADVPHMOD: 64, - - /** - * Causative auxiliary - */ - AUXCAUS: 65, - - /** - * Helper auxiliary - */ - AUXVV: 66, - - /** - * Rentaishi (Prenominal modifier) - */ - DTMOD: 67, - - /** - * Foreign words - */ - FOREIGN: 68, - - /** - * Keyword - */ - KW: 69, - - /** - * List for chains of comparable items - */ - LIST: 70, - - /** - * Nominalized clause - */ - NOMC: 71, - - /** - * Nominalized clausal subject - */ - NOMCSUBJ: 72, - - /** - * Nominalized clausal passive - */ - NOMCSUBJPASS: 73, - - /** - * Compound of numeric modifier - */ - NUMC: 74, - - /** - * Copula - */ - COP: 75, - - /** - * Dislocated relation (for fronted/topicalized elements) - */ - DISLOCATED: 76, - - /** - * Aspect marker - */ - ASP: 77, - - /** - * Genitive modifier - */ - GMOD: 78, - - /** - * Genitive object - */ - GOBJ: 79, - - /** - * Infinitival modifier - */ - INFMOD: 80, - - /** - * Measure - */ - MES: 81, - - /** - * Nominal complement of a noun - */ - NCOMP: 82 - } -}; - -/** - * Represents a mention for an entity in the text. Currently, proper noun - * mentions are supported. - * - * @property {Object} text - * The mention text. - * - * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1.TextSpan} - * - * @property {number} type - * The type of the entity mention. - * - * The number should be among the values of [Type]{@link google.cloud.language.v1.Type} - * - * @property {Object} sentiment - * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} - * - * @typedef EntityMention - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.EntityMention definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const EntityMention = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The supported types of mentions. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ - Type: { - - /** - * Unknown - */ - TYPE_UNKNOWN: 0, - - /** - * Proper name - */ - PROPER: 1, - - /** - * Common noun (or noun compound) - */ - COMMON: 2 - } -}; - -/** - * Represents an output piece of text. - * - * @property {string} content - * The content of the output text. - * - * @property {number} beginOffset - * The API calculates the beginning offset of the content in the original - * document according to the EncodingType specified in the API request. - * - * @typedef TextSpan - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.TextSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const TextSpan = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents a category returned from the text classifier. - * - * @property {string} name - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * @property {number} confidence - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * @typedef ClassificationCategory - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.ClassificationCategory definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const ClassificationCategory = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The sentiment analysis request message. - * - * @property {Object} document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * - * @property {number} encodingType - * The encoding type used by the API to calculate sentence offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * - * @typedef AnalyzeSentimentRequest - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnalyzeSentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnalyzeSentimentRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The sentiment analysis response message. - * - * @property {Object} documentSentiment - * The overall sentiment of the input document. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @property {Object[]} sentences - * The sentiment for all the sentences in the document. - * - * This object should have the same structure as [Sentence]{@link google.cloud.language.v1.Sentence} - * - * @typedef AnalyzeSentimentResponse - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnalyzeSentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnalyzeSentimentResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The entity-level sentiment analysis request message. - * - * @property {Object} document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * - * @property {number} encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * - * @typedef AnalyzeEntitySentimentRequest - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnalyzeEntitySentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnalyzeEntitySentimentRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The entity-level sentiment analysis response message. - * - * @property {Object[]} entities - * The recognized entities in the input document with associated sentiments. - * - * This object should have the same structure as [Entity]{@link google.cloud.language.v1.Entity} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @typedef AnalyzeEntitySentimentResponse - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnalyzeEntitySentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnalyzeEntitySentimentResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The entity analysis request message. - * - * @property {Object} document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * - * @property {number} encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * - * @typedef AnalyzeEntitiesRequest - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnalyzeEntitiesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnalyzeEntitiesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The entity analysis response message. - * - * @property {Object[]} entities - * The recognized entities in the input document. - * - * This object should have the same structure as [Entity]{@link google.cloud.language.v1.Entity} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @typedef AnalyzeEntitiesResponse - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnalyzeEntitiesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnalyzeEntitiesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The syntax analysis request message. - * - * @property {Object} document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * - * @property {number} encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * - * @typedef AnalyzeSyntaxRequest - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnalyzeSyntaxRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnalyzeSyntaxRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The syntax analysis response message. - * - * @property {Object[]} sentences - * Sentences in the input document. - * - * This object should have the same structure as [Sentence]{@link google.cloud.language.v1.Sentence} - * - * @property {Object[]} tokens - * Tokens, along with their syntactic information, in the input document. - * - * This object should have the same structure as [Token]{@link google.cloud.language.v1.Token} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @typedef AnalyzeSyntaxResponse - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnalyzeSyntaxResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnalyzeSyntaxResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The document classification request message. - * - * @property {Object} document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * - * @typedef ClassifyTextRequest - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.ClassifyTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const ClassifyTextRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The document classification response message. - * - * @property {Object[]} categories - * Categories representing the input document. - * - * This object should have the same structure as [ClassificationCategory]{@link google.cloud.language.v1.ClassificationCategory} - * - * @typedef ClassifyTextResponse - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.ClassifyTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const ClassifyTextResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The request message for the text annotation API, which can perform multiple - * analysis types (sentiment, entities, and syntax) in one call. - * - * @property {Object} document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * - * @property {Object} features - * The enabled features. - * - * This object should have the same structure as [Features]{@link google.cloud.language.v1.Features} - * - * @property {number} encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * - * @typedef AnnotateTextRequest - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnnotateTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnnotateTextRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * All available features for sentiment, syntax, and semantic analysis. - * Setting each one to true will enable that specific analysis for the input. - * - * @property {boolean} extractSyntax - * Extract syntax information. - * - * @property {boolean} extractEntities - * Extract entities. - * - * @property {boolean} extractDocumentSentiment - * Extract document-level sentiment. - * - * @property {boolean} extractEntitySentiment - * Extract entities and their associated sentiment. - * - * @property {boolean} classifyText - * Classify the full document into categories. - * - * @typedef Features - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnnotateTextRequest.Features definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ - Features: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * The text annotations response message. - * - * @property {Object[]} sentences - * Sentences in the input document. Populated if the user enables - * AnnotateTextRequest.Features.extract_syntax. - * - * This object should have the same structure as [Sentence]{@link google.cloud.language.v1.Sentence} - * - * @property {Object[]} tokens - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * AnnotateTextRequest.Features.extract_syntax. - * - * This object should have the same structure as [Token]{@link google.cloud.language.v1.Token} - * - * @property {Object[]} entities - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * AnnotateTextRequest.Features.extract_entities. - * - * This object should have the same structure as [Entity]{@link google.cloud.language.v1.Entity} - * - * @property {Object} documentSentiment - * The overall sentiment for the document. Populated if the user enables - * AnnotateTextRequest.Features.extract_document_sentiment. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1.Sentiment} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @property {Object[]} categories - * Categories identified in the input document. - * - * This object should have the same structure as [ClassificationCategory]{@link google.cloud.language.v1.ClassificationCategory} - * - * @typedef AnnotateTextResponse - * @memberof google.cloud.language.v1 - * @see [google.cloud.language.v1.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1/language_service.proto} - */ -const AnnotateTextResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents the text encoding that the caller uses to process the output. - * Providing an `EncodingType` is recommended because the API provides the - * beginning offsets for various outputs, such as tokens and mentions, and - * languages that natively use different text encodings may access offsets - * differently. - * - * @enum {number} - * @memberof google.cloud.language.v1 - */ -const EncodingType = { - - /** - * If `EncodingType` is not specified, encoding-dependent information (such as - * `begin_offset`) will be set at `-1`. - */ - NONE: 0, - - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-8 encoding of the input. C++ and Go are examples of languages - * that use this encoding natively. - */ - UTF8: 1, - - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-16 encoding of the input. Java and JavaScript are examples of - * languages that use this encoding natively. - */ - UTF16: 2, - - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-32 encoding of the input. Python is an example of a language - * that uses this encoding natively. - */ - UTF32: 3 -}; \ No newline at end of file diff --git a/packages/google-cloud-language/src/browser.js b/packages/google-cloud-language/src/v1/index.ts similarity index 69% rename from packages/google-cloud-language/src/browser.js rename to packages/google-cloud-language/src/v1/index.ts index ddbcd7ecb9a..d009018811b 100644 --- a/packages/google-cloud-language/src/browser.js +++ b/packages/google-cloud-language/src/v1/index.ts @@ -11,11 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; - -// Set a flag that we are running in a browser bundle. -global.isBrowser = true; - -// Re-export all exports from ./index.js. -module.exports = require('./index'); +export {LanguageServiceClient} from './language_service_client'; diff --git a/packages/google-cloud-language/src/v1/language_service_client.js b/packages/google-cloud-language/src/v1/language_service_client.js deleted file mode 100644 index 155fada1de1..00000000000 --- a/packages/google-cloud-language/src/v1/language_service_client.js +++ /dev/null @@ -1,554 +0,0 @@ -// Copyright 2019 Google LLC -// -// 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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const gapicConfig = require('./language_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * Provides text analysis operations such as sentiment analysis and entity - * recognition. - * - * @class - * @memberof v1 - */ -class LanguageServiceClient { - /** - * Construct an instance of LanguageServiceClient. - * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {function} [options.promise] - Custom promise module to use instead - * of native Promises. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - */ - constructor(opts) { - opts = opts || {}; - this._descriptors = {}; - - if (global.isBrowser) { - // If we're in browser, we use gRPC fallback. - opts.fallback = true; - } - - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; - - const servicePath = - opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; - - // Ensure that options include the service address and port. - opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath, - }, - opts - ); - - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = this.constructor.scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); - - // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth; - - // Determine the client header string. - const clientHeader = []; - - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } - clientHeader.push(`gax/${gaxModule.version}`); - if (opts.fallback) { - clientHeader.push(`gl-web/${gaxModule.version}`); - } else { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); - } - clientHeader.push(`gapic/${VERSION}`); - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - - // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - const protos = gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath - ); - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.cloud.language.v1.LanguageService', - gapicConfig, - opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')} - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this._innerApiCalls = {}; - - // Put together the "service stub" for - // google.cloud.language.v1.LanguageService. - const languageServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.cloud.language.v1.LanguageService') - : protos.google.cloud.language.v1.LanguageService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const languageServiceStubMethods = [ - 'analyzeSentiment', - 'analyzeEntities', - 'analyzeEntitySentiment', - 'analyzeSyntax', - 'classifyText', - 'annotateText', - ]; - for (const methodName of languageServiceStubMethods) { - const innerCallPromise = languageServiceStub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - null - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'language.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'language.googleapis.com'; - } - - /** - * The port for this API service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-language', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - } - - /** - * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. - */ - getProjectId(callback) { - return this.auth.getProjectId(callback); - } - - // ------------------- - // -- Service calls -- - // ------------------- - - /** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate sentence offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.analyzeSentiment({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - analyzeSentiment(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.analyzeSentiment(request, options, callback); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.analyzeEntities({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - analyzeEntities(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.analyzeEntities(request, options, callback); - } - - /** - * Finds entities, similar to AnalyzeEntities in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.analyzeEntitySentiment({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - analyzeEntitySentiment(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.analyzeEntitySentiment( - request, - options, - callback - ); - } - - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.analyzeSyntax({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - analyzeSyntax(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.analyzeSyntax(request, options, callback); - } - - /** - * Classifies a document into categories. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.classifyText({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - classifyText(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.classifyText(request, options, callback); - } - - /** - * A convenience method that provides all the features that analyzeSentiment, - * analyzeEntities, and analyzeSyntax provide in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1.Document} - * @param {Object} request.features - * The enabled features. - * - * This object should have the same structure as [Features]{@link google.cloud.language.v1.Features} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * const features = {}; - * const request = { - * document: document, - * features: features, - * }; - * client.annotateText(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - annotateText(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.annotateText(request, options, callback); - } -} - -module.exports = LanguageServiceClient; diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts new file mode 100644 index 00000000000..ffa2e1b841f --- /dev/null +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -0,0 +1,691 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; +import * as path from 'path'; + +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './language_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Provides text analysis operations such as sentiment analysis and entity + * recognition. + * @class + * @memberof v1 + */ +export class LanguageServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _terminated = false; + auth: gax.GoogleAuth; + languageServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of LanguageServiceClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof LanguageServiceClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof LanguageServiceClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + const protos = gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.language.v1.LanguageService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; + + // Put together the "service stub" for + // google.cloud.language.v1.LanguageService. + this.languageServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.language.v1.LanguageService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.language.v1.LanguageService, + opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const languageServiceStubMethods = [ + 'analyzeSentiment', + 'analyzeEntities', + 'analyzeEntitySentiment', + 'analyzeSyntax', + 'classifyText', + 'annotateText', + ]; + + for (const methodName of languageServiceStubMethods) { + const innerCallPromise = this.languageServiceStub.then( + stub => (...args: Array<{}>) => { + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'language.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'language.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-language', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + analyzeSentiment( + request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, + protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, + {} | undefined + ] + >; + analyzeSentiment( + request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, + protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, + {} | undefined + > + ): void; + /** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate sentence offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + analyzeSentiment( + request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, + | protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, + protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, + protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.analyzeSentiment(request, options, callback); + } + analyzeEntities( + request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, + {} | undefined + ] + >; + analyzeEntities( + request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, + {} | undefined + > + ): void; + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + analyzeEntities( + request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, + | protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.analyzeEntities(request, options, callback); + } + analyzeEntitySentiment( + request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + ( + | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | undefined + ), + {} | undefined + ] + >; + analyzeEntitySentiment( + request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | undefined, + {} | undefined + > + ): void; + /** + * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + analyzeEntitySentiment( + request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + ( + | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.analyzeEntitySentiment( + request, + options, + callback + ); + } + analyzeSyntax( + request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, + {} | undefined + ] + >; + analyzeSyntax( + request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, + {} | undefined + > + ): void; + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + analyzeSyntax( + request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, + | protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.analyzeSyntax(request, options, callback); + } + classifyText( + request: protosTypes.google.cloud.language.v1.IClassifyTextRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1.IClassifyTextResponse, + protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, + {} | undefined + ] + >; + classifyText( + request: protosTypes.google.cloud.language.v1.IClassifyTextRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1.IClassifyTextResponse, + protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, + {} | undefined + > + ): void; + /** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + classifyText( + request: protosTypes.google.cloud.language.v1.IClassifyTextRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1.IClassifyTextResponse, + protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1.IClassifyTextResponse, + protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1.IClassifyTextResponse, + protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.classifyText(request, options, callback); + } + annotateText( + request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnnotateTextResponse, + protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, + {} | undefined + ] + >; + annotateText( + request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1.IAnnotateTextResponse, + protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, + {} | undefined + > + ): void; + /** + * A convenience method that provides all the features that analyzeSentiment, + * analyzeEntities, and analyzeSyntax provide in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.AnnotateTextRequest.Features} request.features + * The enabled features. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + annotateText( + request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1.IAnnotateTextResponse, + protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1.IAnnotateTextResponse, + protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1.IAnnotateTextResponse, + protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.annotateText(request, options, callback); + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this.languageServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-language/src/v1/language_service_client_config.json b/packages/google-cloud-language/src/v1/language_service_client_config.json index d370c9322e7..4ee37da9595 100644 --- a/packages/google-cloud-language/src/v1/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1/language_service_client_config.json @@ -2,51 +2,51 @@ "interfaces": { "google.cloud.language.v1.LanguageService": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "retry_params": { "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "AnalyzeSentiment": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnalyzeEntities": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnalyzeEntitySentiment": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnalyzeSyntax": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ClassifyText": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnnotateText": { - "timeout_millis": 60000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js b/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js deleted file mode 100644 index 4f3676875b8..00000000000 --- a/packages/google-cloud-language/src/v1beta2/doc/google/cloud/language/v1beta2/doc_language_service.js +++ /dev/null @@ -1,1803 +0,0 @@ -// Copyright 2019 Google LLC -// -// 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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * ################################################################ # - * - * Represents the input to API methods. - * - * @property {number} type - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * The number should be among the values of [Type]{@link google.cloud.language.v1beta2.Type} - * - * @property {string} content - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * @property {string} gcsContentUri - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * @property {string} language - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language Support](https://cloud.google.com/natural-language/docs/languages) - * lists currently supported languages for each API method. - * If the language (either specified by the caller or automatically detected) - * is not supported by the called API method, an `INVALID_ARGUMENT` error - * is returned. - * - * @typedef Document - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.Document definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const Document = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The document types enum. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Type: { - - /** - * The content type is not specified. - */ - TYPE_UNSPECIFIED: 0, - - /** - * Plain text - */ - PLAIN_TEXT: 1, - - /** - * HTML - */ - HTML: 2 - } -}; - -/** - * Represents a sentence in the input document. - * - * @property {Object} text - * The sentence text. - * - * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1beta2.TextSpan} - * - * @property {Object} sentiment - * For calls to AnalyzeSentiment or if - * AnnotateTextRequest.Features.extract_document_sentiment is set to - * true, this field will contain the sentiment for the sentence. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} - * - * @typedef Sentence - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.Sentence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const Sentence = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents a phrase in the text that is a known entity, such as - * a person, an organization, or location. The API associates information, such - * as salience and mentions, with entities. - * - * @property {string} name - * The representative name for the entity. - * - * @property {number} type - * The entity type. - * - * The number should be among the values of [Type]{@link google.cloud.language.v1beta2.Type} - * - * @property {Object.} metadata - * Metadata associated with the entity. - * - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * @property {number} salience - * The salience score associated with the entity in the [0, 1.0] range. - * - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * @property {Object[]} mentions - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * This object should have the same structure as [EntityMention]{@link google.cloud.language.v1beta2.EntityMention} - * - * @property {Object} sentiment - * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} - * - * @typedef Entity - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.Entity definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const Entity = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The type of the entity. For most entity types, the associated metadata is a - * Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table - * below lists the associated fields for entities that have different - * metadata. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Type: { - - /** - * Unknown - */ - UNKNOWN: 0, - - /** - * Person - */ - PERSON: 1, - - /** - * Location - */ - LOCATION: 2, - - /** - * Organization - */ - ORGANIZATION: 3, - - /** - * Event - */ - EVENT: 4, - - /** - * Artwork - */ - WORK_OF_ART: 5, - - /** - * Consumer product - */ - CONSUMER_GOOD: 6, - - /** - * Other types of entities - */ - OTHER: 7, - - /** - * Phone number - * - * The metadata lists the phone number, formatted according to local - * convention, plus whichever additional elements appear in the text: - * - * * `number` - the actual number, broken down into sections as per local - * convention - * * `national_prefix` - country code, if detected - * * `area_code` - region or area code, if detected - * * `extension` - phone extension (to be dialed after connection), if - * detected - */ - PHONE_NUMBER: 9, - - /** - * Address - * - * The metadata identifies the street number and locality plus whichever - * additional elements appear in the text: - * - * * `street_number` - street number - * * `locality` - city or town - * * `street_name` - street/route name, if detected - * * `postal_code` - postal code, if detected - * * `country` - country, if detected< - * * `broad_region` - administrative area, such as the state, if detected - * * `narrow_region` - smaller administrative area, such as county, if - * detected - * * `sublocality` - used in Asian addresses to demark a district within a - * city, if detected - */ - ADDRESS: 10, - - /** - * Date - * - * The metadata identifies the components of the date: - * - * * `year` - four digit year, if detected - * * `month` - two digit month number, if detected - * * `day` - two digit day number, if detected - */ - DATE: 11, - - /** - * Number - * - * The metadata is the number itself. - */ - NUMBER: 12, - - /** - * Price - * - * The metadata identifies the `value` and `currency`. - */ - PRICE: 13 - } -}; - -/** - * Represents the smallest syntactic building block of the text. - * - * @property {Object} text - * The token text. - * - * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1beta2.TextSpan} - * - * @property {Object} partOfSpeech - * Parts of speech tag for this token. - * - * This object should have the same structure as [PartOfSpeech]{@link google.cloud.language.v1beta2.PartOfSpeech} - * - * @property {Object} dependencyEdge - * Dependency tree parse for this token. - * - * This object should have the same structure as [DependencyEdge]{@link google.cloud.language.v1beta2.DependencyEdge} - * - * @property {string} lemma - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * @typedef Token - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.Token definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const Token = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents the feeling associated with the entire text or entities in - * the text. - * Next ID: 6 - * - * @property {number} magnitude - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * @property {number} score - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * @typedef Sentiment - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.Sentiment definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const Sentiment = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents part of speech information for a token. - * - * @property {number} tag - * The part of speech tag. - * - * The number should be among the values of [Tag]{@link google.cloud.language.v1beta2.Tag} - * - * @property {number} aspect - * The grammatical aspect. - * - * The number should be among the values of [Aspect]{@link google.cloud.language.v1beta2.Aspect} - * - * @property {number} case - * The grammatical case. - * - * The number should be among the values of [Case]{@link google.cloud.language.v1beta2.Case} - * - * @property {number} form - * The grammatical form. - * - * The number should be among the values of [Form]{@link google.cloud.language.v1beta2.Form} - * - * @property {number} gender - * The grammatical gender. - * - * The number should be among the values of [Gender]{@link google.cloud.language.v1beta2.Gender} - * - * @property {number} mood - * The grammatical mood. - * - * The number should be among the values of [Mood]{@link google.cloud.language.v1beta2.Mood} - * - * @property {number} number - * The grammatical number. - * - * The number should be among the values of [Number]{@link google.cloud.language.v1beta2.Number} - * - * @property {number} person - * The grammatical person. - * - * The number should be among the values of [Person]{@link google.cloud.language.v1beta2.Person} - * - * @property {number} proper - * The grammatical properness. - * - * The number should be among the values of [Proper]{@link google.cloud.language.v1beta2.Proper} - * - * @property {number} reciprocity - * The grammatical reciprocity. - * - * The number should be among the values of [Reciprocity]{@link google.cloud.language.v1beta2.Reciprocity} - * - * @property {number} tense - * The grammatical tense. - * - * The number should be among the values of [Tense]{@link google.cloud.language.v1beta2.Tense} - * - * @property {number} voice - * The grammatical voice. - * - * The number should be among the values of [Voice]{@link google.cloud.language.v1beta2.Voice} - * - * @typedef PartOfSpeech - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.PartOfSpeech definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const PartOfSpeech = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The characteristic of a verb that expresses time flow during an event. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Aspect: { - - /** - * Aspect is not applicable in the analyzed language or is not predicted. - */ - ASPECT_UNKNOWN: 0, - - /** - * Perfective - */ - PERFECTIVE: 1, - - /** - * Imperfective - */ - IMPERFECTIVE: 2, - - /** - * Progressive - */ - PROGRESSIVE: 3 - }, - - /** - * The grammatical function performed by a noun or pronoun in a phrase, - * clause, or sentence. In some languages, other parts of speech, such as - * adjective and determiner, take case inflection in agreement with the noun. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Case: { - - /** - * Case is not applicable in the analyzed language or is not predicted. - */ - CASE_UNKNOWN: 0, - - /** - * Accusative - */ - ACCUSATIVE: 1, - - /** - * Adverbial - */ - ADVERBIAL: 2, - - /** - * Complementive - */ - COMPLEMENTIVE: 3, - - /** - * Dative - */ - DATIVE: 4, - - /** - * Genitive - */ - GENITIVE: 5, - - /** - * Instrumental - */ - INSTRUMENTAL: 6, - - /** - * Locative - */ - LOCATIVE: 7, - - /** - * Nominative - */ - NOMINATIVE: 8, - - /** - * Oblique - */ - OBLIQUE: 9, - - /** - * Partitive - */ - PARTITIVE: 10, - - /** - * Prepositional - */ - PREPOSITIONAL: 11, - - /** - * Reflexive - */ - REFLEXIVE_CASE: 12, - - /** - * Relative - */ - RELATIVE_CASE: 13, - - /** - * Vocative - */ - VOCATIVE: 14 - }, - - /** - * Depending on the language, Form can be categorizing different forms of - * verbs, adjectives, adverbs, etc. For example, categorizing inflected - * endings of verbs and adjectives or distinguishing between short and long - * forms of adjectives and participles - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Form: { - - /** - * Form is not applicable in the analyzed language or is not predicted. - */ - FORM_UNKNOWN: 0, - - /** - * Adnomial - */ - ADNOMIAL: 1, - - /** - * Auxiliary - */ - AUXILIARY: 2, - - /** - * Complementizer - */ - COMPLEMENTIZER: 3, - - /** - * Final ending - */ - FINAL_ENDING: 4, - - /** - * Gerund - */ - GERUND: 5, - - /** - * Realis - */ - REALIS: 6, - - /** - * Irrealis - */ - IRREALIS: 7, - - /** - * Short form - */ - SHORT: 8, - - /** - * Long form - */ - LONG: 9, - - /** - * Order form - */ - ORDER: 10, - - /** - * Specific form - */ - SPECIFIC: 11 - }, - - /** - * Gender classes of nouns reflected in the behaviour of associated words. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Gender: { - - /** - * Gender is not applicable in the analyzed language or is not predicted. - */ - GENDER_UNKNOWN: 0, - - /** - * Feminine - */ - FEMININE: 1, - - /** - * Masculine - */ - MASCULINE: 2, - - /** - * Neuter - */ - NEUTER: 3 - }, - - /** - * The grammatical feature of verbs, used for showing modality and attitude. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Mood: { - - /** - * Mood is not applicable in the analyzed language or is not predicted. - */ - MOOD_UNKNOWN: 0, - - /** - * Conditional - */ - CONDITIONAL_MOOD: 1, - - /** - * Imperative - */ - IMPERATIVE: 2, - - /** - * Indicative - */ - INDICATIVE: 3, - - /** - * Interrogative - */ - INTERROGATIVE: 4, - - /** - * Jussive - */ - JUSSIVE: 5, - - /** - * Subjunctive - */ - SUBJUNCTIVE: 6 - }, - - /** - * Count distinctions. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Number: { - - /** - * Number is not applicable in the analyzed language or is not predicted. - */ - NUMBER_UNKNOWN: 0, - - /** - * Singular - */ - SINGULAR: 1, - - /** - * Plural - */ - PLURAL: 2, - - /** - * Dual - */ - DUAL: 3 - }, - - /** - * The distinction between the speaker, second person, third person, etc. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Person: { - - /** - * Person is not applicable in the analyzed language or is not predicted. - */ - PERSON_UNKNOWN: 0, - - /** - * First - */ - FIRST: 1, - - /** - * Second - */ - SECOND: 2, - - /** - * Third - */ - THIRD: 3, - - /** - * Reflexive - */ - REFLEXIVE_PERSON: 4 - }, - - /** - * This category shows if the token is part of a proper name. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Proper: { - - /** - * Proper is not applicable in the analyzed language or is not predicted. - */ - PROPER_UNKNOWN: 0, - - /** - * Proper - */ - PROPER: 1, - - /** - * Not proper - */ - NOT_PROPER: 2 - }, - - /** - * Reciprocal features of a pronoun. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Reciprocity: { - - /** - * Reciprocity is not applicable in the analyzed language or is not - * predicted. - */ - RECIPROCITY_UNKNOWN: 0, - - /** - * Reciprocal - */ - RECIPROCAL: 1, - - /** - * Non-reciprocal - */ - NON_RECIPROCAL: 2 - }, - - /** - * The part of speech tags enum. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Tag: { - - /** - * Unknown - */ - UNKNOWN: 0, - - /** - * Adjective - */ - ADJ: 1, - - /** - * Adposition (preposition and postposition) - */ - ADP: 2, - - /** - * Adverb - */ - ADV: 3, - - /** - * Conjunction - */ - CONJ: 4, - - /** - * Determiner - */ - DET: 5, - - /** - * Noun (common and proper) - */ - NOUN: 6, - - /** - * Cardinal number - */ - NUM: 7, - - /** - * Pronoun - */ - PRON: 8, - - /** - * Particle or other function word - */ - PRT: 9, - - /** - * Punctuation - */ - PUNCT: 10, - - /** - * Verb (all tenses and modes) - */ - VERB: 11, - - /** - * Other: foreign words, typos, abbreviations - */ - X: 12, - - /** - * Affix - */ - AFFIX: 13 - }, - - /** - * Time reference. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Tense: { - - /** - * Tense is not applicable in the analyzed language or is not predicted. - */ - TENSE_UNKNOWN: 0, - - /** - * Conditional - */ - CONDITIONAL_TENSE: 1, - - /** - * Future - */ - FUTURE: 2, - - /** - * Past - */ - PAST: 3, - - /** - * Present - */ - PRESENT: 4, - - /** - * Imperfect - */ - IMPERFECT: 5, - - /** - * Pluperfect - */ - PLUPERFECT: 6 - }, - - /** - * The relationship between the action that a verb expresses and the - * participants identified by its arguments. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Voice: { - - /** - * Voice is not applicable in the analyzed language or is not predicted. - */ - VOICE_UNKNOWN: 0, - - /** - * Active - */ - ACTIVE: 1, - - /** - * Causative - */ - CAUSATIVE: 2, - - /** - * Passive - */ - PASSIVE: 3 - } -}; - -/** - * Represents dependency parse tree information for a token. - * - * @property {number} headTokenIndex - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * @property {number} label - * The parse label for the token. - * - * The number should be among the values of [Label]{@link google.cloud.language.v1beta2.Label} - * - * @typedef DependencyEdge - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.DependencyEdge definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const DependencyEdge = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The parse label enum for the token. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Label: { - - /** - * Unknown - */ - UNKNOWN: 0, - - /** - * Abbreviation modifier - */ - ABBREV: 1, - - /** - * Adjectival complement - */ - ACOMP: 2, - - /** - * Adverbial clause modifier - */ - ADVCL: 3, - - /** - * Adverbial modifier - */ - ADVMOD: 4, - - /** - * Adjectival modifier of an NP - */ - AMOD: 5, - - /** - * Appositional modifier of an NP - */ - APPOS: 6, - - /** - * Attribute dependent of a copular verb - */ - ATTR: 7, - - /** - * Auxiliary (non-main) verb - */ - AUX: 8, - - /** - * Passive auxiliary - */ - AUXPASS: 9, - - /** - * Coordinating conjunction - */ - CC: 10, - - /** - * Clausal complement of a verb or adjective - */ - CCOMP: 11, - - /** - * Conjunct - */ - CONJ: 12, - - /** - * Clausal subject - */ - CSUBJ: 13, - - /** - * Clausal passive subject - */ - CSUBJPASS: 14, - - /** - * Dependency (unable to determine) - */ - DEP: 15, - - /** - * Determiner - */ - DET: 16, - - /** - * Discourse - */ - DISCOURSE: 17, - - /** - * Direct object - */ - DOBJ: 18, - - /** - * Expletive - */ - EXPL: 19, - - /** - * Goes with (part of a word in a text not well edited) - */ - GOESWITH: 20, - - /** - * Indirect object - */ - IOBJ: 21, - - /** - * Marker (word introducing a subordinate clause) - */ - MARK: 22, - - /** - * Multi-word expression - */ - MWE: 23, - - /** - * Multi-word verbal expression - */ - MWV: 24, - - /** - * Negation modifier - */ - NEG: 25, - - /** - * Noun compound modifier - */ - NN: 26, - - /** - * Noun phrase used as an adverbial modifier - */ - NPADVMOD: 27, - - /** - * Nominal subject - */ - NSUBJ: 28, - - /** - * Passive nominal subject - */ - NSUBJPASS: 29, - - /** - * Numeric modifier of a noun - */ - NUM: 30, - - /** - * Element of compound number - */ - NUMBER: 31, - - /** - * Punctuation mark - */ - P: 32, - - /** - * Parataxis relation - */ - PARATAXIS: 33, - - /** - * Participial modifier - */ - PARTMOD: 34, - - /** - * The complement of a preposition is a clause - */ - PCOMP: 35, - - /** - * Object of a preposition - */ - POBJ: 36, - - /** - * Possession modifier - */ - POSS: 37, - - /** - * Postverbal negative particle - */ - POSTNEG: 38, - - /** - * Predicate complement - */ - PRECOMP: 39, - - /** - * Preconjunt - */ - PRECONJ: 40, - - /** - * Predeterminer - */ - PREDET: 41, - - /** - * Prefix - */ - PREF: 42, - - /** - * Prepositional modifier - */ - PREP: 43, - - /** - * The relationship between a verb and verbal morpheme - */ - PRONL: 44, - - /** - * Particle - */ - PRT: 45, - - /** - * Associative or possessive marker - */ - PS: 46, - - /** - * Quantifier phrase modifier - */ - QUANTMOD: 47, - - /** - * Relative clause modifier - */ - RCMOD: 48, - - /** - * Complementizer in relative clause - */ - RCMODREL: 49, - - /** - * Ellipsis without a preceding predicate - */ - RDROP: 50, - - /** - * Referent - */ - REF: 51, - - /** - * Remnant - */ - REMNANT: 52, - - /** - * Reparandum - */ - REPARANDUM: 53, - - /** - * Root - */ - ROOT: 54, - - /** - * Suffix specifying a unit of number - */ - SNUM: 55, - - /** - * Suffix - */ - SUFF: 56, - - /** - * Temporal modifier - */ - TMOD: 57, - - /** - * Topic marker - */ - TOPIC: 58, - - /** - * Clause headed by an infinite form of the verb that modifies a noun - */ - VMOD: 59, - - /** - * Vocative - */ - VOCATIVE: 60, - - /** - * Open clausal complement - */ - XCOMP: 61, - - /** - * Name suffix - */ - SUFFIX: 62, - - /** - * Name title - */ - TITLE: 63, - - /** - * Adverbial phrase modifier - */ - ADVPHMOD: 64, - - /** - * Causative auxiliary - */ - AUXCAUS: 65, - - /** - * Helper auxiliary - */ - AUXVV: 66, - - /** - * Rentaishi (Prenominal modifier) - */ - DTMOD: 67, - - /** - * Foreign words - */ - FOREIGN: 68, - - /** - * Keyword - */ - KW: 69, - - /** - * List for chains of comparable items - */ - LIST: 70, - - /** - * Nominalized clause - */ - NOMC: 71, - - /** - * Nominalized clausal subject - */ - NOMCSUBJ: 72, - - /** - * Nominalized clausal passive - */ - NOMCSUBJPASS: 73, - - /** - * Compound of numeric modifier - */ - NUMC: 74, - - /** - * Copula - */ - COP: 75, - - /** - * Dislocated relation (for fronted/topicalized elements) - */ - DISLOCATED: 76, - - /** - * Aspect marker - */ - ASP: 77, - - /** - * Genitive modifier - */ - GMOD: 78, - - /** - * Genitive object - */ - GOBJ: 79, - - /** - * Infinitival modifier - */ - INFMOD: 80, - - /** - * Measure - */ - MES: 81, - - /** - * Nominal complement of a noun - */ - NCOMP: 82 - } -}; - -/** - * Represents a mention for an entity in the text. Currently, proper noun - * mentions are supported. - * - * @property {Object} text - * The mention text. - * - * This object should have the same structure as [TextSpan]{@link google.cloud.language.v1beta2.TextSpan} - * - * @property {number} type - * The type of the entity mention. - * - * The number should be among the values of [Type]{@link google.cloud.language.v1beta2.Type} - * - * @property {Object} sentiment - * For calls to AnalyzeEntitySentiment or if - * AnnotateTextRequest.Features.extract_entity_sentiment is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} - * - * @typedef EntityMention - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.EntityMention definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const EntityMention = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The supported types of mentions. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ - Type: { - - /** - * Unknown - */ - TYPE_UNKNOWN: 0, - - /** - * Proper name - */ - PROPER: 1, - - /** - * Common noun (or noun compound) - */ - COMMON: 2 - } -}; - -/** - * Represents an output piece of text. - * - * @property {string} content - * The content of the output text. - * - * @property {number} beginOffset - * The API calculates the beginning offset of the content in the original - * document according to the EncodingType specified in the API request. - * - * @typedef TextSpan - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.TextSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const TextSpan = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents a category returned from the text classifier. - * - * @property {string} name - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * @property {number} confidence - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * @typedef ClassificationCategory - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.ClassificationCategory definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const ClassificationCategory = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The sentiment analysis request message. - * - * @property {Object} document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * - * @property {number} encodingType - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * - * @typedef AnalyzeSentimentRequest - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnalyzeSentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnalyzeSentimentRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The sentiment analysis response message. - * - * @property {Object} documentSentiment - * The overall sentiment of the input document. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @property {Object[]} sentences - * The sentiment for all the sentences in the document. - * - * This object should have the same structure as [Sentence]{@link google.cloud.language.v1beta2.Sentence} - * - * @typedef AnalyzeSentimentResponse - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnalyzeSentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnalyzeSentimentResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The entity-level sentiment analysis request message. - * - * @property {Object} document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * - * @property {number} encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * - * @typedef AnalyzeEntitySentimentRequest - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnalyzeEntitySentimentRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The entity-level sentiment analysis response message. - * - * @property {Object[]} entities - * The recognized entities in the input document with associated sentiments. - * - * This object should have the same structure as [Entity]{@link google.cloud.language.v1beta2.Entity} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @typedef AnalyzeEntitySentimentResponse - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnalyzeEntitySentimentResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The entity analysis request message. - * - * @property {Object} document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * - * @property {number} encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * - * @typedef AnalyzeEntitiesRequest - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnalyzeEntitiesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnalyzeEntitiesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The entity analysis response message. - * - * @property {Object[]} entities - * The recognized entities in the input document. - * - * This object should have the same structure as [Entity]{@link google.cloud.language.v1beta2.Entity} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @typedef AnalyzeEntitiesResponse - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnalyzeEntitiesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnalyzeEntitiesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The syntax analysis request message. - * - * @property {Object} document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * - * @property {number} encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * - * @typedef AnalyzeSyntaxRequest - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnalyzeSyntaxRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnalyzeSyntaxRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The syntax analysis response message. - * - * @property {Object[]} sentences - * Sentences in the input document. - * - * This object should have the same structure as [Sentence]{@link google.cloud.language.v1beta2.Sentence} - * - * @property {Object[]} tokens - * Tokens, along with their syntactic information, in the input document. - * - * This object should have the same structure as [Token]{@link google.cloud.language.v1beta2.Token} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @typedef AnalyzeSyntaxResponse - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnalyzeSyntaxResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnalyzeSyntaxResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The document classification request message. - * - * @property {Object} document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * - * @typedef ClassifyTextRequest - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.ClassifyTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const ClassifyTextRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The document classification response message. - * - * @property {Object[]} categories - * Categories representing the input document. - * - * This object should have the same structure as [ClassificationCategory]{@link google.cloud.language.v1beta2.ClassificationCategory} - * - * @typedef ClassifyTextResponse - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.ClassifyTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const ClassifyTextResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The request message for the text annotation API, which can perform multiple - * analysis types (sentiment, entities, and syntax) in one call. - * - * @property {Object} document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * - * @property {Object} features - * Required. The enabled features. - * - * This object should have the same structure as [Features]{@link google.cloud.language.v1beta2.Features} - * - * @property {number} encodingType - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * - * @typedef AnnotateTextRequest - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnnotateTextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnnotateTextRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * All available features for sentiment, syntax, and semantic analysis. - * Setting each one to true will enable that specific analysis for the input. - * Next ID: 10 - * - * @property {boolean} extractSyntax - * Extract syntax information. - * - * @property {boolean} extractEntities - * Extract entities. - * - * @property {boolean} extractDocumentSentiment - * Extract document-level sentiment. - * - * @property {boolean} extractEntitySentiment - * Extract entities and their associated sentiment. - * - * @property {boolean} classifyText - * Classify the full document into categories. If this is true, - * the API will use the default model which classifies into a - * [predefined taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * @typedef Features - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnnotateTextRequest.Features definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ - Features: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * The text annotations response message. - * - * @property {Object[]} sentences - * Sentences in the input document. Populated if the user enables - * AnnotateTextRequest.Features.extract_syntax. - * - * This object should have the same structure as [Sentence]{@link google.cloud.language.v1beta2.Sentence} - * - * @property {Object[]} tokens - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * AnnotateTextRequest.Features.extract_syntax. - * - * This object should have the same structure as [Token]{@link google.cloud.language.v1beta2.Token} - * - * @property {Object[]} entities - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * AnnotateTextRequest.Features.extract_entities. - * - * This object should have the same structure as [Entity]{@link google.cloud.language.v1beta2.Entity} - * - * @property {Object} documentSentiment - * The overall sentiment for the document. Populated if the user enables - * AnnotateTextRequest.Features.extract_document_sentiment. - * - * This object should have the same structure as [Sentiment]{@link google.cloud.language.v1beta2.Sentiment} - * - * @property {string} language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See Document.language field for more details. - * - * @property {Object[]} categories - * Categories identified in the input document. - * - * This object should have the same structure as [ClassificationCategory]{@link google.cloud.language.v1beta2.ClassificationCategory} - * - * @typedef AnnotateTextResponse - * @memberof google.cloud.language.v1beta2 - * @see [google.cloud.language.v1beta2.AnnotateTextResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/language/v1beta2/language_service.proto} - */ -const AnnotateTextResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Represents the text encoding that the caller uses to process the output. - * Providing an `EncodingType` is recommended because the API provides the - * beginning offsets for various outputs, such as tokens and mentions, and - * languages that natively use different text encodings may access offsets - * differently. - * - * @enum {number} - * @memberof google.cloud.language.v1beta2 - */ -const EncodingType = { - - /** - * If `EncodingType` is not specified, encoding-dependent information (such as - * `begin_offset`) will be set at `-1`. - */ - NONE: 0, - - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-8 encoding of the input. C++ and Go are examples of languages - * that use this encoding natively. - */ - UTF8: 1, - - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-16 encoding of the input. Java and JavaScript are examples of - * languages that use this encoding natively. - */ - UTF16: 2, - - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-32 encoding of the input. Python is an example of a language - * that uses this encoding natively. - */ - UTF32: 3 -}; \ No newline at end of file diff --git a/packages/google-cloud-language/src/v1/index.js b/packages/google-cloud-language/src/v1beta2/index.ts similarity index 69% rename from packages/google-cloud-language/src/v1/index.js rename to packages/google-cloud-language/src/v1beta2/index.ts index 5b03a4daa9e..d009018811b 100644 --- a/packages/google-cloud-language/src/v1/index.js +++ b/packages/google-cloud-language/src/v1beta2/index.ts @@ -11,9 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; - -const LanguageServiceClient = require('./language_service_client'); - -module.exports.LanguageServiceClient = LanguageServiceClient; +export {LanguageServiceClient} from './language_service_client'; diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.js b/packages/google-cloud-language/src/v1beta2/language_service_client.js deleted file mode 100644 index 6a144c249b1..00000000000 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.js +++ /dev/null @@ -1,552 +0,0 @@ -// Copyright 2019 Google LLC -// -// 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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const gapicConfig = require('./language_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * Provides text analysis operations such as sentiment analysis and entity - * recognition. - * - * @class - * @memberof v1beta2 - */ -class LanguageServiceClient { - /** - * Construct an instance of LanguageServiceClient. - * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {function} [options.promise] - Custom promise module to use instead - * of native Promises. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - */ - constructor(opts) { - opts = opts || {}; - this._descriptors = {}; - - if (global.isBrowser) { - // If we're in browser, we use gRPC fallback. - opts.fallback = true; - } - - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; - - const servicePath = - opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; - - // Ensure that options include the service address and port. - opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath, - }, - opts - ); - - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = this.constructor.scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); - - // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth; - - // Determine the client header string. - const clientHeader = []; - - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } - clientHeader.push(`gax/${gaxModule.version}`); - if (opts.fallback) { - clientHeader.push(`gl-web/${gaxModule.version}`); - } else { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); - } - clientHeader.push(`gapic/${VERSION}`); - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - - // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - const protos = gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath - ); - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.cloud.language.v1beta2.LanguageService', - gapicConfig, - opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')} - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this._innerApiCalls = {}; - - // Put together the "service stub" for - // google.cloud.language.v1beta2.LanguageService. - const languageServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.cloud.language.v1beta2.LanguageService') - : protos.google.cloud.language.v1beta2.LanguageService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const languageServiceStubMethods = [ - 'analyzeSentiment', - 'analyzeEntities', - 'analyzeEntitySentiment', - 'analyzeSyntax', - 'classifyText', - 'annotateText', - ]; - for (const methodName of languageServiceStubMethods) { - const innerCallPromise = languageServiceStub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - null - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'language.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'language.googleapis.com'; - } - - /** - * The port for this API service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - */ - static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; - } - - /** - * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. - */ - getProjectId(callback) { - return this.auth.getProjectId(callback); - } - - // ------------------- - // -- Service calls -- - // ------------------- - - /** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1beta2.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.analyzeSentiment({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - analyzeSentiment(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.analyzeSentiment(request, options, callback); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1beta2.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.analyzeEntities({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - analyzeEntities(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.analyzeEntities(request, options, callback); - } - - /** - * Finds entities, similar to AnalyzeEntities in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1beta2.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.analyzeEntitySentiment({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - analyzeEntitySentiment(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.analyzeEntitySentiment( - request, - options, - callback - ); - } - - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part-of-speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1beta2.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.analyzeSyntax({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - analyzeSyntax(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.analyzeSyntax(request, options, callback); - } - - /** - * Classifies a document into categories. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1beta2.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * client.classifyText({document: document}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - classifyText(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.classifyText(request, options, callback); - } - - /** - * A convenience method that provides all syntax, sentiment, entity, and - * classification features in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.document - * Required. Input document. - * - * This object should have the same structure as [Document]{@link google.cloud.language.v1beta2.Document} - * @param {Object} request.features - * Required. The enabled features. - * - * This object should have the same structure as [Features]{@link google.cloud.language.v1beta2.Features} - * @param {number} [request.encodingType] - * The encoding type used by the API to calculate offsets. - * - * The number should be among the values of [EncodingType]{@link google.cloud.language.v1beta2.EncodingType} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const language = require('@google-cloud/language'); - * - * const client = new language.v1beta2.LanguageServiceClient({ - * // optional auth parameters. - * }); - * - * const document = {}; - * const features = {}; - * const request = { - * document: document, - * features: features, - * }; - * client.annotateText(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - annotateText(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.annotateText(request, options, callback); - } -} - -module.exports = LanguageServiceClient; diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts new file mode 100644 index 00000000000..40c16893a12 --- /dev/null +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -0,0 +1,734 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; +import * as path from 'path'; + +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './language_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Provides text analysis operations such as sentiment analysis and entity + * recognition. + * @class + * @memberof v1beta2 + */ +export class LanguageServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _terminated = false; + auth: gax.GoogleAuth; + languageServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of LanguageServiceClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof LanguageServiceClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof LanguageServiceClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + const protos = gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.language.v1beta2.LanguageService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; + + // Put together the "service stub" for + // google.cloud.language.v1beta2.LanguageService. + this.languageServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.language.v1beta2.LanguageService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.language.v1beta2.LanguageService, + opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const languageServiceStubMethods = [ + 'analyzeSentiment', + 'analyzeEntities', + 'analyzeEntitySentiment', + 'analyzeSyntax', + 'classifyText', + 'annotateText', + ]; + + for (const methodName of languageServiceStubMethods) { + const innerCallPromise = this.languageServiceStub.then( + stub => (...args: Array<{}>) => { + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'language.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'language.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-language', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + analyzeSentiment( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | undefined + ), + {} | undefined + ] + >; + analyzeSentiment( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | undefined, + {} | undefined + > + ): void; + /** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + analyzeSentiment( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.analyzeSentiment(request, options, callback); + } + analyzeEntities( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | undefined + ), + {} | undefined + ] + >; + analyzeEntities( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | undefined, + {} | undefined + > + ): void; + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + analyzeEntities( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.analyzeEntities(request, options, callback); + } + analyzeEntitySentiment( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | undefined + ), + {} | undefined + ] + >; + analyzeEntitySentiment( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | undefined, + {} | undefined + > + ): void; + /** + * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + analyzeEntitySentiment( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.analyzeEntitySentiment( + request, + options, + callback + ); + } + analyzeSyntax( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | undefined + ), + {} | undefined + ] + >; + analyzeSyntax( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | undefined, + {} | undefined + > + ): void; + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part-of-speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + analyzeSyntax( + request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.analyzeSyntax(request, options, callback); + } + classifyText( + request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest + | undefined + ), + {} | undefined + ] + >; + classifyText( + request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, + | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest + | undefined, + {} | undefined + > + ): void; + /** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + classifyText( + request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, + | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, + | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.classifyText(request, options, callback); + } + annotateText( + request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest + | undefined + ), + {} | undefined + ] + >; + annotateText( + request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest + | undefined, + {} | undefined + > + ): void; + /** + * A convenience method that provides all syntax, sentiment, entity, and + * classification features in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.AnnotateTextRequest.Features} request.features + * Required. The enabled features. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + annotateText( + request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, + ( + | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.annotateText(request, options, callback); + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this.languageServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json index 100eba5ffde..a2671a61cf0 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client_config.json +++ b/packages/google-cloud-language/src/v1beta2/language_service_client_config.json @@ -2,11 +2,11 @@ "interfaces": { "google.cloud.language.v1beta2.LanguageService": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "retry_params": { "default": { @@ -14,39 +14,39 @@ "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, + "rpc_timeout_multiplier": 1, "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "AnalyzeSentiment": { - "timeout_millis": 30000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnalyzeEntities": { - "timeout_millis": 30000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnalyzeEntitySentiment": { - "timeout_millis": 30000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnalyzeSyntax": { - "timeout_millis": 30000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ClassifyText": { - "timeout_millis": 30000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "AnnotateText": { - "timeout_millis": 30000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 257637ad190..bf245b67a50 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,12 @@ { - "updateTime": "2019-12-10T12:18:40.168211Z", + "updateTime": "2019-12-17T22:34:22.273165Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "0.42.1", - "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6cc9499e225a4f6a5e34fe07e390f67055d7991c", - "internalRef": "284643689" + "sha": "6ad2bb13bc4b0f3f785517f0563118f6ca52ddfd", + "internalRef": "286008145" } }, { @@ -30,9 +23,8 @@ "source": "googleapis", "apiName": "language", "apiVersion": "v1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/language/artman_language_v1.yaml" + "language": "typescript", + "generator": "gapic-generator-typescript" } }, { @@ -40,10 +32,335 @@ "source": "googleapis", "apiName": "language", "apiVersion": "v1beta2", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/language/artman_language_v1beta2.yaml" + "language": "typescript", + "generator": "gapic-generator-typescript" } } + ], + "newFiles": [ + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": "LICENSE" + }, + { + "path": "codecov.yaml" + }, + { + "path": "renovate.json" + }, + { + "path": "webpack.config.js" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".prettierignore" + }, + { + "path": "README.md" + }, + { + "path": "tslint.json" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": ".prettierrc" + }, + { + "path": "tsconfig.json" + }, + { + "path": ".eslintignore" + }, + { + "path": ".nycrc" + }, + { + "path": "linkinator.config.json" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.json" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/google/cloud/language/v1/language_service.proto" + }, + { + "path": "protos/google/cloud/language/v1beta2/language_service.proto" + }, + { + "path": "test/gapic-language_service-v1beta2.ts" + }, + { + "path": "test/gapic-language_service-v1.ts" + }, + { + "path": "system-test/.eslintrc.yml" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/fixtures/sample/src/index.js" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "samples/README.md" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": "build/protos/protos.d.ts" + }, + { + "path": "build/protos/protos.json" + }, + { + "path": "build/protos/protos.js" + }, + { + "path": "build/protos/google/cloud/language/v1/language_service.proto" + }, + { + "path": "build/protos/google/cloud/language/v1beta2/language_service.proto" + }, + { + "path": "build/test/gapic-language_service-v1beta2.js.map" + }, + { + "path": "build/test/gapic-language_service-v1.js.map" + }, + { + "path": "build/test/gapic-language_service-v1beta2.js" + }, + { + "path": "build/test/gapic-language_service-v1beta2.d.ts" + }, + { + "path": "build/test/gapic-language_service-v1.d.ts" + }, + { + "path": "build/test/gapic-language_service-v1.js" + }, + { + "path": "build/system-test/install.js.map" + }, + { + "path": "build/system-test/install.js" + }, + { + "path": "build/system-test/install.d.ts" + }, + { + "path": "build/src/index.js" + }, + { + "path": "build/src/index.js.map" + }, + { + "path": "build/src/index.d.ts" + }, + { + "path": "build/src/v1/language_service_client.js" + }, + { + "path": "build/src/v1/language_service_client.js.map" + }, + { + "path": "build/src/v1/index.js" + }, + { + "path": "build/src/v1/language_service_client.d.ts" + }, + { + "path": "build/src/v1/index.js.map" + }, + { + "path": "build/src/v1/index.d.ts" + }, + { + "path": "build/src/v1/language_service_client_config.json" + }, + { + "path": "build/src/v1/language_service_client_config.d.ts" + }, + { + "path": "build/src/v1beta2/language_service_client.js" + }, + { + "path": "build/src/v1beta2/language_service_client.js.map" + }, + { + "path": "build/src/v1beta2/index.js" + }, + { + "path": "build/src/v1beta2/language_service_client.d.ts" + }, + { + "path": "build/src/v1beta2/index.js.map" + }, + { + "path": "build/src/v1beta2/index.d.ts" + }, + { + "path": "build/src/v1beta2/language_service_client_config.json" + }, + { + "path": "build/src/v1beta2/language_service_client_config.d.ts" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": "src/v1/language_service_client.ts" + }, + { + "path": "src/v1/index.ts" + }, + { + "path": "src/v1/language_service_client_config.json" + }, + { + "path": "src/v1/language_service_proto_list.json" + }, + { + "path": "src/v1beta2/language_service_client.ts" + }, + { + "path": "src/v1beta2/index.ts" + }, + { + "path": "src/v1beta2/language_service_client_config.json" + }, + { + "path": "src/v1beta2/language_service_proto_list.json" + } ] } \ No newline at end of file diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index 4809d101e42..edb25dcb29a 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -5,20 +5,26 @@ logging.basicConfig(level=logging.DEBUG) -gapic = gcp.GAPICGenerator() +gapic = gcp.GAPICMicrogenerator() # tasks has two product names, and a poorly named artman yaml for version in ['v1', 'v1beta2']: - library = gapic.node_library( - 'language', version) + library = gapic.typescript_library( + 'language', + generator_args={ + "grpc-service-config": f"google/cloud/language/{version}/language_grpc_service_config.json", + "package-name":f"@google-cloud/language" + }, + proto_path=f'/google/cloud/language/{version}', + version=version) # skip index, protos, package.json, and README.md s.copy( library, - excludes=['package.json', 'README.md', 'src/index.js']) + excludes=['package.json', 'README.md', 'src/index.ts']) # Update common templates common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() +templates = common_templates.node_library(source_location='build/src') s.copy(templates) # Node.js specific cleanup diff --git a/packages/google-cloud-language/system-test/.eslintrc.yml b/packages/google-cloud-language/system-test/.eslintrc.yml index f9605165c0f..dc5d9b0171b 100644 --- a/packages/google-cloud-language/system-test/.eslintrc.yml +++ b/packages/google-cloud-language/system-test/.eslintrc.yml @@ -1,5 +1,4 @@ --- env: mocha: true -rules: - no-console: off + diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..d3c6a4d92b2 --- /dev/null +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const language = require('@google-cloud/language'); + +function main() { + const languageServiceClient = new language.LanguageServiceClient(); +} + +main(); diff --git a/packages/google-cloud-language/src/v1beta2/index.js b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts similarity index 62% rename from packages/google-cloud-language/src/v1beta2/index.js rename to packages/google-cloud-language/system-test/fixtures/sample/src/index.ts index 5b03a4daa9e..1bf143d7437 100644 --- a/packages/google-cloud-language/src/v1beta2/index.js +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts @@ -11,9 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; +import {LanguageServiceClient} from '@google-cloud/language'; -const LanguageServiceClient = require('./language_service_client'); +function main() { + const languageServiceClient = new LanguageServiceClient(); +} -module.exports.LanguageServiceClient = LanguageServiceClient; +main(); diff --git a/packages/google-cloud-language/system-test/install.ts b/packages/google-cloud-language/system-test/install.ts new file mode 100644 index 00000000000..2736aee84f7 --- /dev/null +++ b/packages/google-cloud-language/system-test/install.ts @@ -0,0 +1,50 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; + +describe('typescript consumer tests', () => { + it('should have correct type signature for typescript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); + + it('should have correct type signature for javascript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); +}); diff --git a/packages/google-cloud-language/test/gapic-v1beta2.js b/packages/google-cloud-language/test/gapic-language_service-v1.ts similarity index 55% rename from packages/google-cloud-language/test/gapic-v1beta2.js rename to packages/google-cloud-language/test/gapic-language_service-v1.ts index eb0105176ac..18a0adbcbda 100644 --- a/packages/google-cloud-language/test/gapic-v1beta2.js +++ b/packages/google-cloud-language/test/gapic-language_service-v1.ts @@ -11,74 +11,94 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; - -const assert = require('assert'); - -const languageModule = require('../src'); +import * as protosTypes from '../protos/protos'; +import * as assert from 'assert'; +const languageserviceModule = require('../src'); const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError | null, response?: {} | null): void; +} -describe('LanguageServiceClient', () => { +export class Operation { + constructor() {} + promise() {} +} +function mockSimpleGrpcMethod( + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} +describe('v1.LanguageServiceClient', () => { it('has servicePath', () => { const servicePath = - languageModule.v1beta2.LanguageServiceClient.servicePath; + languageserviceModule.v1.LanguageServiceClient.servicePath; assert(servicePath); }); - it('has apiEndpoint', () => { const apiEndpoint = - languageModule.v1beta2.LanguageServiceClient.apiEndpoint; + languageserviceModule.v1.LanguageServiceClient.apiEndpoint; assert(apiEndpoint); }); - it('has port', () => { - const port = languageModule.v1beta2.LanguageServiceClient.port; + const port = languageserviceModule.v1.LanguageServiceClient.port; assert(port); assert(typeof port === 'number'); }); - - it('should create a client with no options', () => { - const client = new languageModule.v1beta2.LanguageServiceClient(); + it('should create a client with no option', () => { + const client = new languageserviceModule.v1.LanguageServiceClient(); assert(client); }); - it('should create a client with gRPC fallback', () => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ fallback: true, }); assert(client); }); - describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.analyzeSentiment(request, (err, response) => { + client.analyzeSentiment(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -86,59 +106,45 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSentiment with error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( request, null, error ); - - client.analyzeSentiment(request, (err, response) => { - assert(err instanceof Error); + client.analyzeSentiment(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeEntities', () => { it('invokes analyzeEntities without error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.analyzeEntities(request, (err, response) => { + client.analyzeEntities(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -146,59 +152,45 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntities with error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( request, null, error ); - - client.analyzeEntities(request, (err, response) => { - assert(err instanceof Error); + client.analyzeEntities(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeEntitySentiment', () => { it('invokes analyzeEntitySentiment without error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.analyzeEntitySentiment(request, (err, response) => { + client.analyzeEntitySentiment(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -206,59 +198,45 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntitySentiment with error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( request, null, error ); - - client.analyzeEntitySentiment(request, (err, response) => { - assert(err instanceof Error); + client.analyzeEntitySentiment(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeSyntax', () => { it('invokes analyzeSyntax without error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.analyzeSyntax(request, (err, response) => { + client.analyzeSyntax(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -266,56 +244,45 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSyntax with error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( request, null, error ); - - client.analyzeSyntax(request, (err, response) => { - assert(err instanceof Error); + client.analyzeSyntax(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('classifyText', () => { it('invokes classifyText without error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1.IClassifyTextRequest = {}; // Mock response const expectedResponse = {}; - - // Mock Grpc layer + // Mock gRPC layer client._innerApiCalls.classifyText = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.classifyText(request, (err, response) => { + client.classifyText(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -323,61 +290,45 @@ describe('LanguageServiceClient', () => { }); it('invokes classifyText with error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1.IClassifyTextRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.classifyText = mockSimpleGrpcMethod( request, null, error ); - - client.classifyText(request, (err, response) => { - assert(err instanceof Error); + client.classifyText(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('annotateText', () => { it('invokes annotateText without error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const features = {}; - const request = { - document: document, - features: features, - }; - + const request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.annotateText = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.annotateText(request, (err, response) => { + client.annotateText(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -385,28 +336,22 @@ describe('LanguageServiceClient', () => { }); it('invokes annotateText with error', done => { - const client = new languageModule.v1beta2.LanguageServiceClient({ + const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const features = {}; - const request = { - document: document, - features: features, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.annotateText = mockSimpleGrpcMethod( request, null, error ); - - client.annotateText(request, (err, response) => { - assert(err instanceof Error); + client.annotateText(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); @@ -414,16 +359,3 @@ describe('LanguageServiceClient', () => { }); }); }); - -function mockSimpleGrpcMethod(expectedRequest, response, error) { - return function(actualRequest, options, callback) { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} diff --git a/packages/google-cloud-language/test/gapic-v1.js b/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts similarity index 54% rename from packages/google-cloud-language/test/gapic-v1.js rename to packages/google-cloud-language/test/gapic-language_service-v1beta2.ts index 9ac59cdd16c..23bb4a8ba9a 100644 --- a/packages/google-cloud-language/test/gapic-v1.js +++ b/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts @@ -11,72 +11,94 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; - -const assert = require('assert'); - -const languageModule = require('../src'); +import * as protosTypes from '../protos/protos'; +import * as assert from 'assert'; +const languageserviceModule = require('../src'); const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError | null, response?: {} | null): void; +} -describe('LanguageServiceClient', () => { +export class Operation { + constructor() {} + promise() {} +} +function mockSimpleGrpcMethod( + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} +describe('v1beta2.LanguageServiceClient', () => { it('has servicePath', () => { - const servicePath = languageModule.v1.LanguageServiceClient.servicePath; + const servicePath = + languageserviceModule.v1beta2.LanguageServiceClient.servicePath; assert(servicePath); }); - it('has apiEndpoint', () => { - const apiEndpoint = languageModule.v1.LanguageServiceClient.apiEndpoint; + const apiEndpoint = + languageserviceModule.v1beta2.LanguageServiceClient.apiEndpoint; assert(apiEndpoint); }); - it('has port', () => { - const port = languageModule.v1.LanguageServiceClient.port; + const port = languageserviceModule.v1beta2.LanguageServiceClient.port; assert(port); assert(typeof port === 'number'); }); - - it('should create a client with no options', () => { - const client = new languageModule.v1.LanguageServiceClient(); + it('should create a client with no option', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient(); assert(client); }); - it('should create a client with gRPC fallback', () => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ fallback: true, }); assert(client); }); - describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.analyzeSentiment(request, (err, response) => { + client.analyzeSentiment(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -84,59 +106,45 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSentiment with error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( request, null, error ); - - client.analyzeSentiment(request, (err, response) => { - assert(err instanceof Error); + client.analyzeSentiment(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeEntities', () => { it('invokes analyzeEntities without error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.analyzeEntities(request, (err, response) => { + client.analyzeEntities(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -144,59 +152,45 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntities with error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( request, null, error ); - - client.analyzeEntities(request, (err, response) => { - assert(err instanceof Error); + client.analyzeEntities(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeEntitySentiment', () => { it('invokes analyzeEntitySentiment without error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.analyzeEntitySentiment(request, (err, response) => { + client.analyzeEntitySentiment(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -204,59 +198,45 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeEntitySentiment with error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( request, null, error ); - - client.analyzeEntitySentiment(request, (err, response) => { - assert(err instanceof Error); + client.analyzeEntitySentiment(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('analyzeSyntax', () => { it('invokes analyzeSyntax without error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.analyzeSyntax(request, (err, response) => { + client.analyzeSyntax(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -264,56 +244,45 @@ describe('LanguageServiceClient', () => { }); it('invokes analyzeSyntax with error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( request, null, error ); - - client.analyzeSyntax(request, (err, response) => { - assert(err instanceof Error); + client.analyzeSyntax(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('classifyText', () => { it('invokes classifyText without error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - + const request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest = {}; // Mock response const expectedResponse = {}; - - // Mock Grpc layer + // Mock gRPC layer client._innerApiCalls.classifyText = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.classifyText(request, (err, response) => { + client.classifyText(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -321,61 +290,45 @@ describe('LanguageServiceClient', () => { }); it('invokes classifyText with error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const request = { - document: document, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.classifyText = mockSimpleGrpcMethod( request, null, error ); - - client.classifyText(request, (err, response) => { - assert(err instanceof Error); + client.classifyText(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('annotateText', () => { it('invokes annotateText without error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const features = {}; - const request = { - document: document, - features: features, - }; - + const request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest = {}; // Mock response - const language = 'language-1613589672'; - const expectedResponse = { - language: language, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.annotateText = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.annotateText(request, (err, response) => { + client.annotateText(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -383,28 +336,22 @@ describe('LanguageServiceClient', () => { }); it('invokes annotateText with error', done => { - const client = new languageModule.v1.LanguageServiceClient({ + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const document = {}; - const features = {}; - const request = { - document: document, - features: features, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.annotateText = mockSimpleGrpcMethod( request, null, error ); - - client.annotateText(request, (err, response) => { - assert(err instanceof Error); + client.annotateText(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); @@ -412,16 +359,3 @@ describe('LanguageServiceClient', () => { }); }); }); - -function mockSimpleGrpcMethod(expectedRequest, response, error) { - return function(actualRequest, options, callback) { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} diff --git a/packages/google-cloud-language/tsconfig.json b/packages/google-cloud-language/tsconfig.json new file mode 100644 index 00000000000..613d35597b5 --- /dev/null +++ b/packages/google-cloud-language/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2016", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-language/tslint.json b/packages/google-cloud-language/tslint.json new file mode 100644 index 00000000000..617dc975bae --- /dev/null +++ b/packages/google-cloud-language/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "gts/tslint.json" +} diff --git a/packages/google-cloud-language/webpack.config.js b/packages/google-cloud-language/webpack.config.js index 8eb586d9bda..490b5021129 100644 --- a/packages/google-cloud-language/webpack.config.js +++ b/packages/google-cloud-language/webpack.config.js @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +const path = require('path'); + module.exports = { - entry: './src/browser.js', + entry: './src/index.ts', output: { - library: 'language', - filename: './language.js', + library: 'LanguageService', + filename: './language-service.js', }, node: { child_process: 'empty', @@ -24,21 +26,37 @@ module.exports = { crypto: 'empty', }, resolve: { - extensions: ['.js', '.json'], + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], }, module: { rules: [ { - test: /node_modules[\\/]retry-request[\\/]/, - use: 'null-loader', + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' }, { - test: /node_modules[\\/]https-proxy-agent[\\/]/, - use: 'null-loader', + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' }, { - test: /node_modules[\\/]gtoken[\\/]/, - use: 'null-loader', + test: /node_modules[\\/]gtoken/, + use: 'null-loader' }, ], }, From 8f84d6c07610d749229c9d538ee6c5f3f4ed32c1 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 26 Dec 2019 16:34:10 -0500 Subject: [PATCH 298/488] docs: update jsdoc license/samples-README (#340) --- packages/google-cloud-language/.jsdoc.js | 29 +++++++++---------- .../google-cloud-language/samples/README.md | 22 +++++++++----- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index 4794bf6e1d2..cba7b2d6ed4 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -1,18 +1,17 @@ -/*! - * Copyright 2018 Google LLC. All Rights Reserved. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// 'use strict'; diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index a93b62ac4c0..78ac6d7789c 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -27,6 +27,12 @@ analysis, and syntax analysis. This API is part of the larger Cloud Machine Lear Before running the samples, make sure you've followed the steps outlined in [Using the client library](https://github.com/googleapis/nodejs-language#using-the-client-library). +`cd samples` + +`npm install` + +`cd ..` + ## Samples @@ -40,7 +46,7 @@ View the [source code](https://github.com/googleapis/nodejs-language/blob/master __Usage:__ -`node analyze.v1.js` +`node samples/analyze.v1.js` ----- @@ -57,7 +63,7 @@ View the [source code](https://github.com/googleapis/nodejs-language/blob/master __Usage:__ -`node analyze.v1beta2.js` +`node samples/analyze.v1beta2.js` ----- @@ -74,7 +80,7 @@ View the [source code](https://github.com/googleapis/nodejs-language/blob/master __Usage:__ -`node automlNaturalLanguageDataset.js` +`node samples/automlNaturalLanguageDataset.js` ----- @@ -91,7 +97,7 @@ View the [source code](https://github.com/googleapis/nodejs-language/blob/master __Usage:__ -`node automlNaturalLanguageModel.js` +`node samples/automlNaturalLanguageModel.js` ----- @@ -108,7 +114,7 @@ View the [source code](https://github.com/googleapis/nodejs-language/blob/master __Usage:__ -`node automlNaturalLanguagePredict.js` +`node samples/automlNaturalLanguagePredict.js` ----- @@ -125,7 +131,7 @@ View the [source code](https://github.com/googleapis/nodejs-language/blob/master __Usage:__ -`node quickstart.js` +`node samples/quickstart.js` ----- @@ -142,7 +148,7 @@ View the [source code](https://github.com/googleapis/nodejs-language/blob/master __Usage:__ -`node setEndpoint.js` +`node samples/setEndpoint.js` @@ -151,4 +157,4 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md -[product-docs]: https://cloud.google.com/natural-language/docs/ \ No newline at end of file +[product-docs]: https://cloud.google.com/natural-language/docs/ From 4764c65f2131ad80f5a2be2b508496279d318abf Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Dec 2019 11:36:00 -0800 Subject: [PATCH 299/488] refactor: use explicit mocha imports --- .../google-cloud-language/samples/test/quickstart.test.js | 1 + packages/google-cloud-language/smoke-test/.eslintrc.yml | 2 -- packages/google-cloud-language/system-test/.eslintrc.yml | 4 ---- packages/google-cloud-language/test/.eslintrc.yml | 3 --- .../google-cloud-language/test/gapic-language_service-v1.ts | 1 + .../test/gapic-language_service-v1beta2.ts | 1 + 6 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 packages/google-cloud-language/system-test/.eslintrc.yml delete mode 100644 packages/google-cloud-language/test/.eslintrc.yml diff --git a/packages/google-cloud-language/samples/test/quickstart.test.js b/packages/google-cloud-language/samples/test/quickstart.test.js index 4e8e465a24c..43470453dca 100644 --- a/packages/google-cloud-language/samples/test/quickstart.test.js +++ b/packages/google-cloud-language/samples/test/quickstart.test.js @@ -15,6 +15,7 @@ 'use strict'; const {assert} = require('chai'); +const {describe, it} = require('mocha'); const cp = require('child_process'); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); diff --git a/packages/google-cloud-language/smoke-test/.eslintrc.yml b/packages/google-cloud-language/smoke-test/.eslintrc.yml index f9605165c0f..282535f55f6 100644 --- a/packages/google-cloud-language/smoke-test/.eslintrc.yml +++ b/packages/google-cloud-language/smoke-test/.eslintrc.yml @@ -1,5 +1,3 @@ --- -env: - mocha: true rules: no-console: off diff --git a/packages/google-cloud-language/system-test/.eslintrc.yml b/packages/google-cloud-language/system-test/.eslintrc.yml deleted file mode 100644 index dc5d9b0171b..00000000000 --- a/packages/google-cloud-language/system-test/.eslintrc.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -env: - mocha: true - diff --git a/packages/google-cloud-language/test/.eslintrc.yml b/packages/google-cloud-language/test/.eslintrc.yml deleted file mode 100644 index 6db2a46c535..00000000000 --- a/packages/google-cloud-language/test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -env: - mocha: true diff --git a/packages/google-cloud-language/test/gapic-language_service-v1.ts b/packages/google-cloud-language/test/gapic-language_service-v1.ts index 18a0adbcbda..df16b561082 100644 --- a/packages/google-cloud-language/test/gapic-language_service-v1.ts +++ b/packages/google-cloud-language/test/gapic-language_service-v1.ts @@ -18,6 +18,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; +import {describe, it} from 'mocha'; const languageserviceModule = require('../src'); const FAKE_STATUS_CODE = 1; diff --git a/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts b/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts index 23bb4a8ba9a..78185b1d31b 100644 --- a/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts +++ b/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts @@ -18,6 +18,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; +import {describe, it} from 'mocha'; const languageserviceModule = require('../src'); const FAKE_STATUS_CODE = 1; From e43df2b607b5f6544d2adc0b468e55f02138d46e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 30 Dec 2019 14:45:43 -0800 Subject: [PATCH 300/488] build: add list of tracked files to synth.metadata --- packages/google-cloud-language/synth.metadata | 3591 ++++++++++++++++- 1 file changed, 3501 insertions(+), 90 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index bf245b67a50..a688e50895d 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-12-17T22:34:22.273165Z", + "updateTime": "2019-12-21T12:20:25.758817Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6ad2bb13bc4b0f3f785517f0563118f6ca52ddfd", - "internalRef": "286008145" + "sha": "1a380ea21dea9b6ac6ad28c60ad96d9d73574e19", + "internalRef": "286616241" } }, { @@ -39,106 +39,160 @@ ], "newFiles": [ { - "path": "CODE_OF_CONDUCT.md" + "path": ".repo-metadata.json" }, { - "path": ".eslintrc.yml" + "path": "README.md" }, { - "path": "LICENSE" + "path": "package.json" }, { - "path": "codecov.yaml" + "path": "CHANGELOG.md" }, { - "path": "renovate.json" + "path": ".gitignore" + }, + { + "path": "CODE_OF_CONDUCT.md" }, { "path": "webpack.config.js" }, { - "path": ".jsdoc.js" + "path": "CONTRIBUTING.md" + }, + { + "path": ".prettierrc" + }, + { + "path": "package-lock.json" + }, + { + "path": ".eslintignore" + }, + { + "path": "linkinator.config.json" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": "renovate.json" + }, + { + "path": "synth.metadata" }, { "path": ".prettierignore" }, { - "path": "README.md" + "path": "synth.py" + }, + { + "path": ".readme-partials.yml" + }, + { + "path": "codecov.yaml" }, { "path": "tslint.json" }, { - "path": "CONTRIBUTING.md" + "path": ".jsdoc.js" }, { - "path": ".prettierrc" + "path": "LICENSE" + }, + { + "path": ".nycrc" }, { "path": "tsconfig.json" }, { - "path": ".eslintignore" + "path": "src/index.ts" }, { - "path": ".nycrc" + "path": "src/v1/language_service_proto_list.json" }, { - "path": "linkinator.config.json" + "path": "src/v1/index.ts" }, { - "path": "protos/protos.d.ts" + "path": "src/v1/language_service_client_config.json" }, { - "path": "protos/protos.json" + "path": "src/v1/language_service_client.ts" }, { - "path": "protos/protos.js" + "path": "src/v1beta2/language_service_proto_list.json" }, { - "path": "protos/google/cloud/language/v1/language_service.proto" + "path": "src/v1beta2/index.ts" }, { - "path": "protos/google/cloud/language/v1beta2/language_service.proto" + "path": "src/v1beta2/language_service_client_config.json" }, { - "path": "test/gapic-language_service-v1beta2.ts" + "path": "src/v1beta2/language_service_client.ts" }, { - "path": "test/gapic-language_service-v1.ts" + "path": "build/src/index.d.ts" }, { - "path": "system-test/.eslintrc.yml" + "path": "build/src/index.js.map" }, { - "path": "system-test/install.ts" + "path": "build/src/index.js" }, { - "path": "system-test/fixtures/sample/src/index.js" + "path": "build/src/v1/index.d.ts" }, { - "path": "system-test/fixtures/sample/src/index.ts" + "path": "build/src/v1/index.js.map" }, { - "path": "samples/README.md" + "path": "build/src/v1/language_service_client.js.map" }, { - "path": ".github/PULL_REQUEST_TEMPLATE.md" + "path": "build/src/v1/language_service_client_config.d.ts" }, { - "path": ".github/release-please.yml" + "path": "build/src/v1/language_service_client.js" }, { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" + "path": "build/src/v1/index.js" }, { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" + "path": "build/src/v1/language_service_client_config.json" }, { - "path": ".github/ISSUE_TEMPLATE/support_request.md" + "path": "build/src/v1/language_service_client.d.ts" }, { - "path": "build/protos/protos.d.ts" + "path": "build/src/v1beta2/index.d.ts" + }, + { + "path": "build/src/v1beta2/index.js.map" + }, + { + "path": "build/src/v1beta2/language_service_client.js.map" + }, + { + "path": "build/src/v1beta2/language_service_client_config.d.ts" + }, + { + "path": "build/src/v1beta2/language_service_client.js" + }, + { + "path": "build/src/v1beta2/index.js" + }, + { + "path": "build/src/v1beta2/language_service_client_config.json" + }, + { + "path": "build/src/v1beta2/language_service_client.d.ts" }, { "path": "build/protos/protos.json" @@ -147,115 +201,124 @@ "path": "build/protos/protos.js" }, { - "path": "build/protos/google/cloud/language/v1/language_service.proto" + "path": "build/protos/protos.d.ts" }, { - "path": "build/protos/google/cloud/language/v1beta2/language_service.proto" + "path": "build/protos/google/cloud/language/v1/language_service.proto" }, { - "path": "build/test/gapic-language_service-v1beta2.js.map" + "path": "build/protos/google/cloud/language/v1beta2/language_service.proto" }, { - "path": "build/test/gapic-language_service-v1.js.map" + "path": "build/test/gapic-language_service-v1beta2.d.ts" }, { "path": "build/test/gapic-language_service-v1beta2.js" }, { - "path": "build/test/gapic-language_service-v1beta2.d.ts" + "path": "build/test/gapic-language_service-v1beta2.js.map" }, { - "path": "build/test/gapic-language_service-v1.d.ts" + "path": "build/test/gapic-language_service-v1.js.map" }, { "path": "build/test/gapic-language_service-v1.js" }, + { + "path": "build/test/gapic-language_service-v1.d.ts" + }, { "path": "build/system-test/install.js.map" }, + { + "path": "build/system-test/install.d.ts" + }, { "path": "build/system-test/install.js" }, { - "path": "build/system-test/install.d.ts" + "path": "__pycache__/synth.cpython-36.pyc" }, { - "path": "build/src/index.js" + "path": "samples/automlNaturalLanguageDataset.js" }, { - "path": "build/src/index.js.map" + "path": "samples/README.md" }, { - "path": "build/src/index.d.ts" + "path": "samples/package.json" }, { - "path": "build/src/v1/language_service_client.js" + "path": "samples/setEndpoint.js" }, { - "path": "build/src/v1/language_service_client.js.map" + "path": "samples/automlNaturalLanguagePredict.js" }, { - "path": "build/src/v1/index.js" + "path": "samples/analyze.v1.js" }, { - "path": "build/src/v1/language_service_client.d.ts" + "path": "samples/.eslintrc.yml" }, { - "path": "build/src/v1/index.js.map" + "path": "samples/analyze.v1beta2.js" }, { - "path": "build/src/v1/index.d.ts" + "path": "samples/quickstart.js" }, { - "path": "build/src/v1/language_service_client_config.json" + "path": "samples/automlNaturalLanguageModel.js" }, { - "path": "build/src/v1/language_service_client_config.d.ts" + "path": "samples/automl/automlNaturalLanguageDataset.js" }, { - "path": "build/src/v1beta2/language_service_client.js" + "path": "samples/automl/automlNaturalLanguagePredict.js" }, { - "path": "build/src/v1beta2/language_service_client.js.map" + "path": "samples/automl/automlNaturalLanguageModel.js" }, { - "path": "build/src/v1beta2/index.js" + "path": "samples/automl/resources/test.txt" }, { - "path": "build/src/v1beta2/language_service_client.d.ts" + "path": "samples/test/analyze.v1beta2.test.js" }, { - "path": "build/src/v1beta2/index.js.map" + "path": "samples/test/analyze.v1.test.js" }, { - "path": "build/src/v1beta2/index.d.ts" + "path": "samples/test/setEndpoint.test.js" }, { - "path": "build/src/v1beta2/language_service_client_config.json" + "path": "samples/test/automlNaturalLanguage.test.js" }, { - "path": "build/src/v1beta2/language_service_client_config.d.ts" + "path": "samples/test/quickstart.test.js" }, { - "path": ".kokoro/test.bat" + "path": "samples/test/.eslintrc.yml" }, { - "path": ".kokoro/system-test.sh" + "path": "samples/resources/android_text.txt" }, { - "path": ".kokoro/trampoline.sh" + "path": "samples/resources/text.txt" }, { - "path": ".kokoro/samples-test.sh" + "path": ".github/PULL_REQUEST_TEMPLATE.md" }, { - "path": ".kokoro/publish.sh" + "path": ".github/release-please.yml" }, { - "path": ".kokoro/lint.sh" + "path": ".github/ISSUE_TEMPLATE/support_request.md" }, { - "path": ".kokoro/common.cfg" + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, { "path": ".kokoro/test.sh" @@ -263,33 +326,90 @@ { "path": ".kokoro/docs.sh" }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/.gitattributes" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/system-test.sh" + }, { "path": ".kokoro/release/docs.cfg" }, + { + "path": ".kokoro/release/docs.sh" + }, { "path": ".kokoro/release/publish.cfg" }, { - "path": ".kokoro/release/docs.sh" + "path": ".kokoro/release/common.cfg" }, { - "path": ".kokoro/presubmit/node10/system-test.cfg" + "path": ".kokoro/continuous/node10/lint.cfg" }, { - "path": ".kokoro/presubmit/node10/samples-test.cfg" + "path": ".kokoro/continuous/node10/docs.cfg" }, { - "path": ".kokoro/presubmit/node10/test.cfg" + "path": ".kokoro/continuous/node10/test.cfg" }, { - "path": ".kokoro/presubmit/node10/docs.cfg" + "path": ".kokoro/continuous/node10/system-test.cfg" }, { - "path": ".kokoro/presubmit/node10/common.cfg" + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" }, { "path": ".kokoro/presubmit/node10/lint.cfg" }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, { "path": ".kokoro/presubmit/node8/test.cfg" }, @@ -309,58 +429,3349 @@ "path": ".kokoro/presubmit/windows/common.cfg" }, { - "path": ".kokoro/continuous/node10/system-test.cfg" + "path": "protos/protos.json" }, { - "path": ".kokoro/continuous/node10/samples-test.cfg" + "path": "protos/protos.js" }, { - "path": ".kokoro/continuous/node10/test.cfg" + "path": "protos/protos.d.ts" }, { - "path": ".kokoro/continuous/node10/docs.cfg" + "path": "protos/google/cloud/language/v1/language_service.proto" }, { - "path": ".kokoro/continuous/node10/common.cfg" + "path": "protos/google/cloud/language/v1beta2/language_service.proto" }, { - "path": ".kokoro/continuous/node10/lint.cfg" + "path": ".git/packed-refs" }, { - "path": ".kokoro/continuous/node8/test.cfg" + "path": ".git/HEAD" }, { - "path": ".kokoro/continuous/node8/common.cfg" + "path": ".git/config" }, { - "path": ".kokoro/continuous/node12/test.cfg" + "path": ".git/description" }, { - "path": ".kokoro/continuous/node12/common.cfg" + "path": ".git/index" }, { - "path": "src/v1/language_service_client.ts" + "path": ".git/shallow" }, { - "path": "src/v1/index.ts" + "path": ".git/logs/HEAD" }, { - "path": "src/v1/language_service_client_config.json" + "path": ".git/logs/refs/remotes/origin/HEAD" }, { - "path": "src/v1/language_service_proto_list.json" + "path": ".git/logs/refs/heads/autosynth" }, { - "path": "src/v1beta2/language_service_client.ts" + "path": ".git/logs/refs/heads/master" }, { - "path": "src/v1beta2/index.ts" + "path": ".git/info/exclude" }, { - "path": "src/v1beta2/language_service_client_config.json" + "path": ".git/refs/remotes/origin/HEAD" }, { - "path": "src/v1beta2/language_service_proto_list.json" + "path": ".git/refs/heads/autosynth" + }, + { + "path": ".git/refs/heads/master" + }, + { + "path": ".git/objects/pack/pack-bbd9f069cf43bd4f4e360bd3dbb73feccc7551b1.pack" + }, + { + "path": ".git/objects/pack/pack-bbd9f069cf43bd4f4e360bd3dbb73feccc7551b1.idx" + }, + { + "path": ".git/hooks/fsmonitor-watchman.sample" + }, + { + "path": ".git/hooks/applypatch-msg.sample" + }, + { + "path": ".git/hooks/prepare-commit-msg.sample" + }, + { + "path": ".git/hooks/pre-push.sample" + }, + { + "path": ".git/hooks/pre-applypatch.sample" + }, + { + "path": ".git/hooks/update.sample" + }, + { + "path": ".git/hooks/post-update.sample" + }, + { + "path": ".git/hooks/pre-commit.sample" + }, + { + "path": ".git/hooks/pre-receive.sample" + }, + { + "path": ".git/hooks/pre-rebase.sample" + }, + { + "path": ".git/hooks/commit-msg.sample" + }, + { + "path": "test/gapic-language_service-v1.ts" + }, + { + "path": "test/gapic-language_service-v1beta2.ts" + }, + { + "path": "test/.eslintrc.yml" + }, + { + "path": "test/mocha.opts" + }, + { + "path": "system-test/language_service_smoke_test.js" + }, + { + "path": "system-test/.eslintrc.yml" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "system-test/fixtures/sample/src/index.js" + }, + { + "path": "node_modules/strip-bom/package.json" + }, + { + "path": "node_modules/string-width/package.json" + }, + { + "path": "node_modules/is-callable/package.json" + }, + { + "path": "node_modules/copy-descriptor/package.json" + }, + { + "path": "node_modules/util-deprecate/package.json" + }, + { + "path": "node_modules/gts/package.json" + }, + { + "path": "node_modules/gts/node_modules/has-flag/package.json" + }, + { + "path": "node_modules/gts/node_modules/color-name/package.json" + }, + { + "path": "node_modules/gts/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/gts/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/gts/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/gts/node_modules/chalk/package.json" + }, + { + "path": "node_modules/require-directory/package.json" + }, + { + "path": "node_modules/update-notifier/package.json" + }, + { + "path": "node_modules/esprima/package.json" + }, + { + "path": "node_modules/string_decoder/package.json" + }, + { + "path": "node_modules/mocha/package.json" + }, + { + "path": "node_modules/mocha/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/mocha/node_modules/find-up/package.json" + }, + { + "path": "node_modules/mocha/node_modules/diff/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/mocha/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/mocha/node_modules/which/package.json" + }, + { + "path": "node_modules/mocha/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/mocha/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/mocha/node_modules/glob/package.json" + }, + { + "path": "node_modules/mocha/node_modules/ms/package.json" + }, + { + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs/package.json" + }, + { + "path": "node_modules/arr-diff/package.json" + }, + { + "path": "node_modules/is-arguments/package.json" + }, + { + "path": "node_modules/loader-utils/package.json" + }, + { + "path": "node_modules/core-util-is/package.json" + }, + { + "path": "node_modules/wrap-ansi/package.json" + }, + { + "path": "node_modules/minimist-options/package.json" + }, + { + "path": "node_modules/minimist-options/node_modules/arrify/package.json" + }, + { + "path": "node_modules/underscore/package.json" + }, + { + "path": "node_modules/keyv/package.json" + }, + { + "path": "node_modules/glob-parent/package.json" + }, + { + "path": "node_modules/domain-browser/package.json" + }, + { + "path": "node_modules/minimalistic-crypto-utils/package.json" + }, + { + "path": "node_modules/walkdir/package.json" + }, + { + "path": "node_modules/@protobufjs/codegen/package.json" + }, + { + "path": "node_modules/@protobufjs/inquire/package.json" + }, + { + "path": "node_modules/@protobufjs/float/package.json" + }, + { + "path": "node_modules/@protobufjs/base64/package.json" + }, + { + "path": "node_modules/@protobufjs/aspromise/package.json" + }, + { + "path": "node_modules/@protobufjs/eventemitter/package.json" + }, + { + "path": "node_modules/@protobufjs/fetch/package.json" + }, + { + "path": "node_modules/@protobufjs/utf8/package.json" + }, + { + "path": "node_modules/@protobufjs/path/package.json" + }, + { + "path": "node_modules/@protobufjs/pool/package.json" + }, + { + "path": "node_modules/global-dirs/package.json" + }, + { + "path": "node_modules/has-flag/package.json" + }, + { + "path": "node_modules/locate-path/package.json" + }, + { + "path": "node_modules/empower-assert/package.json" + }, + { + "path": "node_modules/convert-source-map/package.json" + }, + { + "path": "node_modules/terser/package.json" + }, + { + "path": "node_modules/terser/node_modules/source-map-support/package.json" + }, + { + "path": "node_modules/minimalistic-assert/package.json" + }, + { + "path": "node_modules/require-main-filename/package.json" + }, + { + "path": "node_modules/bluebird/package.json" + }, + { + "path": "node_modules/string.prototype.trimleft/package.json" + }, + { + "path": "node_modules/range-parser/package.json" + }, + { + "path": "node_modules/espower-loader/package.json" + }, + { + "path": "node_modules/null-loader/package.json" + }, + { + "path": "node_modules/defer-to-connect/package.json" + }, + { + "path": "node_modules/duplexer3/package.json" + }, + { + "path": "node_modules/indent-string/package.json" + }, + { + "path": "node_modules/detect-file/package.json" + }, + { + "path": "node_modules/eslint/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + }, + { + "path": "node_modules/eslint/node_modules/path-key/package.json" + }, + { + "path": "node_modules/eslint/node_modules/which/package.json" + }, + { + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/eslint/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/eslint/node_modules/debug/package.json" + }, + { + "path": "node_modules/got/package.json" + }, + { + "path": "node_modules/got/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/estraverse/package.json" + }, + { + "path": "node_modules/prr/package.json" + }, + { + "path": "node_modules/mdurl/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + }, + { + "path": "node_modules/setimmediate/package.json" + }, + { + "path": "node_modules/diffie-hellman/package.json" + }, + { + "path": "node_modules/resolve-from/package.json" + }, + { + "path": "node_modules/pascalcase/package.json" + }, + { + "path": "node_modules/emojis-list/package.json" + }, + { + "path": "node_modules/https-browserify/package.json" + }, + { + "path": "node_modules/assign-symbols/package.json" + }, + { + "path": "node_modules/browserify-aes/package.json" + }, + { + "path": "node_modules/type-name/package.json" + }, + { + "path": "node_modules/os-locale/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/os-locale/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/semver/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/path-key/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/which/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/execa/package.json" + }, + { + "path": "node_modules/lodash/package.json" + }, + { + "path": "node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/safe-buffer/package.json" + }, + { + "path": "node_modules/@szmarczak/http-timer/package.json" + }, + { + "path": "node_modules/parent-module/package.json" + }, + { + "path": "node_modules/object-keys/package.json" + }, + { + "path": "node_modules/split-string/package.json" + }, + { + "path": "node_modules/base/package.json" + }, + { + "path": "node_modules/base/node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/base/node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/base/node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/base/node_modules/define-property/package.json" + }, + { + "path": "node_modules/write/package.json" + }, + { + "path": "node_modules/configstore/package.json" + }, + { + "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/configstore/node_modules/pify/package.json" + }, + { + "path": "node_modules/configstore/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/v8-to-istanbul/package.json" + }, + { + "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + }, + { + "path": "node_modules/dot-prop/package.json" + }, + { + "path": "node_modules/tsutils/package.json" + }, + { + "path": "node_modules/npm-bundled/package.json" + }, + { + "path": "node_modules/import-fresh/package.json" + }, + { + "path": "node_modules/mute-stream/package.json" + }, + { + "path": "node_modules/browserify-des/package.json" + }, + { + "path": "node_modules/wide-align/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/string-width/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/eslint-scope/package.json" + }, + { + "path": "node_modules/readdirp/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/braces/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/README.md" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/CHANGELOG.md" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/index.js" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/LICENSE" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/parsers.js" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/.DS_Store" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/utils.js" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/compilers.js" + }, + { + "path": "node_modules/readdirp/node_modules/micromatch/lib/cache.js" + }, + { + "path": "node_modules/readdirp/node_modules/is-number/package.json" + }, + { + "path": "node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/cache-base/package.json" + }, + { + "path": "node_modules/is-promise/package.json" + }, + { + "path": "node_modules/parallel-transform/package.json" + }, + { + "path": "node_modules/es6-map/package.json" + }, + { + "path": "node_modules/p-finally/package.json" + }, + { + "path": "node_modules/snapdragon-node/package.json" + }, + { + "path": "node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/snapdragon-node/node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/snapdragon-node/node_modules/define-property/package.json" + }, + { + "path": "node_modules/browserify-cipher/package.json" + }, + { + "path": "node_modules/es6-set/package.json" + }, + { + "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/array-find/package.json" + }, + { + "path": "node_modules/arr-flatten/package.json" + }, + { + "path": "node_modules/evp_bytestokey/package.json" + }, + { + "path": "node_modules/js2xmlparser/package.json" + }, + { + "path": "node_modules/has-value/package.json" + }, + { + "path": "node_modules/istanbul-reports/package.json" + }, + { + "path": "node_modules/tty-browserify/package.json" + }, + { + "path": "node_modules/get-value/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wasm-gen/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-fsm/package.json" + }, + { + "path": "node_modules/@webassemblyjs/floating-point-hex-parser/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-code-frame/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-wasm-section/package.json" + }, + { + "path": "node_modules/@webassemblyjs/ast/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wast-printer/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-module-context/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wasm-edit/package.json" + }, + { + "path": "node_modules/@webassemblyjs/leb128/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wast-parser/package.json" + }, + { + "path": "node_modules/@webassemblyjs/ieee754/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wasm-opt/package.json" + }, + { + "path": "node_modules/@webassemblyjs/utf8/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-buffer/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-wasm-bytecode/package.json" + }, + { + "path": "node_modules/@webassemblyjs/wasm-parser/package.json" + }, + { + "path": "node_modules/@webassemblyjs/helper-api-error/package.json" + }, + { + "path": "node_modules/indexof/package.json" + }, + { + "path": "node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/is-data-descriptor/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/is-data-descriptor/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/progress/package.json" + }, + { + "path": "node_modules/registry-url/package.json" + }, + { + "path": "node_modules/google-gax/package.json" + }, + { + "path": "node_modules/class-utils/package.json" + }, + { + "path": "node_modules/class-utils/node_modules/define-property/package.json" + }, + { + "path": "node_modules/mimic-response/package.json" + }, + { + "path": "node_modules/figures/package.json" + }, + { + "path": "node_modules/eslint-config-prettier/package.json" + }, + { + "path": "node_modules/argparse/package.json" + }, + { + "path": "node_modules/type/package.json" + }, + { + "path": "node_modules/domhandler/package.json" + }, + { + "path": "node_modules/error-ex/package.json" + }, + { + "path": "node_modules/to-object-path/package.json" + }, + { + "path": "node_modules/to-object-path/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/to-object-path/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/errno/package.json" + }, + { + "path": "node_modules/ansi-colors/package.json" + }, + { + "path": "node_modules/safer-buffer/package.json" + }, + { + "path": "node_modules/object.pick/package.json" + }, + { + "path": "node_modules/type-fest/package.json" + }, + { + "path": "node_modules/posix-character-classes/package.json" + }, + { + "path": "node_modules/strip-indent/package.json" + }, + { + "path": "node_modules/boxen/package.json" + }, + { + "path": "node_modules/boxen/node_modules/type-fest/package.json" + }, + { + "path": "node_modules/flat-cache/package.json" + }, + { + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/process/package.json" + }, + { + "path": "node_modules/querystring-es3/package.json" + }, + { + "path": "node_modules/ripemd160/package.json" + }, + { + "path": "node_modules/findup-sync/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/braces/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/README.md" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/CHANGELOG.md" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/index.js" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/LICENSE" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/parsers.js" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/.DS_Store" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/utils.js" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/compilers.js" + }, + { + "path": "node_modules/findup-sync/node_modules/micromatch/lib/cache.js" + }, + { + "path": "node_modules/findup-sync/node_modules/is-number/package.json" + }, + { + "path": "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/has-symbols/package.json" + }, + { + "path": "node_modules/gcp-metadata/package.json" + }, + { + "path": "node_modules/ansi-align/package.json" + }, + { + "path": "node_modules/find-up/package.json" + }, + { + "path": "node_modules/log-symbols/package.json" + }, + { + "path": "node_modules/merge-estraverse-visitors/package.json" + }, + { + "path": "node_modules/is-extglob/package.json" + }, + { + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + }, + { + "path": "node_modules/prettier/package.json" + }, + { + "path": "node_modules/jsonexport/package.json" + }, + { + "path": "node_modules/watchpack/package.json" + }, + { + "path": "node_modules/.bin/sha.js" + }, + { + "path": "node_modules/safe-regex/package.json" + }, + { + "path": "node_modules/wrappy/package.json" + }, + { + "path": "node_modules/npm-run-path/package.json" + }, + { + "path": "node_modules/npm-run-path/node_modules/path-key/package.json" + }, + { + "path": "node_modules/mississippi/package.json" + }, + { + "path": "node_modules/mississippi/node_modules/through2/package.json" + }, + { + "path": "node_modules/promise-inflight/package.json" + }, + { + "path": "node_modules/browserify-sign/package.json" + }, + { + "path": "node_modules/map-obj/package.json" + }, + { + "path": "node_modules/term-size/package.json" + }, + { + "path": "node_modules/pbkdf2/package.json" + }, + { + "path": "node_modules/stream-http/package.json" + }, + { + "path": "node_modules/destroy/package.json" + }, + { + "path": "node_modules/growl/package.json" + }, + { + "path": "node_modules/flush-write-stream/package.json" + }, + { + "path": "node_modules/json-schema-traverse/package.json" + }, + { + "path": "node_modules/npm-packlist/package.json" + }, + { + "path": "node_modules/taffydb/package.json" + }, + { + "path": "node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/loud-rejection/package.json" + }, + { + "path": "node_modules/is-glob/package.json" + }, + { + "path": "node_modules/get-stream/package.json" + }, + { + "path": "node_modules/uglify-js/package.json" + }, + { + "path": "node_modules/minipass/package.json" + }, + { + "path": "node_modules/minipass/node_modules/yallist/package.json" + }, + { + "path": "node_modules/repeat-element/package.json" + }, + { + "path": "node_modules/optimist/package.json" + }, + { + "path": "node_modules/empower/package.json" + }, + { + "path": "node_modules/cacheable-request/package.json" + }, + { + "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/is-ci/package.json" + }, + { + "path": "node_modules/server-destroy/package.json" + }, + { + "path": "node_modules/copy-concurrently/package.json" + }, + { + "path": "node_modules/copy-concurrently/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/import-local/package.json" + }, + { + "path": "node_modules/json-parse-better-errors/package.json" + }, + { + "path": "node_modules/iferr/package.json" + }, + { + "path": "node_modules/core-js/package.json" + }, + { + "path": "node_modules/set-blocking/package.json" + }, + { + "path": "node_modules/p-defer/package.json" + }, + { + "path": "node_modules/create-hmac/package.json" + }, + { + "path": "node_modules/next-tick/package.json" + }, + { + "path": "node_modules/catharsis/package.json" + }, + { + "path": "node_modules/rimraf/package.json" + }, + { + "path": "node_modules/agent-base/package.json" + }, + { + "path": "node_modules/json-bigint/package.json" + }, + { + "path": "node_modules/spdx-exceptions/package.json" + }, + { + "path": "node_modules/color-name/package.json" + }, + { + "path": "node_modules/through/package.json" + }, + { + "path": "node_modules/braces/package.json" + }, + { + "path": "node_modules/jws/package.json" + }, + { + "path": "node_modules/inquirer/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/string-width/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/urix/package.json" + }, + { + "path": "node_modules/etag/package.json" + }, + { + "path": "node_modules/power-assert-formatter/package.json" + }, + { + "path": "node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/text-table/package.json" + }, + { + "path": "node_modules/color-convert/package.json" + }, + { + "path": "node_modules/escope/package.json" + }, + { + "path": "node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/is-installed-globally/package.json" + }, + { + "path": "node_modules/builtin-status-codes/package.json" + }, + { + "path": "node_modules/memory-fs/package.json" + }, + { + "path": "node_modules/redent/package.json" + }, + { + "path": "node_modules/schema-utils/package.json" + }, + { + "path": "node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/esrecurse/package.json" + }, + { + "path": "node_modules/tslint/package.json" + }, + { + "path": "node_modules/tslint/node_modules/semver/package.json" + }, + { + "path": "node_modules/decamelize/package.json" + }, + { + "path": "node_modules/parse-json/package.json" + }, + { + "path": "node_modules/mime/package.json" + }, + { + "path": "node_modules/google-auth-library/package.json" + }, + { + "path": "node_modules/decode-uri-component/package.json" + }, + { + "path": "node_modules/randomfill/package.json" + }, + { + "path": "node_modules/ignore/package.json" + }, + { + "path": "node_modules/loader-runner/package.json" + }, + { + "path": "node_modules/homedir-polyfill/package.json" + }, + { + "path": "node_modules/depd/package.json" + }, + { + "path": "node_modules/union-value/package.json" + }, + { + "path": "node_modules/camelcase-keys/package.json" + }, + { + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/ansi-escapes/package.json" + }, + { + "path": "node_modules/concat-stream/package.json" + }, + { + "path": "node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/is-descriptor/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/expand-brackets/package.json" + }, + { + "path": "node_modules/expand-brackets/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/expand-brackets/node_modules/define-property/package.json" + }, + { + "path": "node_modules/expand-brackets/node_modules/ms/package.json" + }, + { + "path": "node_modules/expand-brackets/node_modules/debug/package.json" + }, + { + "path": "node_modules/decompress-response/package.json" + }, + { + "path": "node_modules/end-of-stream/package.json" + }, + { + "path": "node_modules/diff-match-patch/package.json" + }, + { + "path": "node_modules/big.js/package.json" + }, + { + "path": "node_modules/amdefine/package.json" + }, + { + "path": "node_modules/event-emitter/package.json" + }, + { + "path": "node_modules/has-values/package.json" + }, + { + "path": "node_modules/has-values/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/has-values/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/has-values/node_modules/is-number/package.json" + }, + { + "path": "node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/is-windows/package.json" + }, + { + "path": "node_modules/diff/package.json" + }, + { + "path": "node_modules/tmp/package.json" + }, + { + "path": "node_modules/public-encrypt/package.json" + }, + { + "path": "node_modules/source-map/package.json" + }, + { + "path": "node_modules/is-obj/package.json" + }, + { + "path": "node_modules/asn1.js/package.json" + }, + { + "path": "node_modules/buffer/package.json" + }, + { + "path": "node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/teeny-request/package.json" + }, + { + "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/es-abstract/package.json" + }, + { + "path": "node_modules/linkinator/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/has-flag/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-name/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/chalk/package.json" + }, + { + "path": "node_modules/import-lazy/package.json" + }, + { + "path": "node_modules/inflight/package.json" + }, + { + "path": "node_modules/use/package.json" + }, + { + "path": "node_modules/concat-map/package.json" + }, + { + "path": "node_modules/browserify-rsa/package.json" + }, + { + "path": "node_modules/object.assign/package.json" + }, + { + "path": "node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/hash.js/package.json" + }, + { + "path": "node_modules/expand-tilde/package.json" + }, + { + "path": "node_modules/semver/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + }, + { + "path": "node_modules/ts-loader/package.json" + }, + { + "path": "node_modules/is-typedarray/package.json" + }, + { + "path": "node_modules/resolve-cwd/package.json" + }, + { + "path": "node_modules/resolve-cwd/node_modules/resolve-from/package.json" + }, + { + "path": "node_modules/htmlparser2/package.json" + }, + { + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/cli-boxes/package.json" + }, + { + "path": "node_modules/supports-color/package.json" + }, + { + "path": "node_modules/path-key/package.json" + }, + { + "path": "node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/rc/package.json" + }, + { + "path": "node_modules/rc/node_modules/minimist/package.json" + }, + { + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/yargs-unparser/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + }, + { + "path": "node_modules/worker-farm/package.json" + }, + { + "path": "node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/extend-shallow/node_modules/is-extendable/package.json" + }, + { + "path": "node_modules/abort-controller/package.json" + }, + { + "path": "node_modules/http-errors/package.json" + }, + { + "path": "node_modules/marked/package.json" + }, + { + "path": "node_modules/is-plain-obj/package.json" + }, + { + "path": "node_modules/minimatch/package.json" + }, + { + "path": "node_modules/parse-asn1/package.json" + }, + { + "path": "node_modules/send/package.json" + }, + { + "path": "node_modules/send/node_modules/mime/package.json" + }, + { + "path": "node_modules/send/node_modules/ms/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + }, + { + "path": "node_modules/css-select/package.json" + }, + { + "path": "node_modules/uri-js/package.json" + }, + { + "path": "node_modules/google-p12-pem/package.json" + }, + { + "path": "node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/is-accessor-descriptor/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/component-emitter/package.json" + }, + { + "path": "node_modules/hmac-drbg/package.json" + }, + { + "path": "node_modules/npm-normalize-package-bin/package.json" + }, + { + "path": "node_modules/spdx-license-ids/package.json" + }, + { + "path": "node_modules/yallist/package.json" + }, + { + "path": "node_modules/setprototypeof/package.json" + }, + { + "path": "node_modules/hosted-git-info/package.json" + }, + { + "path": "node_modules/argv/package.json" + }, + { + "path": "node_modules/package-json/package.json" + }, + { + "path": "node_modules/from2/package.json" + }, + { + "path": "node_modules/elliptic/package.json" + }, + { + "path": "node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/array-unique/package.json" + }, + { + "path": "node_modules/external-editor/package.json" + }, + { + "path": "node_modules/@sindresorhus/is/package.json" + }, + { + "path": "node_modules/lodash.camelcase/package.json" + }, + { + "path": "node_modules/path-dirname/package.json" + }, + { + "path": "node_modules/arrify/package.json" + }, + { + "path": "node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/parseurl/package.json" + }, + { + "path": "node_modules/boolbase/package.json" + }, + { + "path": "node_modules/cliui/package.json" + }, + { + "path": "node_modules/balanced-match/package.json" + }, + { + "path": "node_modules/acorn/package.json" + }, + { + "path": "node_modules/stream-browserify/package.json" + }, + { + "path": "node_modules/load-json-file/package.json" + }, + { + "path": "node_modules/load-json-file/node_modules/pify/package.json" + }, + { + "path": "node_modules/builtin-modules/package.json" + }, + { + "path": "node_modules/chokidar/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/glob-parent/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/braces/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/chokidar/node_modules/is-number/package.json" + }, + { + "path": "node_modules/atob/package.json" + }, + { + "path": "node_modules/mamacro/package.json" + }, + { + "path": "node_modules/snapdragon/README.md" + }, + { + "path": "node_modules/snapdragon/package.json" + }, + { + "path": "node_modules/snapdragon/index.js" + }, + { + "path": "node_modules/snapdragon/LICENSE" + }, + { + "path": "node_modules/snapdragon/lib/compiler.js" + }, + { + "path": "node_modules/snapdragon/lib/position.js" + }, + { + "path": "node_modules/snapdragon/lib/parser.js" + }, + { + "path": "node_modules/snapdragon/lib/source-maps.js" + }, + { + "path": "node_modules/snapdragon/lib/utils.js" + }, + { + "path": "node_modules/snapdragon/node_modules/source-map/package.json" + }, + { + "path": "node_modules/snapdragon/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/snapdragon/node_modules/define-property/package.json" + }, + { + "path": "node_modules/snapdragon/node_modules/ms/package.json" + }, + { + "path": "node_modules/snapdragon/node_modules/debug/package.json" + }, + { + "path": "node_modules/widest-line/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/string-width/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/which/package.json" + }, + { + "path": "node_modules/@bcoe/v8-coverage/package.json" + }, + { + "path": "node_modules/assert/package.json" + }, + { + "path": "node_modules/assert/node_modules/inherits/package.json" + }, + { + "path": "node_modules/assert/node_modules/util/package.json" + }, + { + "path": "node_modules/prettier-linter-helpers/package.json" + }, + { + "path": "node_modules/object-inspect/package.json" + }, + { + "path": "node_modules/retry-request/package.json" + }, + { + "path": "node_modules/retry-request/node_modules/debug/package.json" + }, + { + "path": "node_modules/is-arrayish/package.json" + }, + { + "path": "node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/clone-response/package.json" + }, + { + "path": "node_modules/ssri/package.json" + }, + { + "path": "node_modules/deep-is/package.json" + }, + { + "path": "node_modules/@xtuc/ieee754/package.json" + }, + { + "path": "node_modules/@xtuc/long/package.json" + }, + { + "path": "node_modules/regexpp/package.json" + }, + { + "path": "node_modules/sha.js/README.md" + }, + { + "path": "node_modules/sha.js/package.json" + }, + { + "path": "node_modules/sha.js/hash.js" + }, + { + "path": "node_modules/sha.js/.travis.yml" + }, + { + "path": "node_modules/sha.js/sha224.js" + }, + { + "path": "node_modules/sha.js/sha512.js" + }, + { + "path": "node_modules/sha.js/bin.js" + }, + { + "path": "node_modules/sha.js/sha.js" + }, + { + "path": "node_modules/sha.js/index.js" + }, + { + "path": "node_modules/sha.js/sha384.js" + }, + { + "path": "node_modules/sha.js/sha1.js" + }, + { + "path": "node_modules/sha.js/sha256.js" + }, + { + "path": "node_modules/sha.js/LICENSE" + }, + { + "path": "node_modules/sha.js/test/vectors.js" + }, + { + "path": "node_modules/sha.js/test/test.js" + }, + { + "path": "node_modules/sha.js/test/hash.js" + }, + { + "path": "node_modules/node-forge/package.json" + }, + { + "path": "node_modules/pako/package.json" + }, + { + "path": "node_modules/power-assert/package.json" + }, + { + "path": "node_modules/path-is-absolute/package.json" + }, + { + "path": "node_modules/ignore-walk/package.json" + }, + { + "path": "node_modules/finalhandler/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/ms/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/debug/package.json" + }, + { + "path": "node_modules/source-map-support/package.json" + }, + { + "path": "node_modules/source-map-support/node_modules/source-map/package.json" + }, + { + "path": "node_modules/buffer-equal-constant-time/package.json" + }, + { + "path": "node_modules/source-map-resolve/package.json" + }, + { + "path": "node_modules/path-parse/package.json" + }, + { + "path": "node_modules/binary-extensions/package.json" + }, + { + "path": "node_modules/decamelize-keys/package.json" + }, + { + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + }, + { + "path": "node_modules/os-tmpdir/package.json" + }, + { + "path": "node_modules/kind-of/package.json" + }, + { + "path": "node_modules/power-assert-util-string-width/package.json" + }, + { + "path": "node_modules/ajv-keywords/package.json" + }, + { + "path": "node_modules/url-parse-lax/package.json" + }, + { + "path": "node_modules/linkify-it/package.json" + }, + { + "path": "node_modules/url/package.json" + }, + { + "path": "node_modules/url/node_modules/punycode/package.json" + }, + { + "path": "node_modules/async-each/package.json" + }, + { + "path": "node_modules/minimist/package.json" + }, + { + "path": "node_modules/buffer-xor/package.json" + }, + { + "path": "node_modules/fresh/package.json" + }, + { + "path": "node_modules/power-assert-context-formatter/package.json" + }, + { + "path": "node_modules/is-stream/package.json" + }, + { + "path": "node_modules/call-matcher/package.json" + }, + { + "path": "node_modules/is-stream-ended/package.json" + }, + { + "path": "node_modules/slice-ansi/package.json" + }, + { + "path": "node_modules/onetime/package.json" + }, + { + "path": "node_modules/spdx-correct/package.json" + }, + { + "path": "node_modules/fast-deep-equal/package.json" + }, + { + "path": "node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/xdg-basedir/package.json" + }, + { + "path": "node_modules/v8-compile-cache/package.json" + }, + { + "path": "node_modules/callsites/package.json" + }, + { + "path": "node_modules/power-assert-renderer-assertion/package.json" + }, + { + "path": "node_modules/pify/package.json" + }, + { + "path": "node_modules/source-map-url/package.json" + }, + { + "path": "node_modules/snapdragon-util/package.json" + }, + { + "path": "node_modules/snapdragon-util/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/snapdragon-util/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/stream-shift/package.json" + }, + { + "path": "node_modules/crypto-random-string/package.json" + }, + { + "path": "node_modules/escodegen/package.json" + }, + { + "path": "node_modules/escodegen/node_modules/esprima/package.json" + }, + { + "path": "node_modules/entities/package.json" + }, + { + "path": "node_modules/object.getownpropertydescriptors/package.json" + }, + { + "path": "node_modules/power-assert-renderer-file/package.json" + }, + { + "path": "node_modules/events/package.json" + }, + { + "path": "node_modules/define-property/package.json" + }, + { + "path": "node_modules/define-property/node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/define-property/node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/define-property/node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/unpipe/package.json" + }, + { + "path": "node_modules/array-filter/package.json" + }, + { + "path": "node_modules/furi/package.json" + }, + { + "path": "node_modules/pack-n-play/package.json" + }, + { + "path": "node_modules/pack-n-play/node_modules/tmp/package.json" + }, + { + "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/miller-rabin/package.json" + }, + { + "path": "node_modules/strip-eof/package.json" + }, + { + "path": "node_modules/map-cache/package.json" + }, + { + "path": "node_modules/is-path-inside/package.json" + }, + { + "path": "node_modules/ini/package.json" + }, + { + "path": "node_modules/currently-unhandled/package.json" + }, + { + "path": "node_modules/global-modules/package.json" + }, + { + "path": "node_modules/global-modules/node_modules/which/package.json" + }, + { + "path": "node_modules/global-modules/node_modules/global-prefix/package.json" + }, + { + "path": "node_modules/invert-kv/package.json" + }, + { + "path": "node_modules/validate-npm-package-license/package.json" + }, + { + "path": "node_modules/fill-range/package.json" + }, + { + "path": "node_modules/bignumber.js/package.json" + }, + { + "path": "node_modules/is-yarn-global/package.json" + }, + { + "path": "node_modules/lodash.has/package.json" + }, + { + "path": "node_modules/camelcase/package.json" + }, + { + "path": "node_modules/prelude-ls/package.json" + }, + { + "path": "node_modules/codecov/package.json" + }, + { + "path": "node_modules/es6-promise/package.json" + }, + { + "path": "node_modules/doctrine/package.json" + }, + { + "path": "node_modules/path-exists/package.json" + }, + { + "path": "node_modules/deep-extend/package.json" + }, + { + "path": "node_modules/os-browserify/package.json" + }, + { + "path": "node_modules/nth-check/package.json" + }, + { + "path": "node_modules/regex-not/package.json" + }, + { + "path": "node_modules/isarray/package.json" + }, + { + "path": "node_modules/es-to-primitive/package.json" + }, + { + "path": "node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/to-regex/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + }, + { + "path": "node_modules/path-type/package.json" + }, + { + "path": "node_modules/path-type/node_modules/pify/package.json" + }, + { + "path": "node_modules/fs-minipass/package.json" + }, + { + "path": "node_modules/pumpify/package.json" + }, + { + "path": "node_modules/pumpify/node_modules/pump/package.json" + }, + { + "path": "node_modules/fast-json-stable-stringify/package.json" + }, + { + "path": "node_modules/p-locate/package.json" + }, + { + "path": "node_modules/stream-each/package.json" + }, + { + "path": "node_modules/enhanced-resolve/package.json" + }, + { + "path": "node_modules/intelli-espower-loader/package.json" + }, + { + "path": "node_modules/node-fetch/package.json" + }, + { + "path": "node_modules/registry-auth-token/package.json" + }, + { + "path": "node_modules/repeat-string/package.json" + }, + { + "path": "node_modules/terser-webpack-plugin/package.json" + }, + { + "path": "node_modules/fragment-cache/package.json" + }, + { + "path": "node_modules/esutils/package.json" + }, + { + "path": "node_modules/run-queue/package.json" + }, + { + "path": "node_modules/which-module/package.json" + }, + { + "path": "node_modules/function-bind/package.json" + }, + { + "path": "node_modules/lcid/package.json" + }, + { + "path": "node_modules/map-visit/package.json" + }, + { + "path": "node_modules/trim-newlines/package.json" + }, + { + "path": "node_modules/event-target-shim/package.json" + }, + { + "path": "node_modules/commondir/package.json" + }, + { + "path": "node_modules/unset-value/package.json" + }, + { + "path": "node_modules/unset-value/node_modules/has-value/package.json" + }, + { + "path": "node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" + }, + { + "path": "node_modules/unset-value/node_modules/has-values/package.json" + }, + { + "path": "node_modules/parse-passwd/package.json" + }, + { + "path": "node_modules/on-finished/package.json" + }, + { + "path": "node_modules/y18n/package.json" + }, + { + "path": "node_modules/cacache/package.json" + }, + { + "path": "node_modules/cacache/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/quick-lru/package.json" + }, + { + "path": "node_modules/js-yaml/package.json" + }, + { + "path": "node_modules/flat/package.json" + }, + { + "path": "node_modules/normalize-package-data/package.json" + }, + { + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + }, + { + "path": "node_modules/es6-iterator/package.json" + }, + { + "path": "node_modules/remove-trailing-separator/package.json" + }, + { + "path": "node_modules/typescript/package.json" + }, + { + "path": "node_modules/mkdirp/package.json" + }, + { + "path": "node_modules/mkdirp/node_modules/minimist/package.json" + }, + { + "path": "node_modules/chrome-trace-event/package.json" + }, + { + "path": "node_modules/console-browserify/package.json" + }, + { + "path": "node_modules/fast-text-encoding/package.json" + }, + { + "path": "node_modules/acorn-es7-plugin/package.json" + }, + { + "path": "node_modules/through2/package.json" + }, + { + "path": "node_modules/eslint-visitor-keys/package.json" + }, + { + "path": "node_modules/glob/package.json" + }, + { + "path": "node_modules/inherits/package.json" + }, + { + "path": "node_modules/object-copy/package.json" + }, + { + "path": "node_modules/object-copy/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/object-copy/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/object-copy/node_modules/define-property/package.json" + }, + { + "path": "node_modules/string.prototype.trimright/package.json" + }, + { + "path": "node_modules/punycode/package.json" + }, + { + "path": "node_modules/es5-ext/package.json" + }, + { + "path": "node_modules/is-date-object/package.json" + }, + { + "path": "node_modules/sprintf-js/package.json" + }, + { + "path": "node_modules/is-npm/package.json" + }, + { + "path": "node_modules/has-yarn/package.json" + }, + { + "path": "node_modules/get-stdin/package.json" + }, + { + "path": "node_modules/global-prefix/package.json" + }, + { + "path": "node_modules/global-prefix/node_modules/which/package.json" + }, + { + "path": "node_modules/extglob/package.json" + }, + { + "path": "node_modules/extglob/node_modules/is-data-descriptor/package.json" + }, + { + "path": "node_modules/extglob/node_modules/is-descriptor/package.json" + }, + { + "path": "node_modules/extglob/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/extglob/node_modules/is-accessor-descriptor/package.json" + }, + { + "path": "node_modules/extglob/node_modules/define-property/package.json" + }, + { + "path": "node_modules/ajv-errors/package.json" + }, + { + "path": "node_modules/node-libs-browser/package.json" + }, + { + "path": "node_modules/node-libs-browser/node_modules/punycode/package.json" + }, + { + "path": "node_modules/constants-browserify/package.json" + }, + { + "path": "node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/empower-core/package.json" + }, + { + "path": "node_modules/imurmurhash/package.json" + }, + { + "path": "node_modules/globals/package.json" + }, + { + "path": "node_modules/create-ecdh/package.json" + }, + { + "path": "node_modules/latest-version/package.json" + }, + { + "path": "node_modules/natural-compare/package.json" + }, + { + "path": "node_modules/commander/package.json" + }, + { + "path": "node_modules/timers-browserify/package.json" + }, + { + "path": "node_modules/path-is-inside/package.json" + }, + { + "path": "node_modules/rxjs/package.json" + }, + { + "path": "node_modules/node-environment-flags/package.json" + }, + { + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + }, + { + "path": "node_modules/p-limit/package.json" + }, + { + "path": "node_modules/call-signature/package.json" + }, + { + "path": "node_modules/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/neo-async/package.json" + }, + { + "path": "node_modules/foreground-child/package.json" + }, + { + "path": "node_modules/des.js/package.json" + }, + { + "path": "node_modules/he/package.json" + }, + { + "path": "node_modules/tar/package.json" + }, + { + "path": "node_modules/tar/node_modules/yallist/package.json" + }, + { + "path": "node_modules/meow/package.json" + }, + { + "path": "node_modules/meow/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/meow/node_modules/find-up/package.json" + }, + { + "path": "node_modules/meow/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/meow/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/meow/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-limit/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-try/package.json" + }, + { + "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/chownr/package.json" + }, + { + "path": "node_modules/toidentifier/package.json" + }, + { + "path": "node_modules/execa/package.json" + }, + { + "path": "node_modules/execa/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/execa/node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/execa/node_modules/yallist/package.json" + }, + { + "path": "node_modules/execa/node_modules/which/package.json" + }, + { + "path": "node_modules/execa/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/execa/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/execa/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/levn/package.json" + }, + { + "path": "node_modules/unique-string/package.json" + }, + { + "path": "node_modules/gaxios/package.json" + }, + { + "path": "node_modules/create-hash/package.json" + }, + { + "path": "node_modules/figgy-pudding/package.json" + }, + { + "path": "node_modules/power-assert-renderer-base/package.json" + }, + { + "path": "node_modules/browser-stdout/package.json" + }, + { + "path": "node_modules/regexp.prototype.flags/package.json" + }, + { + "path": "node_modules/ieee754/package.json" + }, + { + "path": "node_modules/run-async/package.json" + }, + { + "path": "node_modules/cheerio/package.json" + }, + { + "path": "node_modules/eslint-utils/package.json" + }, + { + "path": "node_modules/prepend-http/package.json" + }, + { + "path": "node_modules/urlgrey/package.json" + }, + { + "path": "node_modules/define-properties/package.json" + }, + { + "path": "node_modules/p-timeout/package.json" + }, + { + "path": "node_modules/cli-cursor/package.json" + }, + { + "path": "node_modules/unique-filename/package.json" + }, + { + "path": "node_modules/pump/package.json" + }, + { + "path": "node_modules/stringifier/package.json" + }, + { + "path": "node_modules/espower-location-detector/package.json" + }, + { + "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" + }, + { + "path": "node_modules/escape-html/package.json" + }, + { + "path": "node_modules/http-cache-semantics/package.json" + }, + { + "path": "node_modules/to-readable-stream/package.json" + }, + { + "path": "node_modules/eastasianwidth/package.json" + }, + { + "path": "node_modules/chardet/package.json" + }, + { + "path": "node_modules/js-tokens/package.json" + }, + { + "path": "node_modules/chalk/package.json" + }, + { + "path": "node_modules/chalk/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/is-regex/package.json" + }, + { + "path": "node_modules/ajv/package.json" + }, + { + "path": "node_modules/spdx-expression-parse/package.json" + }, + { + "path": "node_modules/cli-width/package.json" + }, + { + "path": "node_modules/ms/package.json" + }, + { + "path": "node_modules/fs-write-stream-atomic/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/package.json" + }, + { + "path": "node_modules/base64-js/package.json" + }, + { + "path": "node_modules/encodeurl/package.json" + }, + { + "path": "node_modules/to-arraybuffer/package.json" + }, + { + "path": "node_modules/micromatch/package.json" + }, + { + "path": "node_modules/json-buffer/package.json" + }, + { + "path": "node_modules/file-entry-cache/package.json" + }, + { + "path": "node_modules/mixin-deep/package.json" + }, + { + "path": "node_modules/mixin-deep/node_modules/is-extendable/package.json" + }, + { + "path": "node_modules/is-binary-path/package.json" + }, + { + "path": "node_modules/gtoken/package.json" + }, + { + "path": "node_modules/klaw/package.json" + }, + { + "path": "node_modules/functional-red-black-tree/package.json" + }, + { + "path": "node_modules/dom-serializer/package.json" + }, + { + "path": "node_modules/is-symbol/package.json" + }, + { + "path": "node_modules/vm-browserify/package.json" + }, + { + "path": "node_modules/picomatch/package.json" + }, + { + "path": "node_modules/source-list-map/package.json" + }, + { + "path": "node_modules/@babel/parser/package.json" + }, + { + "path": "node_modules/@babel/highlight/package.json" + }, + { + "path": "node_modules/@babel/code-frame/package.json" + }, + { + "path": "node_modules/move-concurrently/package.json" + }, + { + "path": "node_modules/move-concurrently/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/type-check/package.json" + }, + { + "path": "node_modules/nanomatch/package.json" + }, + { + "path": "node_modules/iconv-lite/package.json" + }, + { + "path": "node_modules/querystring/package.json" + }, + { + "path": "node_modules/webpack/package.json" + }, + { + "path": "node_modules/webpack/node_modules/eslint-scope/package.json" + }, + { + "path": "node_modules/webpack/node_modules/braces/package.json" + }, + { + "path": "node_modules/webpack/node_modules/braces/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/webpack/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/webpack/node_modules/memory-fs/package.json" + }, + { + "path": "node_modules/webpack/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/webpack/node_modules/acorn/package.json" + }, + { + "path": "node_modules/webpack/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/README.md" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/package.json" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/CHANGELOG.md" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/index.js" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/LICENSE" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/parsers.js" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/.DS_Store" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/utils.js" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/compilers.js" + }, + { + "path": "node_modules/webpack/node_modules/micromatch/lib/cache.js" + }, + { + "path": "node_modules/webpack/node_modules/is-number/package.json" + }, + { + "path": "node_modules/webpack/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/is-url/package.json" + }, + { + "path": "node_modules/randombytes/package.json" + }, + { + "path": "node_modules/domutils/package.json" + }, + { + "path": "node_modules/browserify-zlib/package.json" + }, + { + "path": "node_modules/p-queue/package.json" + }, + { + "path": "node_modules/eventemitter3/package.json" + }, + { + "path": "node_modules/object-visit/package.json" + }, + { + "path": "node_modules/ext/package.json" + }, + { + "path": "node_modules/ext/node_modules/type/package.json" + }, + { + "path": "node_modules/pkg-dir/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/find-up/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/pkg-dir/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/deep-equal/package.json" + }, + { + "path": "node_modules/parse5/package.json" + }, + { + "path": "node_modules/collection-visit/package.json" + }, + { + "path": "node_modules/flatted/package.json" + }, + { + "path": "node_modules/for-in/package.json" + }, + { + "path": "node_modules/util/package.json" + }, + { + "path": "node_modules/util/node_modules/inherits/package.json" + }, + { + "path": "node_modules/mem/package.json" + }, + { + "path": "node_modules/once/package.json" + }, + { + "path": "node_modules/universal-deep-strict-equal/package.json" + }, + { + "path": "node_modules/anymatch/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/braces/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/braces/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/fill-range/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/README.md" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/CHANGELOG.md" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/index.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/LICENSE" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/parsers.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/.DS_Store" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/utils.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/compilers.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/cache.js" + }, + { + "path": "node_modules/anymatch/node_modules/is-number/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/normalize-path/package.json" + }, + { + "path": "node_modules/brace-expansion/package.json" + }, + { + "path": "node_modules/tapable/package.json" + }, + { + "path": "node_modules/is-number/package.json" + }, + { + "path": "node_modules/jsdoc-region-tag/package.json" + }, + { + "path": "node_modules/serialize-javascript/package.json" + }, + { + "path": "node_modules/webpack-cli/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/find-up/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/webpack-cli/node_modules/memory-fs/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/semver/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/path-key/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/which/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/v8-compile-cache/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/enhanced-resolve/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/webpack-cli/node_modules/yargs/package.json" + }, + { + "path": "node_modules/markdown-it-anchor/package.json" + }, + { + "path": "node_modules/traverse/package.json" + }, + { + "path": "node_modules/restore-cursor/package.json" + }, + { + "path": "node_modules/lodash.at/package.json" + }, + { + "path": "node_modules/graceful-fs/package.json" + }, + { + "path": "node_modules/isobject/package.json" + }, + { + "path": "node_modules/responselike/package.json" + }, + { + "path": "node_modules/pseudomap/package.json" + }, + { + "path": "node_modules/hash-base/package.json" + }, + { + "path": "node_modules/espurify/package.json" + }, + { + "path": "node_modules/espree/package.json" + }, + { + "path": "node_modules/crypto-browserify/package.json" + }, + { + "path": "node_modules/power-assert-renderer-diagram/package.json" + }, + { + "path": "node_modules/word-wrap/package.json" + }, + { + "path": "node_modules/espower-source/package.json" + }, + { + "path": "node_modules/espower-source/node_modules/acorn/package.json" + }, + { + "path": "node_modules/normalize-url/package.json" + }, + { + "path": "node_modules/infer-owner/package.json" + }, + { + "path": "node_modules/wordwrap/package.json" + }, + { + "path": "node_modules/ee-first/package.json" + }, + { + "path": "node_modules/table/package.json" + }, + { + "path": "node_modules/handlebars/package.json" + }, + { + "path": "node_modules/object-assign/package.json" + }, + { + "path": "node_modules/es6-weak-map/package.json" + }, + { + "path": "node_modules/protobufjs/package.json" + }, + { + "path": "node_modules/protobufjs/cli/package.json" + }, + { + "path": "node_modules/protobufjs/cli/package-lock.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + }, + { + "path": "node_modules/protobufjs/node_modules/@types/node/package.json" + }, + { + "path": "node_modules/normalize-path/package.json" + }, + { + "path": "node_modules/cyclist/package.json" + }, + { + "path": "node_modules/espower/package.json" + }, + { + "path": "node_modules/espower/node_modules/source-map/package.json" + }, + { + "path": "node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/process-nextick-args/package.json" + }, + { + "path": "node_modules/brorand/package.json" + }, + { + "path": "node_modules/uuid/package.json" + }, + { + "path": "node_modules/p-is-promise/package.json" + }, + { + "path": "node_modules/array-find-index/package.json" + }, + { + "path": "node_modules/astral-regex/package.json" + }, + { + "path": "node_modules/@grpc/proto-loader/package.json" + }, + { + "path": "node_modules/@grpc/grpc-js/package.json" + }, + { + "path": "node_modules/test-exclude/package.json" + }, + { + "path": "node_modules/es6-promisify/package.json" + }, + { + "path": "node_modules/p-try/package.json" + }, + { + "path": "node_modules/optionator/package.json" + }, + { + "path": "node_modules/is-plain-object/package.json" + }, + { + "path": "node_modules/requizzle/package.json" + }, + { + "path": "node_modules/c8/package.json" + }, + { + "path": "node_modules/fast-levenshtein/package.json" + }, + { + "path": "node_modules/statuses/package.json" + }, + { + "path": "node_modules/semver-diff/package.json" + }, + { + "path": "node_modules/semver-diff/node_modules/semver/package.json" + }, + { + "path": "node_modules/signal-exit/package.json" + }, + { + "path": "node_modules/jsdoc/package.json" + }, + { + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/map-age-cleaner/package.json" + }, + { + "path": "node_modules/resolve-url/package.json" + }, + { + "path": "node_modules/duplexify/package.json" + }, + { + "path": "node_modules/ret/package.json" + }, + { + "path": "node_modules/object-is/package.json" + }, + { + "path": "node_modules/tslib/package.json" + }, + { + "path": "node_modules/extend/package.json" + }, + { + "path": "node_modules/is-wsl/package.json" + }, + { + "path": "node_modules/power-assert-context-reducer-ast/package.json" + }, + { + "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" + }, + { + "path": "node_modules/css-what/package.json" + }, + { + "path": "node_modules/power-assert-renderer-comparison/package.json" + }, + { + "path": "node_modules/ecdsa-sig-formatter/package.json" + }, + { + "path": "node_modules/unique-slug/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/README.md" + }, + { + "path": "node_modules/typedarray-to-buffer/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/.travis.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/index.js" + }, + { + "path": "node_modules/typedarray-to-buffer/.airtap.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/LICENSE" + }, + { + "path": "node_modules/typedarray-to-buffer/test/basic.js" + }, + { + "path": "node_modules/upath/package.json" + }, + { + "path": "node_modules/markdown-it/package.json" + }, + { + "path": "node_modules/tslint-config-prettier/package.json" + }, + { + "path": "node_modules/buffer-from/package.json" + }, + { + "path": "node_modules/minizlib/package.json" + }, + { + "path": "node_modules/minizlib/node_modules/yallist/package.json" + }, + { + "path": "node_modules/domelementtype/package.json" + }, + { + "path": "node_modules/ci-info/package.json" + }, + { + "path": "node_modules/@types/mocha/package.json" + }, + { + "path": "node_modules/@types/color-name/package.json" + }, + { + "path": "node_modules/@types/is-windows/package.json" + }, + { + "path": "node_modules/@types/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/@types/node/package.json" + }, + { + "path": "node_modules/@types/long/package.json" + }, + { + "path": "node_modules/serve-static/package.json" + }, + { + "path": "node_modules/make-dir/package.json" + }, + { + "path": "node_modules/make-dir/node_modules/semver/package.json" + }, + { + "path": "node_modules/md5.js/package.json" + }, + { + "path": "node_modules/esquery/package.json" + }, + { + "path": "node_modules/ncp/package.json" + }, + { + "path": "node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/set-value/package.json" + }, + { + "path": "node_modules/set-value/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/read-pkg/package.json" + }, + { + "path": "node_modules/fast-diff/package.json" + }, + { + "path": "node_modules/path-browserify/package.json" + }, + { + "path": "node_modules/xtend/package.json" + }, + { + "path": "node_modules/resolve/package.json" + }, + { + "path": "node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/webpack-sources/package.json" + }, + { + "path": "node_modules/is-extendable/package.json" + }, + { + "path": "node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/p-cancelable/package.json" + }, + { + "path": "node_modules/aproba/package.json" + }, + { + "path": "node_modules/resolve-dir/package.json" + }, + { + "path": "node_modules/resolve-dir/node_modules/global-modules/package.json" + }, + { + "path": "node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/interpret/package.json" + }, + { + "path": "node_modules/power-assert-context-traversal/package.json" + }, + { + "path": "node_modules/long/package.json" + }, + { + "path": "node_modules/d/package.json" + }, + { + "path": "node_modules/debug/package.json" + }, + { + "path": "node_modules/mimic-fn/package.json" + }, + { + "path": "node_modules/bn.js/package.json" + }, + { + "path": "node_modules/arr-union/package.json" + }, + { + "path": "node_modules/cipher-base/package.json" + }, + { + "path": "node_modules/typedarray/package.json" + }, + { + "path": "node_modules/isexe/package.json" + }, + { + "path": "node_modules/multi-stage-sourcemap/package.json" + }, + { + "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" + }, + { + "path": "node_modules/find-cache-dir/package.json" + }, + { + "path": "node_modules/uc.micro/package.json" + }, + { + "path": "node_modules/fs.realpath/package.json" + }, + { + "path": "node_modules/eslint-plugin-prettier/package.json" + }, + { + "path": "node_modules/yargs/package.json" + }, + { + "path": "node_modules/yargs/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs/node_modules/find-up/package.json" + }, + { + "path": "node_modules/yargs/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/yargs/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/nice-try/package.json" + }, + { + "path": "node_modules/static-extend/package.json" + }, + { + "path": "node_modules/static-extend/node_modules/define-property/package.json" + }, + { + "path": "node_modules/has/package.json" + }, + { + "path": "node_modules/xmlcreate/package.json" + }, + { + "path": "node_modules/escallmatch/package.json" + }, + { + "path": "node_modules/escallmatch/node_modules/esprima/package.json" + }, + { + "path": "node_modules/get-caller-file/package.json" + }, + { + "path": "node_modules/jwa/package.json" + }, + { + "path": "node_modules/json5/package.json" + }, + { + "path": "node_modules/json5/node_modules/minimist/package.json" + }, + { + "path": "smoke-test/.eslintrc.yml" } ] } \ No newline at end of file From a26d110bd498b0e778c5fcefabf182953cbb47d1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 31 Dec 2019 02:43:13 +0200 Subject: [PATCH 301/488] chore(deps): update dependency c8 to v7 (#342) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6ba79bb6d28..bee4b69007c 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -49,7 +49,7 @@ "devDependencies": { "@types/mocha": "^5.2.5", "@types/node": "^12.0.0", - "c8": "^6.0.0", + "c8": "^7.0.0", "codecov": "^3.0.2", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", From f76058cfb955fb015f07c845733108b13098bba8 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 31 Dec 2019 04:01:54 +0200 Subject: [PATCH 302/488] chore(deps): update dependency eslint-plugin-node to v11 (#343) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index bee4b69007c..efbda0abc99 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -53,7 +53,7 @@ "codecov": "^3.0.2", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.0", "gts": "^1.0.0", "intelli-espower-loader": "^1.0.1", From b13051726ec8b0abe561a5e0556f3602b782decb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 3 Jan 2020 10:19:51 -0800 Subject: [PATCH 303/488] fix: closing a client twice throws error earlier --- packages/google-cloud-language/.nycrc | 1 + .../google-cloud-language/protos/protos.d.ts | 2 +- .../google-cloud-language/protos/protos.js | 2 +- .../src/v1/language_service_client.ts | 6 +- .../src/v1beta2/language_service_client.ts | 6 +- packages/google-cloud-language/synth.metadata | 2736 +++++++++-------- .../system-test/install.ts | 1 + 7 files changed, 1501 insertions(+), 1253 deletions(-) diff --git a/packages/google-cloud-language/.nycrc b/packages/google-cloud-language/.nycrc index 367688844eb..b18d5472b62 100644 --- a/packages/google-cloud-language/.nycrc +++ b/packages/google-cloud-language/.nycrc @@ -12,6 +12,7 @@ "**/scripts", "**/protos", "**/test", + "**/*.d.ts", ".jsdoc.js", "**/.jsdoc.js", "karma.conf.js", diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index 5fb81e22502..d32873e4420 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 34e54c42509..f41182c5b22 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index ffa2e1b841f..a230f6d010a 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -174,6 +174,9 @@ export class LanguageServiceClient { for (const methodName of languageServiceStubMethods) { const innerCallPromise = this.languageServiceStub.then( stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } return stub[methodName].apply(stub, args); }, (err: Error | null | undefined) => () => { @@ -194,9 +197,6 @@ export class LanguageServiceClient { callOptions?: CallOptions, callback?: APICallback ) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } return apiCall(argument, callOptions, callback); }; } diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 40c16893a12..c8898519062 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -174,6 +174,9 @@ export class LanguageServiceClient { for (const methodName of languageServiceStubMethods) { const innerCallPromise = this.languageServiceStub.then( stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } return stub[methodName].apply(stub, args); }, (err: Error | null | undefined) => () => { @@ -194,9 +197,6 @@ export class LanguageServiceClient { callOptions?: CallOptions, callback?: APICallback ) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } return apiCall(argument, callOptions, callback); }; } diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index a688e50895d..769dca08131 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-12-21T12:20:25.758817Z", + "updateTime": "2020-01-03T12:16:16.650006Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1a380ea21dea9b6ac6ad28c60ad96d9d73574e19", - "internalRef": "286616241" + "sha": "4d45a6399e9444fbddaeb1c86aabfde210723714", + "internalRef": "287908369" } }, { @@ -39,3736 +39,3982 @@ ], "newFiles": [ { - "path": ".repo-metadata.json" + "path": "synth.metadata" }, { - "path": "README.md" + "path": ".repo-metadata.json" }, { - "path": "package.json" + "path": "CONTRIBUTING.md" }, { - "path": "CHANGELOG.md" + "path": "linkinator.config.json" }, { - "path": ".gitignore" + "path": ".prettierignore" }, { - "path": "CODE_OF_CONDUCT.md" + "path": "tsconfig.json" }, { - "path": "webpack.config.js" + "path": ".jsdoc.js" }, { - "path": "CONTRIBUTING.md" + "path": ".gitignore" }, { - "path": ".prettierrc" + "path": "synth.py" }, { - "path": "package-lock.json" + "path": "CODE_OF_CONDUCT.md" }, { - "path": ".eslintignore" + "path": "README.md" }, { - "path": "linkinator.config.json" + "path": "package-lock.json" }, { - "path": ".eslintrc.yml" + "path": ".prettierrc" }, { - "path": "renovate.json" + "path": ".readme-partials.yml" }, { - "path": "synth.metadata" + "path": "codecov.yaml" }, { - "path": ".prettierignore" + "path": ".nycrc" }, { - "path": "synth.py" + "path": "package.json" }, { - "path": ".readme-partials.yml" + "path": "webpack.config.js" }, { - "path": "codecov.yaml" + "path": ".eslintrc.yml" }, { "path": "tslint.json" }, { - "path": ".jsdoc.js" + "path": "renovate.json" }, { "path": "LICENSE" }, { - "path": ".nycrc" + "path": "CHANGELOG.md" }, { - "path": "tsconfig.json" + "path": ".eslintignore" }, { - "path": "src/index.ts" + "path": ".github/PULL_REQUEST_TEMPLATE.md" }, { - "path": "src/v1/language_service_proto_list.json" + "path": ".github/release-please.yml" }, { - "path": "src/v1/index.ts" + "path": ".github/ISSUE_TEMPLATE/support_request.md" }, { - "path": "src/v1/language_service_client_config.json" + "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, { - "path": "src/v1/language_service_client.ts" + "path": ".github/ISSUE_TEMPLATE/feature_request.md" }, { - "path": "src/v1beta2/language_service_proto_list.json" + "path": ".kokoro/samples-test.sh" }, { - "path": "src/v1beta2/index.ts" + "path": ".kokoro/system-test.sh" }, { - "path": "src/v1beta2/language_service_client_config.json" + "path": ".kokoro/docs.sh" }, { - "path": "src/v1beta2/language_service_client.ts" + "path": ".kokoro/lint.sh" }, { - "path": "build/src/index.d.ts" + "path": ".kokoro/.gitattributes" }, { - "path": "build/src/index.js.map" + "path": ".kokoro/publish.sh" }, { - "path": "build/src/index.js" + "path": ".kokoro/trampoline.sh" }, { - "path": "build/src/v1/index.d.ts" + "path": ".kokoro/common.cfg" }, { - "path": "build/src/v1/index.js.map" + "path": ".kokoro/test.bat" }, { - "path": "build/src/v1/language_service_client.js.map" + "path": ".kokoro/test.sh" }, { - "path": "build/src/v1/language_service_client_config.d.ts" + "path": ".kokoro/release/docs.sh" }, { - "path": "build/src/v1/language_service_client.js" + "path": ".kokoro/release/docs.cfg" }, { - "path": "build/src/v1/index.js" + "path": ".kokoro/release/common.cfg" }, { - "path": "build/src/v1/language_service_client_config.json" + "path": ".kokoro/release/publish.cfg" }, { - "path": "build/src/v1/language_service_client.d.ts" + "path": ".kokoro/presubmit/node12/test.cfg" }, { - "path": "build/src/v1beta2/index.d.ts" + "path": ".kokoro/presubmit/node12/common.cfg" }, { - "path": "build/src/v1beta2/index.js.map" + "path": ".kokoro/presubmit/node8/test.cfg" }, { - "path": "build/src/v1beta2/language_service_client.js.map" + "path": ".kokoro/presubmit/node8/common.cfg" }, { - "path": "build/src/v1beta2/language_service_client_config.d.ts" + "path": ".kokoro/presubmit/windows/test.cfg" }, { - "path": "build/src/v1beta2/language_service_client.js" + "path": ".kokoro/presubmit/windows/common.cfg" }, { - "path": "build/src/v1beta2/index.js" + "path": ".kokoro/presubmit/node10/lint.cfg" }, { - "path": "build/src/v1beta2/language_service_client_config.json" + "path": ".kokoro/presubmit/node10/system-test.cfg" }, { - "path": "build/src/v1beta2/language_service_client.d.ts" + "path": ".kokoro/presubmit/node10/test.cfg" }, { - "path": "build/protos/protos.json" + "path": ".kokoro/presubmit/node10/docs.cfg" }, { - "path": "build/protos/protos.js" + "path": ".kokoro/presubmit/node10/common.cfg" }, { - "path": "build/protos/protos.d.ts" + "path": ".kokoro/presubmit/node10/samples-test.cfg" }, { - "path": "build/protos/google/cloud/language/v1/language_service.proto" + "path": ".kokoro/continuous/node12/test.cfg" }, { - "path": "build/protos/google/cloud/language/v1beta2/language_service.proto" + "path": ".kokoro/continuous/node12/common.cfg" }, { - "path": "build/test/gapic-language_service-v1beta2.d.ts" + "path": ".kokoro/continuous/node8/test.cfg" }, { - "path": "build/test/gapic-language_service-v1beta2.js" + "path": ".kokoro/continuous/node8/common.cfg" }, { - "path": "build/test/gapic-language_service-v1beta2.js.map" + "path": ".kokoro/continuous/node10/lint.cfg" }, { - "path": "build/test/gapic-language_service-v1.js.map" + "path": ".kokoro/continuous/node10/system-test.cfg" }, { - "path": "build/test/gapic-language_service-v1.js" + "path": ".kokoro/continuous/node10/test.cfg" }, { - "path": "build/test/gapic-language_service-v1.d.ts" + "path": ".kokoro/continuous/node10/docs.cfg" }, { - "path": "build/system-test/install.js.map" + "path": ".kokoro/continuous/node10/common.cfg" }, { - "path": "build/system-test/install.d.ts" + "path": ".kokoro/continuous/node10/samples-test.cfg" }, { - "path": "build/system-test/install.js" + "path": "test/gapic-language_service-v1.ts" }, { - "path": "__pycache__/synth.cpython-36.pyc" + "path": "test/mocha.opts" }, { - "path": "samples/automlNaturalLanguageDataset.js" + "path": "test/gapic-language_service-v1beta2.ts" }, { - "path": "samples/README.md" + "path": "system-test/language_service_smoke_test.js" }, { - "path": "samples/package.json" + "path": "system-test/install.ts" }, { - "path": "samples/setEndpoint.js" + "path": "system-test/fixtures/sample/src/index.ts" }, { - "path": "samples/automlNaturalLanguagePredict.js" + "path": "system-test/fixtures/sample/src/index.js" }, { - "path": "samples/analyze.v1.js" + "path": "build/test/gapic-language_service-v1.d.ts" }, { - "path": "samples/.eslintrc.yml" + "path": "build/test/gapic-language_service-v1.js" }, { - "path": "samples/analyze.v1beta2.js" + "path": "build/test/gapic-language_service-v1.js.map" }, { - "path": "samples/quickstart.js" + "path": "build/test/gapic-language_service-v1beta2.js" }, { - "path": "samples/automlNaturalLanguageModel.js" + "path": "build/test/gapic-language_service-v1beta2.d.ts" }, { - "path": "samples/automl/automlNaturalLanguageDataset.js" + "path": "build/test/gapic-language_service-v1beta2.js.map" }, { - "path": "samples/automl/automlNaturalLanguagePredict.js" + "path": "build/system-test/install.d.ts" }, { - "path": "samples/automl/automlNaturalLanguageModel.js" + "path": "build/system-test/install.js" }, { - "path": "samples/automl/resources/test.txt" + "path": "build/system-test/install.js.map" }, { - "path": "samples/test/analyze.v1beta2.test.js" + "path": "build/protos/protos.d.ts" }, { - "path": "samples/test/analyze.v1.test.js" + "path": "build/protos/protos.js" }, { - "path": "samples/test/setEndpoint.test.js" + "path": "build/protos/protos.json" }, { - "path": "samples/test/automlNaturalLanguage.test.js" + "path": "build/protos/google/cloud/language/v1beta2/language_service.proto" }, { - "path": "samples/test/quickstart.test.js" + "path": "build/protos/google/cloud/language/v1/language_service.proto" }, { - "path": "samples/test/.eslintrc.yml" + "path": "build/src/index.js" }, { - "path": "samples/resources/android_text.txt" + "path": "build/src/index.js.map" }, { - "path": "samples/resources/text.txt" + "path": "build/src/index.d.ts" }, { - "path": ".github/PULL_REQUEST_TEMPLATE.md" + "path": "build/src/v1beta2/language_service_client.js.map" }, { - "path": ".github/release-please.yml" + "path": "build/src/v1beta2/language_service_client.d.ts" }, { - "path": ".github/ISSUE_TEMPLATE/support_request.md" + "path": "build/src/v1beta2/index.js" }, { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" + "path": "build/src/v1beta2/language_service_client_config.d.ts" }, { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" + "path": "build/src/v1beta2/language_service_client_config.json" }, { - "path": ".kokoro/test.sh" + "path": "build/src/v1beta2/index.js.map" }, { - "path": ".kokoro/docs.sh" + "path": "build/src/v1beta2/language_service_client.js" }, { - "path": ".kokoro/samples-test.sh" + "path": "build/src/v1beta2/index.d.ts" }, { - "path": ".kokoro/.gitattributes" + "path": "build/src/v1/language_service_client.js.map" }, { - "path": ".kokoro/trampoline.sh" + "path": "build/src/v1/language_service_client.d.ts" }, { - "path": ".kokoro/lint.sh" + "path": "build/src/v1/index.js" }, { - "path": ".kokoro/publish.sh" + "path": "build/src/v1/language_service_client_config.d.ts" }, { - "path": ".kokoro/test.bat" + "path": "build/src/v1/language_service_client_config.json" }, { - "path": ".kokoro/common.cfg" + "path": "build/src/v1/index.js.map" }, { - "path": ".kokoro/system-test.sh" + "path": "build/src/v1/language_service_client.js" }, { - "path": ".kokoro/release/docs.cfg" + "path": "build/src/v1/index.d.ts" }, { - "path": ".kokoro/release/docs.sh" + "path": "protos/protos.d.ts" }, { - "path": ".kokoro/release/publish.cfg" + "path": "protos/protos.js" }, { - "path": ".kokoro/release/common.cfg" + "path": "protos/protos.json" }, { - "path": ".kokoro/continuous/node10/lint.cfg" + "path": "protos/google/cloud/language/v1beta2/language_service.proto" }, { - "path": ".kokoro/continuous/node10/docs.cfg" + "path": "protos/google/cloud/language/v1/language_service.proto" }, { - "path": ".kokoro/continuous/node10/test.cfg" + "path": ".git/shallow" }, { - "path": ".kokoro/continuous/node10/system-test.cfg" + "path": ".git/HEAD" }, { - "path": ".kokoro/continuous/node10/samples-test.cfg" + "path": ".git/config" }, { - "path": ".kokoro/continuous/node10/common.cfg" + "path": ".git/packed-refs" }, { - "path": ".kokoro/continuous/node8/test.cfg" + "path": ".git/index" }, { - "path": ".kokoro/continuous/node8/common.cfg" + "path": ".git/description" }, { - "path": ".kokoro/continuous/node12/test.cfg" + "path": ".git/objects/pack/pack-dcd9eba3ba8cc88b161725e192577c892e44296c.idx" }, { - "path": ".kokoro/continuous/node12/common.cfg" + "path": ".git/objects/pack/pack-dcd9eba3ba8cc88b161725e192577c892e44296c.pack" }, { - "path": ".kokoro/presubmit/node10/lint.cfg" + "path": ".git/logs/HEAD" }, { - "path": ".kokoro/presubmit/node10/docs.cfg" + "path": ".git/logs/refs/heads/master" }, { - "path": ".kokoro/presubmit/node10/test.cfg" + "path": ".git/logs/refs/heads/autosynth" }, { - "path": ".kokoro/presubmit/node10/system-test.cfg" + "path": ".git/logs/refs/remotes/origin/HEAD" }, { - "path": ".kokoro/presubmit/node10/samples-test.cfg" + "path": ".git/hooks/update.sample" }, { - "path": ".kokoro/presubmit/node10/common.cfg" + "path": ".git/hooks/pre-push.sample" }, { - "path": ".kokoro/presubmit/node8/test.cfg" + "path": ".git/hooks/pre-rebase.sample" }, { - "path": ".kokoro/presubmit/node8/common.cfg" + "path": ".git/hooks/pre-commit.sample" }, { - "path": ".kokoro/presubmit/node12/test.cfg" + "path": ".git/hooks/applypatch-msg.sample" }, { - "path": ".kokoro/presubmit/node12/common.cfg" + "path": ".git/hooks/post-update.sample" }, { - "path": ".kokoro/presubmit/windows/test.cfg" + "path": ".git/hooks/pre-applypatch.sample" }, { - "path": ".kokoro/presubmit/windows/common.cfg" + "path": ".git/hooks/prepare-commit-msg.sample" }, { - "path": "protos/protos.json" + "path": ".git/hooks/commit-msg.sample" }, { - "path": "protos/protos.js" + "path": ".git/hooks/pre-receive.sample" }, { - "path": "protos/protos.d.ts" + "path": ".git/hooks/fsmonitor-watchman.sample" }, { - "path": "protos/google/cloud/language/v1/language_service.proto" + "path": ".git/refs/heads/master" }, { - "path": "protos/google/cloud/language/v1beta2/language_service.proto" + "path": ".git/refs/heads/autosynth" }, { - "path": ".git/packed-refs" + "path": ".git/refs/remotes/origin/HEAD" }, { - "path": ".git/HEAD" + "path": ".git/info/exclude" }, { - "path": ".git/config" + "path": "src/index.ts" }, { - "path": ".git/description" + "path": "src/v1beta2/language_service_proto_list.json" }, { - "path": ".git/index" + "path": "src/v1beta2/index.ts" }, { - "path": ".git/shallow" + "path": "src/v1beta2/language_service_client_config.json" }, { - "path": ".git/logs/HEAD" + "path": "src/v1beta2/language_service_client.ts" }, { - "path": ".git/logs/refs/remotes/origin/HEAD" + "path": "src/v1/language_service_proto_list.json" }, { - "path": ".git/logs/refs/heads/autosynth" + "path": "src/v1/index.ts" }, { - "path": ".git/logs/refs/heads/master" + "path": "src/v1/language_service_client_config.json" }, { - "path": ".git/info/exclude" + "path": "src/v1/language_service_client.ts" }, { - "path": ".git/refs/remotes/origin/HEAD" + "path": "node_modules/builtin-status-codes/package.json" }, { - "path": ".git/refs/heads/autosynth" + "path": "node_modules/progress/package.json" }, { - "path": ".git/refs/heads/master" + "path": "node_modules/is-ci/package.json" }, { - "path": ".git/objects/pack/pack-bbd9f069cf43bd4f4e360bd3dbb73feccc7551b1.pack" + "path": "node_modules/isobject/package.json" }, { - "path": ".git/objects/pack/pack-bbd9f069cf43bd4f4e360bd3dbb73feccc7551b1.idx" + "path": "node_modules/mamacro/package.json" }, { - "path": ".git/hooks/fsmonitor-watchman.sample" + "path": "node_modules/define-property/package.json" }, { - "path": ".git/hooks/applypatch-msg.sample" + "path": "node_modules/define-property/node_modules/is-data-descriptor/package.json" }, { - "path": ".git/hooks/prepare-commit-msg.sample" + "path": "node_modules/define-property/node_modules/is-accessor-descriptor/package.json" }, { - "path": ".git/hooks/pre-push.sample" + "path": "node_modules/define-property/node_modules/is-descriptor/package.json" }, { - "path": ".git/hooks/pre-applypatch.sample" + "path": "node_modules/lru-cache/package.json" }, { - "path": ".git/hooks/update.sample" + "path": "node_modules/destroy/package.json" }, { - "path": ".git/hooks/post-update.sample" + "path": "node_modules/snapdragon-util/package.json" }, { - "path": ".git/hooks/pre-commit.sample" + "path": "node_modules/snapdragon-util/node_modules/is-buffer/package.json" }, { - "path": ".git/hooks/pre-receive.sample" + "path": "node_modules/snapdragon-util/node_modules/kind-of/package.json" }, { - "path": ".git/hooks/pre-rebase.sample" + "path": "node_modules/power-assert-context-formatter/package.json" }, { - "path": ".git/hooks/commit-msg.sample" + "path": "node_modules/fast-json-stable-stringify/package.json" }, { - "path": "test/gapic-language_service-v1.ts" + "path": "node_modules/nice-try/package.json" }, { - "path": "test/gapic-language_service-v1beta2.ts" + "path": "node_modules/which-module/package.json" }, { - "path": "test/.eslintrc.yml" + "path": "node_modules/asn1.js/package.json" }, { - "path": "test/mocha.opts" + "path": "node_modules/array-find/package.json" }, { - "path": "system-test/language_service_smoke_test.js" + "path": "node_modules/catharsis/package.json" }, { - "path": "system-test/.eslintrc.yml" + "path": "node_modules/is-promise/package.json" }, { - "path": "system-test/install.ts" + "path": "node_modules/v8-compile-cache/package.json" }, { - "path": "system-test/fixtures/sample/src/index.ts" + "path": "node_modules/create-hmac/package.json" }, { - "path": "system-test/fixtures/sample/src/index.js" + "path": "node_modules/tapable/package.json" }, { - "path": "node_modules/strip-bom/package.json" + "path": "node_modules/.bin/sha.js" }, { - "path": "node_modules/string-width/package.json" + "path": "node_modules/doctrine/package.json" }, { - "path": "node_modules/is-callable/package.json" + "path": "node_modules/callsites/package.json" }, { - "path": "node_modules/copy-descriptor/package.json" + "path": "node_modules/diff/package.json" }, { - "path": "node_modules/util-deprecate/package.json" + "path": "node_modules/hosted-git-info/package.json" }, { - "path": "node_modules/gts/package.json" + "path": "node_modules/color-name/package.json" }, { - "path": "node_modules/gts/node_modules/has-flag/package.json" + "path": "node_modules/path-dirname/package.json" }, { - "path": "node_modules/gts/node_modules/color-name/package.json" + "path": "node_modules/defer-to-connect/package.json" }, { - "path": "node_modules/gts/node_modules/color-convert/package.json" + "path": "node_modules/snapdragon/index.js" }, { - "path": "node_modules/gts/node_modules/supports-color/package.json" + "path": "node_modules/snapdragon/README.md" }, { - "path": "node_modules/gts/node_modules/ansi-styles/package.json" + "path": "node_modules/snapdragon/package.json" }, { - "path": "node_modules/gts/node_modules/chalk/package.json" + "path": "node_modules/snapdragon/LICENSE" }, { - "path": "node_modules/require-directory/package.json" + "path": "node_modules/snapdragon/lib/position.js" }, { - "path": "node_modules/update-notifier/package.json" + "path": "node_modules/snapdragon/lib/compiler.js" }, { - "path": "node_modules/esprima/package.json" + "path": "node_modules/snapdragon/lib/source-maps.js" }, { - "path": "node_modules/string_decoder/package.json" + "path": "node_modules/snapdragon/lib/utils.js" }, { - "path": "node_modules/mocha/package.json" + "path": "node_modules/snapdragon/lib/parser.js" }, { - "path": "node_modules/mocha/node_modules/locate-path/package.json" + "path": "node_modules/snapdragon/node_modules/define-property/package.json" }, { - "path": "node_modules/mocha/node_modules/find-up/package.json" + "path": "node_modules/snapdragon/node_modules/debug/package.json" }, { - "path": "node_modules/mocha/node_modules/diff/package.json" + "path": "node_modules/snapdragon/node_modules/ms/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + "path": "node_modules/snapdragon/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/mocha/node_modules/supports-color/package.json" + "path": "node_modules/snapdragon/node_modules/source-map/package.json" }, { - "path": "node_modules/mocha/node_modules/which/package.json" + "path": "node_modules/unpipe/package.json" }, { - "path": "node_modules/mocha/node_modules/path-exists/package.json" + "path": "node_modules/parse-asn1/package.json" }, { - "path": "node_modules/mocha/node_modules/p-locate/package.json" + "path": "node_modules/emoji-regex/package.json" }, { - "path": "node_modules/mocha/node_modules/glob/package.json" + "path": "node_modules/http-errors/package.json" }, { - "path": "node_modules/mocha/node_modules/ms/package.json" + "path": "node_modules/eventemitter3/package.json" }, { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + "path": "node_modules/esutils/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs/package.json" + "path": "node_modules/npm-run-path/package.json" }, { - "path": "node_modules/arr-diff/package.json" + "path": "node_modules/npm-run-path/node_modules/path-key/package.json" }, { - "path": "node_modules/is-arguments/package.json" + "path": "node_modules/he/package.json" }, { - "path": "node_modules/loader-utils/package.json" + "path": "node_modules/pack-n-play/package.json" }, { - "path": "node_modules/core-util-is/package.json" + "path": "node_modules/pack-n-play/node_modules/tmp/package.json" }, { - "path": "node_modules/wrap-ansi/package.json" + "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" }, { - "path": "node_modules/minimist-options/package.json" + "path": "node_modules/on-finished/package.json" }, { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" + "path": "node_modules/crypto-browserify/package.json" }, { - "path": "node_modules/underscore/package.json" + "path": "node_modules/linkinator/package.json" }, { - "path": "node_modules/keyv/package.json" + "path": "node_modules/linkinator/node_modules/update-notifier/package.json" }, { - "path": "node_modules/glob-parent/package.json" + "path": "node_modules/linkinator/node_modules/dot-prop/package.json" }, { - "path": "node_modules/domain-browser/package.json" + "path": "node_modules/linkinator/node_modules/redent/package.json" }, { - "path": "node_modules/minimalistic-crypto-utils/package.json" + "path": "node_modules/linkinator/node_modules/semver-diff/package.json" }, { - "path": "node_modules/walkdir/package.json" + "path": "node_modules/linkinator/node_modules/map-obj/package.json" }, { - "path": "node_modules/@protobufjs/codegen/package.json" + "path": "node_modules/linkinator/node_modules/meow/package.json" }, { - "path": "node_modules/@protobufjs/inquire/package.json" + "path": "node_modules/linkinator/node_modules/term-size/package.json" }, { - "path": "node_modules/@protobufjs/float/package.json" + "path": "node_modules/linkinator/node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/@protobufjs/base64/package.json" + "path": "node_modules/linkinator/node_modules/indent-string/package.json" }, { - "path": "node_modules/@protobufjs/aspromise/package.json" + "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/@protobufjs/eventemitter/package.json" + "path": "node_modules/linkinator/node_modules/is-obj/package.json" }, { - "path": "node_modules/@protobufjs/fetch/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" }, { - "path": "node_modules/@protobufjs/utf8/package.json" + "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" }, { - "path": "node_modules/@protobufjs/path/package.json" + "path": "node_modules/linkinator/node_modules/boxen/package.json" }, { - "path": "node_modules/@protobufjs/pool/package.json" + "path": "node_modules/linkinator/node_modules/chalk/package.json" }, { - "path": "node_modules/global-dirs/package.json" + "path": "node_modules/linkinator/node_modules/arrify/package.json" }, { - "path": "node_modules/has-flag/package.json" + "path": "node_modules/linkinator/node_modules/widest-line/package.json" }, { - "path": "node_modules/locate-path/package.json" + "path": "node_modules/linkinator/node_modules/global-dirs/package.json" }, { - "path": "node_modules/empower-assert/package.json" + "path": "node_modules/linkinator/node_modules/parse-json/package.json" }, { - "path": "node_modules/convert-source-map/package.json" + "path": "node_modules/linkinator/node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/terser/package.json" + "path": "node_modules/linkinator/node_modules/is-npm/package.json" }, { - "path": "node_modules/terser/node_modules/source-map-support/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg/package.json" }, { - "path": "node_modules/minimalistic-assert/package.json" + "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" }, { - "path": "node_modules/require-main-filename/package.json" + "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" }, { - "path": "node_modules/bluebird/package.json" + "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" }, { - "path": "node_modules/string.prototype.trimleft/package.json" + "path": "node_modules/linkinator/node_modules/semver/package.json" }, { - "path": "node_modules/range-parser/package.json" + "path": "node_modules/linkinator/node_modules/unique-string/package.json" }, { - "path": "node_modules/espower-loader/package.json" + "path": "node_modules/linkinator/node_modules/strip-indent/package.json" }, { - "path": "node_modules/null-loader/package.json" + "path": "node_modules/linkinator/node_modules/quick-lru/package.json" }, { - "path": "node_modules/defer-to-connect/package.json" + "path": "node_modules/linkinator/node_modules/minimist-options/package.json" }, { - "path": "node_modules/duplexer3/package.json" + "path": "node_modules/linkinator/node_modules/configstore/package.json" }, { - "path": "node_modules/indent-string/package.json" + "path": "node_modules/update-notifier/package.json" }, { - "path": "node_modules/detect-file/package.json" + "path": "node_modules/p-cancelable/package.json" }, { - "path": "node_modules/eslint/package.json" + "path": "node_modules/markdown-it/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + "path": "node_modules/setimmediate/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + "path": "node_modules/dot-prop/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + "path": "node_modules/require-main-filename/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + "path": "node_modules/fast-diff/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + "path": "node_modules/lodash.camelcase/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + "path": "node_modules/redent/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + "path": "node_modules/resolve/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + "path": "node_modules/globals/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "node_modules/p-is-promise/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "node_modules/range-parser/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + "path": "node_modules/string.prototype.trimright/package.json" }, { - "path": "node_modules/eslint/node_modules/path-key/package.json" + "path": "node_modules/chrome-trace-event/package.json" }, { - "path": "node_modules/eslint/node_modules/which/package.json" + "path": "node_modules/constants-browserify/package.json" }, { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + "path": "node_modules/inflight/package.json" }, { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" + "path": "node_modules/debug/package.json" }, { - "path": "node_modules/eslint/node_modules/debug/package.json" + "path": "node_modules/htmlparser2/package.json" }, { - "path": "node_modules/got/package.json" + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" }, { - "path": "node_modules/got/node_modules/get-stream/package.json" + "path": "node_modules/semver-diff/package.json" }, { - "path": "node_modules/estraverse/package.json" + "path": "node_modules/semver-diff/node_modules/semver/package.json" }, { - "path": "node_modules/prr/package.json" + "path": "node_modules/tsutils/package.json" }, { - "path": "node_modules/mdurl/package.json" + "path": "node_modules/multi-stage-sourcemap/package.json" }, { - "path": "node_modules/eslint-plugin-node/package.json" + "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" }, { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + "path": "node_modules/ms/package.json" }, { - "path": "node_modules/setimmediate/package.json" + "path": "node_modules/linkify-it/package.json" }, { - "path": "node_modules/diffie-hellman/package.json" + "path": "node_modules/through/package.json" }, { - "path": "node_modules/resolve-from/package.json" + "path": "node_modules/power-assert-renderer-file/package.json" }, { - "path": "node_modules/pascalcase/package.json" + "path": "node_modules/homedir-polyfill/package.json" }, { - "path": "node_modules/emojis-list/package.json" + "path": "node_modules/string-width/package.json" }, { - "path": "node_modules/https-browserify/package.json" + "path": "node_modules/html-escaper/package.json" }, { - "path": "node_modules/assign-symbols/package.json" + "path": "node_modules/type/package.json" }, { - "path": "node_modules/browserify-aes/package.json" + "path": "node_modules/move-concurrently/package.json" }, { - "path": "node_modules/type-name/package.json" + "path": "node_modules/move-concurrently/node_modules/rimraf/package.json" }, { - "path": "node_modules/os-locale/package.json" + "path": "node_modules/type-fest/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/README.md" + "path": "node_modules/intelli-espower-loader/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/package.json" + "path": "node_modules/parseurl/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md" + "path": "node_modules/buffer-from/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/index.js" + "path": "node_modules/google-p12-pem/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/LICENSE" + "path": "node_modules/get-caller-file/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/parse.js" + "path": "node_modules/klaw/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js" + "path": "node_modules/public-encrypt/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js" + "path": "node_modules/map-obj/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "node_modules/node-fetch/package.json" }, { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "node_modules/jsonexport/package.json" }, { - "path": "node_modules/os-locale/node_modules/get-stream/package.json" + "path": "node_modules/isexe/package.json" }, { - "path": "node_modules/os-locale/node_modules/semver/package.json" + "path": "node_modules/object.pick/package.json" }, { - "path": "node_modules/os-locale/node_modules/path-key/package.json" + "path": "node_modules/escallmatch/package.json" }, { - "path": "node_modules/os-locale/node_modules/which/package.json" + "path": "node_modules/escallmatch/node_modules/esprima/package.json" }, { - "path": "node_modules/os-locale/node_modules/shebang-regex/package.json" + "path": "node_modules/espower/package.json" }, { - "path": "node_modules/os-locale/node_modules/is-stream/package.json" + "path": "node_modules/espower/node_modules/source-map/package.json" }, { - "path": "node_modules/os-locale/node_modules/shebang-command/package.json" + "path": "node_modules/run-async/package.json" }, { - "path": "node_modules/os-locale/node_modules/execa/package.json" + "path": "node_modules/@webassemblyjs/ast/package.json" }, { - "path": "node_modules/lodash/package.json" + "path": "node_modules/@webassemblyjs/wast-printer/package.json" }, { - "path": "node_modules/strip-ansi/package.json" + "path": "node_modules/@webassemblyjs/helper-code-frame/package.json" }, { - "path": "node_modules/safe-buffer/package.json" + "path": "node_modules/@webassemblyjs/wasm-opt/package.json" }, { - "path": "node_modules/@szmarczak/http-timer/package.json" + "path": "node_modules/@webassemblyjs/helper-wasm-bytecode/package.json" }, { - "path": "node_modules/parent-module/package.json" + "path": "node_modules/@webassemblyjs/helper-wasm-section/package.json" }, { - "path": "node_modules/object-keys/package.json" + "path": "node_modules/@webassemblyjs/wasm-parser/package.json" }, { - "path": "node_modules/split-string/package.json" + "path": "node_modules/@webassemblyjs/helper-api-error/package.json" }, { - "path": "node_modules/base/package.json" + "path": "node_modules/@webassemblyjs/helper-buffer/package.json" }, { - "path": "node_modules/base/node_modules/is-data-descriptor/package.json" + "path": "node_modules/@webassemblyjs/utf8/package.json" }, { - "path": "node_modules/base/node_modules/is-descriptor/package.json" + "path": "node_modules/@webassemblyjs/wast-parser/package.json" }, { - "path": "node_modules/base/node_modules/is-accessor-descriptor/package.json" + "path": "node_modules/@webassemblyjs/wasm-gen/package.json" }, { - "path": "node_modules/base/node_modules/define-property/package.json" + "path": "node_modules/@webassemblyjs/leb128/package.json" }, { - "path": "node_modules/write/package.json" + "path": "node_modules/@webassemblyjs/helper-fsm/package.json" }, { - "path": "node_modules/configstore/package.json" + "path": "node_modules/@webassemblyjs/wasm-edit/package.json" }, { - "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" + "path": "node_modules/@webassemblyjs/ieee754/package.json" }, { - "path": "node_modules/configstore/node_modules/pify/package.json" + "path": "node_modules/@webassemblyjs/helper-module-context/package.json" }, { - "path": "node_modules/configstore/node_modules/make-dir/package.json" + "path": "node_modules/@webassemblyjs/floating-point-hex-parser/package.json" }, { - "path": "node_modules/v8-to-istanbul/package.json" + "path": "node_modules/validate-npm-package-license/package.json" }, { - "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + "path": "node_modules/file-entry-cache/package.json" }, { - "path": "node_modules/dot-prop/package.json" + "path": "node_modules/meow/package.json" }, { - "path": "node_modules/tsutils/package.json" + "path": "node_modules/meow/node_modules/camelcase/package.json" }, { - "path": "node_modules/npm-bundled/package.json" + "path": "node_modules/meow/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/import-fresh/package.json" + "path": "node_modules/cacache/package.json" }, { - "path": "node_modules/mute-stream/package.json" + "path": "node_modules/cacache/node_modules/rimraf/package.json" }, { - "path": "node_modules/browserify-des/package.json" + "path": "node_modules/concat-map/package.json" }, { - "path": "node_modules/wide-align/package.json" + "path": "node_modules/infer-owner/package.json" }, { - "path": "node_modules/wide-align/node_modules/string-width/package.json" + "path": "node_modules/term-size/package.json" }, { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + "path": "node_modules/xmlcreate/package.json" }, { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + "path": "node_modules/ansi-regex/package.json" }, { - "path": "node_modules/eslint-scope/package.json" + "path": "node_modules/yallist/package.json" }, { - "path": "node_modules/readdirp/package.json" + "path": "node_modules/class-utils/package.json" }, { - "path": "node_modules/readdirp/node_modules/braces/package.json" + "path": "node_modules/class-utils/node_modules/define-property/package.json" }, { - "path": "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json" + "path": "node_modules/json-bigint/package.json" }, { - "path": "node_modules/readdirp/node_modules/to-regex-range/package.json" + "path": "node_modules/hmac-drbg/package.json" }, { - "path": "node_modules/readdirp/node_modules/is-buffer/package.json" + "path": "node_modules/resolve-from/package.json" }, { - "path": "node_modules/readdirp/node_modules/fill-range/package.json" + "path": "node_modules/is-buffer/package.json" }, { - "path": "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json" + "path": "node_modules/cliui/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/README.md" + "path": "node_modules/cipher-base/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/package.json" + "path": "node_modules/toidentifier/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/CHANGELOG.md" + "path": "node_modules/balanced-match/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/index.js" + "path": "node_modules/marked/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/LICENSE" + "path": "node_modules/wrappy/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/parsers.js" + "path": "node_modules/jsdoc-region-tag/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/.DS_Store" + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/utils.js" + "path": "node_modules/glob-parent/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/compilers.js" + "path": "node_modules/collection-visit/package.json" }, { - "path": "node_modules/readdirp/node_modules/micromatch/lib/cache.js" + "path": "node_modules/xtend/package.json" }, { - "path": "node_modules/readdirp/node_modules/is-number/package.json" + "path": "node_modules/loader-utils/package.json" }, { - "path": "node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/assign-symbols/package.json" }, { - "path": "node_modules/cache-base/package.json" + "path": "node_modules/assert/package.json" }, { - "path": "node_modules/is-promise/package.json" + "path": "node_modules/assert/node_modules/util/package.json" }, { - "path": "node_modules/parallel-transform/package.json" + "path": "node_modules/assert/node_modules/inherits/package.json" }, { - "path": "node_modules/es6-map/package.json" + "path": "node_modules/is-arguments/package.json" }, { - "path": "node_modules/p-finally/package.json" + "path": "node_modules/bn.js/package.json" }, { - "path": "node_modules/snapdragon-node/package.json" + "path": "node_modules/set-blocking/package.json" }, { - "path": "node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" + "path": "node_modules/fill-range/package.json" }, { - "path": "node_modules/snapdragon-node/node_modules/is-descriptor/package.json" + "path": "node_modules/from2/package.json" }, { - "path": "node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" + "path": "node_modules/object-visit/package.json" }, { - "path": "node_modules/snapdragon-node/node_modules/define-property/package.json" + "path": "node_modules/istanbul-lib-report/package.json" }, { - "path": "node_modules/browserify-cipher/package.json" + "path": "node_modules/load-json-file/package.json" }, { - "path": "node_modules/es6-set/package.json" + "path": "node_modules/mississippi/package.json" }, { - "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" + "path": "node_modules/mississippi/node_modules/through2/package.json" }, { - "path": "node_modules/array-find/package.json" + "path": "node_modules/has-value/package.json" }, { - "path": "node_modules/arr-flatten/package.json" + "path": "node_modules/readdirp/package.json" }, { - "path": "node_modules/evp_bytestokey/package.json" + "path": "node_modules/readdirp/node_modules/is-buffer/package.json" }, { - "path": "node_modules/js2xmlparser/package.json" + "path": "node_modules/readdirp/node_modules/fill-range/package.json" }, { - "path": "node_modules/has-value/package.json" + "path": "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/istanbul-reports/package.json" + "path": "node_modules/readdirp/node_modules/is-number/package.json" }, { - "path": "node_modules/tty-browserify/package.json" + "path": "node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json" }, { - "path": "node_modules/get-value/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/index.js" }, { - "path": "node_modules/@webassemblyjs/wasm-gen/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/README.md" }, { - "path": "node_modules/@webassemblyjs/helper-fsm/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/package.json" }, { - "path": "node_modules/@webassemblyjs/floating-point-hex-parser/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/LICENSE" }, { - "path": "node_modules/@webassemblyjs/helper-code-frame/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/CHANGELOG.md" }, { - "path": "node_modules/@webassemblyjs/helper-wasm-section/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/parsers.js" }, { - "path": "node_modules/@webassemblyjs/ast/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/.DS_Store" }, { - "path": "node_modules/@webassemblyjs/wast-printer/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/compilers.js" }, { - "path": "node_modules/@webassemblyjs/helper-module-context/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/utils.js" }, { - "path": "node_modules/@webassemblyjs/wasm-edit/package.json" + "path": "node_modules/readdirp/node_modules/micromatch/lib/cache.js" }, { - "path": "node_modules/@webassemblyjs/leb128/package.json" + "path": "node_modules/readdirp/node_modules/braces/package.json" }, { - "path": "node_modules/@webassemblyjs/wast-parser/package.json" + "path": "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/@webassemblyjs/ieee754/package.json" + "path": "node_modules/readdirp/node_modules/to-regex-range/package.json" }, { - "path": "node_modules/@webassemblyjs/wasm-opt/package.json" + "path": "node_modules/is-number/package.json" }, { - "path": "node_modules/@webassemblyjs/utf8/package.json" + "path": "node_modules/ansi-align/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-buffer/package.json" + "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-wasm-bytecode/package.json" + "path": "node_modules/ansi-align/node_modules/string-width/package.json" }, { - "path": "node_modules/@webassemblyjs/wasm-parser/package.json" + "path": "node_modules/ansi-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/@webassemblyjs/helper-api-error/package.json" + "path": "node_modules/ansi-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/indexof/package.json" + "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/is-data-descriptor/package.json" + "path": "node_modules/atob/package.json" }, { - "path": "node_modules/is-data-descriptor/node_modules/is-buffer/package.json" + "path": "node_modules/duplexer3/package.json" }, { - "path": "node_modules/is-data-descriptor/node_modules/kind-of/package.json" + "path": "node_modules/esprima/package.json" }, { - "path": "node_modules/progress/package.json" + "path": "node_modules/is-stream-ended/package.json" }, { - "path": "node_modules/registry-url/package.json" + "path": "node_modules/minimatch/package.json" }, { - "path": "node_modules/google-gax/package.json" + "path": "node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/class-utils/package.json" + "path": "node_modules/growl/package.json" }, { - "path": "node_modules/class-utils/node_modules/define-property/package.json" + "path": "node_modules/string.prototype.trimleft/package.json" }, { - "path": "node_modules/mimic-response/package.json" + "path": "node_modules/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/figures/package.json" + "path": "node_modules/global-prefix/package.json" }, { - "path": "node_modules/eslint-config-prettier/package.json" + "path": "node_modules/global-prefix/node_modules/which/package.json" }, { - "path": "node_modules/argparse/package.json" + "path": "node_modules/normalize-package-data/package.json" }, { - "path": "node_modules/type/package.json" + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" }, { - "path": "node_modules/domhandler/package.json" + "path": "node_modules/fast-text-encoding/package.json" }, { - "path": "node_modules/error-ex/package.json" + "path": "node_modules/tar/package.json" }, { - "path": "node_modules/to-object-path/package.json" + "path": "node_modules/tar/node_modules/yallist/package.json" }, { - "path": "node_modules/to-object-path/node_modules/is-buffer/package.json" + "path": "node_modules/cyclist/package.json" }, { - "path": "node_modules/to-object-path/node_modules/kind-of/package.json" + "path": "node_modules/server-destroy/package.json" }, { - "path": "node_modules/errno/package.json" + "path": "node_modules/remove-trailing-separator/package.json" }, { - "path": "node_modules/ansi-colors/package.json" + "path": "node_modules/prelude-ls/package.json" }, { - "path": "node_modules/safer-buffer/package.json" + "path": "node_modules/d/package.json" }, { - "path": "node_modules/object.pick/package.json" + "path": "node_modules/protobufjs/package.json" }, { - "path": "node_modules/type-fest/package.json" + "path": "node_modules/protobufjs/cli/package-lock.json" }, { - "path": "node_modules/posix-character-classes/package.json" + "path": "node_modules/protobufjs/cli/package.json" }, { - "path": "node_modules/strip-indent/package.json" + "path": "node_modules/protobufjs/cli/node_modules/uglify-js/package.json" }, { - "path": "node_modules/boxen/package.json" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/boxen/node_modules/type-fest/package.json" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" }, { - "path": "node_modules/flat-cache/package.json" + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" }, { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" }, { - "path": "node_modules/process/package.json" + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" }, { - "path": "node_modules/querystring-es3/package.json" + "path": "node_modules/protobufjs/cli/node_modules/commander/package.json" }, { - "path": "node_modules/ripemd160/package.json" + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" }, { - "path": "node_modules/findup-sync/package.json" + "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" }, { - "path": "node_modules/findup-sync/node_modules/braces/package.json" + "path": "node_modules/protobufjs/node_modules/@types/node/package.json" }, { - "path": "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow/package.json" + "path": "node_modules/domhandler/package.json" }, { - "path": "node_modules/findup-sync/node_modules/to-regex-range/package.json" + "path": "node_modules/pkg-dir/package.json" }, { - "path": "node_modules/findup-sync/node_modules/is-buffer/package.json" + "path": "node_modules/pkg-dir/node_modules/p-locate/package.json" }, { - "path": "node_modules/findup-sync/node_modules/fill-range/package.json" + "path": "node_modules/pkg-dir/node_modules/locate-path/package.json" }, { - "path": "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow/package.json" + "path": "node_modules/pkg-dir/node_modules/find-up/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/README.md" + "path": "node_modules/pkg-dir/node_modules/path-exists/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/package.json" + "path": "node_modules/ansi-escapes/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/CHANGELOG.md" + "path": "node_modules/power-assert-renderer-base/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/index.js" + "path": "node_modules/boolbase/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/LICENSE" + "path": "node_modules/aproba/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/parsers.js" + "path": "node_modules/fragment-cache/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/.DS_Store" + "path": "node_modules/indent-string/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/utils.js" + "path": "node_modules/lodash/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/compilers.js" + "path": "node_modules/taffydb/package.json" }, { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/cache.js" + "path": "node_modules/extend/package.json" }, { - "path": "node_modules/findup-sync/node_modules/is-number/package.json" + "path": "node_modules/is-yarn-global/package.json" }, { - "path": "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/dom-serializer/package.json" }, { - "path": "node_modules/has-symbols/package.json" + "path": "node_modules/end-of-stream/package.json" }, { - "path": "node_modules/gcp-metadata/package.json" + "path": "node_modules/log-symbols/package.json" }, { - "path": "node_modules/ansi-align/package.json" + "path": "node_modules/is-callable/package.json" }, { - "path": "node_modules/find-up/package.json" + "path": "node_modules/es5-ext/package.json" }, { - "path": "node_modules/log-symbols/package.json" + "path": "node_modules/https-browserify/package.json" }, { - "path": "node_modules/merge-estraverse-visitors/package.json" + "path": "node_modules/stringifier/package.json" }, { - "path": "node_modules/is-extglob/package.json" + "path": "node_modules/source-list-map/package.json" }, { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + "path": "node_modules/vm-browserify/package.json" }, { - "path": "node_modules/prettier/package.json" + "path": "node_modules/es6-weak-map/package.json" }, { - "path": "node_modules/jsonexport/package.json" + "path": "node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/watchpack/package.json" + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" }, { - "path": "node_modules/.bin/sha.js" + "path": "node_modules/browserify-zlib/package.json" }, { - "path": "node_modules/safe-regex/package.json" + "path": "node_modules/pascalcase/package.json" }, { - "path": "node_modules/wrappy/package.json" + "path": "node_modules/decompress-response/package.json" }, { - "path": "node_modules/npm-run-path/package.json" + "path": "node_modules/set-value/package.json" }, { - "path": "node_modules/npm-run-path/node_modules/path-key/package.json" + "path": "node_modules/set-value/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/mississippi/package.json" + "path": "node_modules/js-yaml/package.json" }, { - "path": "node_modules/mississippi/node_modules/through2/package.json" + "path": "node_modules/cli-boxes/package.json" }, { - "path": "node_modules/promise-inflight/package.json" + "path": "node_modules/is-obj/package.json" }, { - "path": "node_modules/browserify-sign/package.json" + "path": "node_modules/is-typedarray/package.json" }, { - "path": "node_modules/map-obj/package.json" + "path": "node_modules/is-binary-path/package.json" }, { - "path": "node_modules/term-size/package.json" + "path": "node_modules/registry-auth-token/package.json" }, { - "path": "node_modules/pbkdf2/package.json" + "path": "node_modules/safe-regex/package.json" }, { - "path": "node_modules/stream-http/package.json" + "path": "node_modules/decode-uri-component/package.json" }, { - "path": "node_modules/destroy/package.json" + "path": "node_modules/read-pkg-up/package.json" }, { - "path": "node_modules/growl/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" }, { - "path": "node_modules/flush-write-stream/package.json" + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" }, { - "path": "node_modules/json-schema-traverse/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" }, { - "path": "node_modules/npm-packlist/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" }, { - "path": "node_modules/taffydb/package.json" + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" }, { - "path": "node_modules/cross-spawn/package.json" + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" }, { - "path": "node_modules/loud-rejection/package.json" + "path": "node_modules/buffer-equal-constant-time/package.json" }, { - "path": "node_modules/is-glob/package.json" + "path": "node_modules/@bcoe/v8-coverage/package.json" }, { - "path": "node_modules/get-stream/package.json" + "path": "node_modules/eslint-scope/package.json" }, { - "path": "node_modules/uglify-js/package.json" + "path": "node_modules/stream-shift/package.json" }, { - "path": "node_modules/minipass/package.json" + "path": "node_modules/union-value/package.json" }, { - "path": "node_modules/minipass/node_modules/yallist/package.json" + "path": "node_modules/invert-kv/package.json" }, { - "path": "node_modules/repeat-element/package.json" + "path": "node_modules/snapdragon-node/package.json" }, { - "path": "node_modules/optimist/package.json" + "path": "node_modules/snapdragon-node/node_modules/define-property/package.json" }, { - "path": "node_modules/empower/package.json" + "path": "node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" }, { - "path": "node_modules/cacheable-request/package.json" + "path": "node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" }, { - "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" + "path": "node_modules/snapdragon-node/node_modules/is-descriptor/package.json" }, { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + "path": "node_modules/is-extglob/package.json" }, { - "path": "node_modules/is-ci/package.json" + "path": "node_modules/typedarray-to-buffer/index.js" }, { - "path": "node_modules/server-destroy/package.json" + "path": "node_modules/typedarray-to-buffer/README.md" }, { - "path": "node_modules/copy-concurrently/package.json" + "path": "node_modules/typedarray-to-buffer/.airtap.yml" }, { - "path": "node_modules/copy-concurrently/node_modules/rimraf/package.json" + "path": "node_modules/typedarray-to-buffer/.travis.yml" }, { - "path": "node_modules/import-local/package.json" + "path": "node_modules/typedarray-to-buffer/package.json" }, { - "path": "node_modules/json-parse-better-errors/package.json" + "path": "node_modules/typedarray-to-buffer/LICENSE" }, { - "path": "node_modules/iferr/package.json" + "path": "node_modules/typedarray-to-buffer/test/basic.js" }, { - "path": "node_modules/core-js/package.json" + "path": "node_modules/restore-cursor/package.json" }, { - "path": "node_modules/set-blocking/package.json" + "path": "node_modules/pbkdf2/package.json" }, { - "path": "node_modules/p-defer/package.json" + "path": "node_modules/events/package.json" }, { - "path": "node_modules/create-hmac/package.json" + "path": "node_modules/map-cache/package.json" }, { - "path": "node_modules/next-tick/package.json" + "path": "node_modules/mimic-response/package.json" }, { - "path": "node_modules/catharsis/package.json" + "path": "node_modules/normalize-url/package.json" }, { - "path": "node_modules/rimraf/package.json" + "path": "node_modules/kind-of/package.json" }, { - "path": "node_modules/agent-base/package.json" + "path": "node_modules/fresh/package.json" }, { - "path": "node_modules/json-bigint/package.json" + "path": "node_modules/interpret/package.json" }, { - "path": "node_modules/spdx-exceptions/package.json" + "path": "node_modules/imurmurhash/package.json" }, { - "path": "node_modules/color-name/package.json" + "path": "node_modules/indexof/package.json" }, { - "path": "node_modules/through/package.json" + "path": "node_modules/arr-flatten/package.json" }, { - "path": "node_modules/braces/package.json" + "path": "node_modules/codecov/package.json" }, { - "path": "node_modules/jws/package.json" + "path": "node_modules/ajv/package.json" }, { - "path": "node_modules/inquirer/package.json" + "path": "node_modules/is-path-inside/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/package.json" + "path": "node_modules/timers-browserify/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + "path": "node_modules/import-lazy/package.json" }, { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + "path": "node_modules/json-schema-traverse/package.json" }, { - "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + "path": "node_modules/ncp/package.json" }, { - "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/rxjs/package.json" }, { - "path": "node_modules/urix/package.json" + "path": "node_modules/p-locate/package.json" }, { - "path": "node_modules/etag/package.json" + "path": "node_modules/figures/package.json" }, { - "path": "node_modules/power-assert-formatter/package.json" + "path": "node_modules/os-browserify/package.json" }, { - "path": "node_modules/to-regex-range/package.json" + "path": "node_modules/underscore/package.json" }, { - "path": "node_modules/text-table/package.json" + "path": "node_modules/finalhandler/package.json" }, { - "path": "node_modules/color-convert/package.json" + "path": "node_modules/finalhandler/node_modules/debug/package.json" }, { - "path": "node_modules/escope/package.json" + "path": "node_modules/finalhandler/node_modules/ms/package.json" }, { - "path": "node_modules/ansi-regex/package.json" + "path": "node_modules/ignore/package.json" }, { - "path": "node_modules/is-installed-globally/package.json" + "path": "node_modules/argv/package.json" }, { - "path": "node_modules/builtin-status-codes/package.json" + "path": "node_modules/path-is-absolute/package.json" }, { - "path": "node_modules/memory-fs/package.json" + "path": "node_modules/arr-diff/package.json" }, { - "path": "node_modules/redent/package.json" + "path": "node_modules/graceful-fs/package.json" }, { - "path": "node_modules/schema-utils/package.json" + "path": "node_modules/is-extendable/package.json" }, { - "path": "node_modules/is-buffer/package.json" + "path": "node_modules/currently-unhandled/package.json" }, { - "path": "node_modules/esrecurse/package.json" + "path": "node_modules/minizlib/package.json" }, { - "path": "node_modules/tslint/package.json" + "path": "node_modules/minizlib/node_modules/yallist/package.json" }, { - "path": "node_modules/tslint/node_modules/semver/package.json" + "path": "node_modules/source-map-resolve/package.json" }, { - "path": "node_modules/decamelize/package.json" + "path": "node_modules/google-gax/package.json" }, { - "path": "node_modules/parse-json/package.json" + "path": "node_modules/browserify-aes/package.json" }, { - "path": "node_modules/mime/package.json" + "path": "node_modules/commondir/package.json" }, { - "path": "node_modules/google-auth-library/package.json" + "path": "node_modules/onetime/package.json" }, { - "path": "node_modules/decode-uri-component/package.json" + "path": "node_modules/lcid/package.json" }, { - "path": "node_modules/randomfill/package.json" + "path": "node_modules/path-key/package.json" }, { - "path": "node_modules/ignore/package.json" + "path": "node_modules/core-util-is/package.json" }, { - "path": "node_modules/loader-runner/package.json" + "path": "node_modules/array-filter/package.json" }, { - "path": "node_modules/homedir-polyfill/package.json" + "path": "node_modules/prepend-http/package.json" }, { - "path": "node_modules/depd/package.json" + "path": "node_modules/console-browserify/package.json" }, { - "path": "node_modules/union-value/package.json" + "path": "node_modules/write/package.json" }, { - "path": "node_modules/camelcase-keys/package.json" + "path": "node_modules/duplexify/package.json" }, { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + "path": "node_modules/camelcase/package.json" }, { - "path": "node_modules/ansi-escapes/package.json" + "path": "node_modules/tty-browserify/package.json" }, { - "path": "node_modules/concat-stream/package.json" + "path": "node_modules/error-ex/package.json" }, { - "path": "node_modules/is-descriptor/package.json" + "path": "node_modules/empower-assert/package.json" }, { - "path": "node_modules/is-descriptor/node_modules/kind-of/package.json" + "path": "node_modules/micromatch/package.json" }, { - "path": "node_modules/expand-brackets/package.json" + "path": "node_modules/boxen/package.json" }, { - "path": "node_modules/expand-brackets/node_modules/extend-shallow/package.json" + "path": "node_modules/boxen/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/expand-brackets/node_modules/define-property/package.json" + "path": "node_modules/boxen/node_modules/string-width/package.json" }, { - "path": "node_modules/expand-brackets/node_modules/ms/package.json" + "path": "node_modules/boxen/node_modules/type-fest/package.json" }, { - "path": "node_modules/expand-brackets/node_modules/debug/package.json" + "path": "node_modules/boxen/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/decompress-response/package.json" + "path": "node_modules/boxen/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/end-of-stream/package.json" + "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/diff-match-patch/package.json" + "path": "node_modules/repeat-element/package.json" }, { - "path": "node_modules/big.js/package.json" + "path": "node_modules/querystring/package.json" }, { - "path": "node_modules/amdefine/package.json" + "path": "node_modules/node-environment-flags/package.json" }, { - "path": "node_modules/event-emitter/package.json" + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" }, { - "path": "node_modules/has-values/package.json" + "path": "node_modules/c8/package.json" }, { - "path": "node_modules/has-values/node_modules/is-buffer/package.json" + "path": "node_modules/gcp-metadata/package.json" }, { - "path": "node_modules/has-values/node_modules/kind-of/package.json" + "path": "node_modules/json-buffer/package.json" }, { - "path": "node_modules/has-values/node_modules/is-number/package.json" + "path": "node_modules/stream-each/package.json" }, { - "path": "node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/mkdirp/package.json" }, { - "path": "node_modules/is-windows/package.json" + "path": "node_modules/bluebird/package.json" }, { - "path": "node_modules/diff/package.json" + "path": "node_modules/null-loader/package.json" }, { - "path": "node_modules/tmp/package.json" + "path": "node_modules/big.js/package.json" }, { - "path": "node_modules/public-encrypt/package.json" + "path": "node_modules/shebang-command/package.json" }, { - "path": "node_modules/source-map/package.json" + "path": "node_modules/serve-static/package.json" }, { - "path": "node_modules/is-obj/package.json" + "path": "node_modules/object-copy/package.json" }, { - "path": "node_modules/asn1.js/package.json" + "path": "node_modules/object-copy/node_modules/define-property/package.json" }, { - "path": "node_modules/buffer/package.json" + "path": "node_modules/object-copy/node_modules/is-buffer/package.json" }, { - "path": "node_modules/yargs-parser/package.json" + "path": "node_modules/object-copy/node_modules/kind-of/package.json" }, { - "path": "node_modules/teeny-request/package.json" + "path": "node_modules/path-parse/package.json" }, { - "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" + "path": "node_modules/mime/package.json" }, { - "path": "node_modules/escape-string-regexp/package.json" + "path": "node_modules/terser/package.json" }, { - "path": "node_modules/es-abstract/package.json" + "path": "node_modules/terser/node_modules/source-map-support/package.json" }, { - "path": "node_modules/linkinator/package.json" + "path": "node_modules/terser/node_modules/source-map/package.json" }, { - "path": "node_modules/linkinator/node_modules/has-flag/package.json" + "path": "node_modules/emojis-list/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-name/package.json" + "path": "node_modules/yargs-unparser/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-convert/package.json" + "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" }, { - "path": "node_modules/linkinator/node_modules/supports-color/package.json" + "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" }, { - "path": "node_modules/linkinator/node_modules/chalk/package.json" + "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/import-lazy/package.json" + "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" }, { - "path": "node_modules/inflight/package.json" + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" }, { - "path": "node_modules/use/package.json" + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" }, { - "path": "node_modules/concat-map/package.json" + "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/browserify-rsa/package.json" + "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/object.assign/package.json" + "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/es6-symbol/package.json" + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" }, { - "path": "node_modules/hash.js/package.json" + "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/expand-tilde/package.json" + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" }, { - "path": "node_modules/semver/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" }, { - "path": "node_modules/jsdoc-fresh/package.json" + "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" }, { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/ts-loader/package.json" + "path": "node_modules/minimalistic-crypto-utils/package.json" }, { - "path": "node_modules/is-typedarray/package.json" + "path": "node_modules/lines-and-columns/package.json" }, { - "path": "node_modules/resolve-cwd/package.json" + "path": "node_modules/minimalistic-assert/package.json" }, { - "path": "node_modules/resolve-cwd/node_modules/resolve-from/package.json" + "path": "node_modules/is-url/package.json" }, { - "path": "node_modules/htmlparser2/package.json" + "path": "node_modules/is-data-descriptor/package.json" }, { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + "path": "node_modules/is-data-descriptor/node_modules/is-buffer/package.json" }, { - "path": "node_modules/cli-boxes/package.json" + "path": "node_modules/is-data-descriptor/node_modules/kind-of/package.json" }, { - "path": "node_modules/supports-color/package.json" + "path": "node_modules/chalk/package.json" }, { - "path": "node_modules/path-key/package.json" + "path": "node_modules/chalk/node_modules/color-name/package.json" }, { - "path": "node_modules/lru-cache/package.json" + "path": "node_modules/chalk/node_modules/has-flag/package.json" }, { - "path": "node_modules/rc/package.json" + "path": "node_modules/chalk/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/rc/node_modules/minimist/package.json" + "path": "node_modules/chalk/node_modules/supports-color/package.json" }, { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + "path": "node_modules/chalk/node_modules/color-convert/package.json" }, { - "path": "node_modules/yargs-unparser/package.json" + "path": "node_modules/locate-path/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + "path": "node_modules/spdx-expression-parse/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + "path": "node_modules/power-assert-util-string-width/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + "path": "node_modules/esquery/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + "path": "node_modules/to-readable-stream/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + "path": "node_modules/jsdoc-fresh/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" }, { - "path": "node_modules/worker-farm/package.json" + "path": "node_modules/espower-location-detector/package.json" }, { - "path": "node_modules/extend-shallow/package.json" + "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" }, { - "path": "node_modules/extend-shallow/node_modules/is-extendable/package.json" + "path": "node_modules/strip-ansi/package.json" }, { - "path": "node_modules/abort-controller/package.json" + "path": "node_modules/is-arrayish/package.json" }, { - "path": "node_modules/http-errors/package.json" + "path": "node_modules/prettier-linter-helpers/package.json" }, { - "path": "node_modules/marked/package.json" + "path": "node_modules/chardet/package.json" }, { - "path": "node_modules/is-plain-obj/package.json" + "path": "node_modules/amdefine/package.json" }, { - "path": "node_modules/minimatch/package.json" + "path": "node_modules/http-cache-semantics/package.json" }, { - "path": "node_modules/parse-asn1/package.json" + "path": "node_modules/concat-stream/package.json" }, { - "path": "node_modules/send/package.json" + "path": "node_modules/has-flag/package.json" }, { - "path": "node_modules/send/node_modules/mime/package.json" + "path": "node_modules/cheerio/package.json" }, { - "path": "node_modules/send/node_modules/ms/package.json" + "path": "node_modules/domelementtype/package.json" }, { - "path": "node_modules/send/node_modules/debug/package.json" + "path": "node_modules/npm-normalize-package-bin/package.json" }, { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + "path": "node_modules/diffie-hellman/package.json" }, { - "path": "node_modules/css-select/package.json" + "path": "node_modules/@szmarczak/http-timer/package.json" }, { - "path": "node_modules/uri-js/package.json" + "path": "node_modules/tmp/package.json" }, { - "path": "node_modules/google-p12-pem/package.json" + "path": "node_modules/entities/package.json" }, { - "path": "node_modules/is-accessor-descriptor/package.json" + "path": "node_modules/execa/package.json" }, { - "path": "node_modules/is-accessor-descriptor/node_modules/is-buffer/package.json" + "path": "node_modules/execa/node_modules/lru-cache/package.json" }, { - "path": "node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" + "path": "node_modules/execa/node_modules/yallist/package.json" }, { - "path": "node_modules/component-emitter/package.json" + "path": "node_modules/execa/node_modules/shebang-command/package.json" }, { - "path": "node_modules/hmac-drbg/package.json" + "path": "node_modules/execa/node_modules/is-stream/package.json" }, { - "path": "node_modules/npm-normalize-package-bin/package.json" + "path": "node_modules/execa/node_modules/which/package.json" }, { - "path": "node_modules/spdx-license-ids/package.json" + "path": "node_modules/execa/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/yallist/package.json" + "path": "node_modules/execa/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/setprototypeof/package.json" + "path": "node_modules/is-accessor-descriptor/package.json" }, { - "path": "node_modules/hosted-git-info/package.json" + "path": "node_modules/is-accessor-descriptor/node_modules/is-buffer/package.json" }, { - "path": "node_modules/argv/package.json" + "path": "node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" }, { - "path": "node_modules/package-json/package.json" + "path": "node_modules/strip-bom/package.json" }, { - "path": "node_modules/from2/package.json" + "path": "node_modules/argparse/package.json" }, { - "path": "node_modules/elliptic/package.json" + "path": "node_modules/has/package.json" }, { - "path": "node_modules/write-file-atomic/package.json" + "path": "node_modules/ee-first/package.json" }, { - "path": "node_modules/array-unique/package.json" + "path": "node_modules/serialize-javascript/package.json" }, { - "path": "node_modules/external-editor/package.json" + "path": "node_modules/sha.js/sha512.js" }, { - "path": "node_modules/@sindresorhus/is/package.json" + "path": "node_modules/sha.js/bin.js" }, { - "path": "node_modules/lodash.camelcase/package.json" + "path": "node_modules/sha.js/index.js" }, { - "path": "node_modules/path-dirname/package.json" + "path": "node_modules/sha.js/README.md" }, { - "path": "node_modules/arrify/package.json" + "path": "node_modules/sha.js/sha.js" }, { - "path": "node_modules/ansi-styles/package.json" + "path": "node_modules/sha.js/sha256.js" }, { - "path": "node_modules/parseurl/package.json" + "path": "node_modules/sha.js/hash.js" }, { - "path": "node_modules/boolbase/package.json" + "path": "node_modules/sha.js/.travis.yml" }, { - "path": "node_modules/cliui/package.json" + "path": "node_modules/sha.js/package.json" }, { - "path": "node_modules/balanced-match/package.json" + "path": "node_modules/sha.js/sha384.js" }, { - "path": "node_modules/acorn/package.json" + "path": "node_modules/sha.js/sha1.js" }, { - "path": "node_modules/stream-browserify/package.json" + "path": "node_modules/sha.js/LICENSE" }, { - "path": "node_modules/load-json-file/package.json" + "path": "node_modules/sha.js/sha224.js" }, { - "path": "node_modules/load-json-file/node_modules/pify/package.json" + "path": "node_modules/sha.js/test/test.js" }, { - "path": "node_modules/builtin-modules/package.json" + "path": "node_modules/sha.js/test/hash.js" }, { - "path": "node_modules/chokidar/package.json" + "path": "node_modules/sha.js/test/vectors.js" }, { - "path": "node_modules/chokidar/node_modules/glob-parent/package.json" + "path": "node_modules/object-inspect/package.json" }, { - "path": "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob/package.json" + "path": "node_modules/deep-equal/package.json" }, { - "path": "node_modules/chokidar/node_modules/braces/package.json" + "path": "node_modules/create-hash/package.json" }, { - "path": "node_modules/chokidar/node_modules/to-regex-range/package.json" + "path": "node_modules/table/package.json" }, { - "path": "node_modules/chokidar/node_modules/is-buffer/package.json" + "path": "node_modules/table/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/chokidar/node_modules/extend-shallow/package.json" + "path": "node_modules/table/node_modules/string-width/package.json" }, { - "path": "node_modules/chokidar/node_modules/kind-of/package.json" + "path": "node_modules/table/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/chokidar/node_modules/fill-range/package.json" + "path": "node_modules/table/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/chokidar/node_modules/is-number/package.json" + "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/atob/package.json" + "path": "node_modules/spdx-correct/package.json" }, { - "path": "node_modules/mamacro/package.json" + "path": "node_modules/get-stream/package.json" }, { - "path": "node_modules/snapdragon/README.md" + "path": "node_modules/expand-tilde/package.json" }, { - "path": "node_modules/snapdragon/package.json" + "path": "node_modules/chownr/package.json" }, { - "path": "node_modules/snapdragon/index.js" + "path": "node_modules/power-assert/package.json" }, { - "path": "node_modules/snapdragon/LICENSE" + "path": "node_modules/expand-brackets/package.json" }, { - "path": "node_modules/snapdragon/lib/compiler.js" + "path": "node_modules/expand-brackets/node_modules/define-property/package.json" }, { - "path": "node_modules/snapdragon/lib/position.js" + "path": "node_modules/expand-brackets/node_modules/debug/package.json" }, { - "path": "node_modules/snapdragon/lib/parser.js" + "path": "node_modules/expand-brackets/node_modules/ms/package.json" }, { - "path": "node_modules/snapdragon/lib/source-maps.js" + "path": "node_modules/expand-brackets/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/snapdragon/lib/utils.js" + "path": "node_modules/statuses/package.json" }, { - "path": "node_modules/snapdragon/node_modules/source-map/package.json" + "path": "node_modules/browserify-rsa/package.json" }, { - "path": "node_modules/snapdragon/node_modules/extend-shallow/package.json" + "path": "node_modules/@istanbuljs/schema/package.json" }, { - "path": "node_modules/snapdragon/node_modules/define-property/package.json" + "path": "node_modules/es6-set/package.json" }, { - "path": "node_modules/snapdragon/node_modules/ms/package.json" + "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" }, { - "path": "node_modules/snapdragon/node_modules/debug/package.json" + "path": "node_modules/parse-passwd/package.json" }, { - "path": "node_modules/widest-line/package.json" + "path": "node_modules/istanbul-reports/package.json" }, { - "path": "node_modules/widest-line/node_modules/string-width/package.json" + "path": "node_modules/browserify-sign/package.json" }, { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + "path": "node_modules/enhanced-resolve/package.json" }, { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + "path": "node_modules/@grpc/grpc-js/package.json" }, { - "path": "node_modules/which/package.json" + "path": "node_modules/@grpc/grpc-js/node_modules/semver/package.json" }, { - "path": "node_modules/@bcoe/v8-coverage/package.json" + "path": "node_modules/@grpc/proto-loader/package.json" }, { - "path": "node_modules/assert/package.json" + "path": "node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/assert/node_modules/inherits/package.json" + "path": "node_modules/etag/package.json" }, { - "path": "node_modules/assert/node_modules/util/package.json" + "path": "node_modules/y18n/package.json" }, { - "path": "node_modules/prettier-linter-helpers/package.json" + "path": "node_modules/diff-match-patch/package.json" }, { - "path": "node_modules/object-inspect/package.json" + "path": "node_modules/es6-iterator/package.json" }, { - "path": "node_modules/retry-request/package.json" + "path": "node_modules/eslint-plugin-node/package.json" }, { - "path": "node_modules/retry-request/node_modules/debug/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" }, { - "path": "node_modules/is-arrayish/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/semver/package.json" }, { - "path": "node_modules/shebang-regex/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" }, { - "path": "node_modules/clone-response/package.json" + "path": "node_modules/natural-compare/package.json" }, { - "path": "node_modules/ssri/package.json" + "path": "node_modules/uuid/package.json" }, { - "path": "node_modules/deep-is/package.json" + "path": "node_modules/event-target-shim/package.json" }, { - "path": "node_modules/@xtuc/ieee754/package.json" + "path": "node_modules/url/package.json" }, { - "path": "node_modules/@xtuc/long/package.json" + "path": "node_modules/url/node_modules/punycode/package.json" }, { - "path": "node_modules/regexpp/package.json" + "path": "node_modules/pako/package.json" }, { - "path": "node_modules/sha.js/README.md" + "path": "node_modules/arrify/package.json" }, { - "path": "node_modules/sha.js/package.json" + "path": "node_modules/widest-line/package.json" }, { - "path": "node_modules/sha.js/hash.js" + "path": "node_modules/widest-line/node_modules/string-width/package.json" }, { - "path": "node_modules/sha.js/.travis.yml" + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/sha.js/sha224.js" + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/sha.js/sha512.js" + "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/sha.js/bin.js" + "path": "node_modules/ignore-walk/package.json" }, { - "path": "node_modules/sha.js/sha.js" + "path": "node_modules/errno/package.json" }, { - "path": "node_modules/sha.js/index.js" + "path": "node_modules/util-deprecate/package.json" }, { - "path": "node_modules/sha.js/sha384.js" + "path": "node_modules/function-bind/package.json" }, { - "path": "node_modules/sha.js/sha1.js" + "path": "node_modules/object-is/package.json" }, { - "path": "node_modules/sha.js/sha256.js" + "path": "node_modules/@types/color-name/package.json" }, { - "path": "node_modules/sha.js/LICENSE" + "path": "node_modules/@types/node/package.json" }, { - "path": "node_modules/sha.js/test/vectors.js" + "path": "node_modules/@types/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/sha.js/test/test.js" + "path": "node_modules/@types/normalize-package-data/package.json" }, { - "path": "node_modules/sha.js/test/hash.js" + "path": "node_modules/@types/is-windows/package.json" }, { - "path": "node_modules/node-forge/package.json" + "path": "node_modules/@types/mocha/package.json" }, { - "path": "node_modules/pako/package.json" + "path": "node_modules/@types/minimist/package.json" }, { - "path": "node_modules/power-assert/package.json" + "path": "node_modules/@types/fs-extra/package.json" }, { - "path": "node_modules/path-is-absolute/package.json" + "path": "node_modules/@types/fs-extra/node_modules/@types/node/package.json" }, { - "path": "node_modules/ignore-walk/package.json" + "path": "node_modules/@types/long/package.json" }, { - "path": "node_modules/finalhandler/package.json" + "path": "node_modules/is-windows/package.json" }, { - "path": "node_modules/finalhandler/node_modules/ms/package.json" + "path": "node_modules/levn/package.json" }, { - "path": "node_modules/finalhandler/node_modules/debug/package.json" + "path": "node_modules/pseudomap/package.json" }, { - "path": "node_modules/source-map-support/package.json" + "path": "node_modules/global-dirs/package.json" }, { - "path": "node_modules/source-map-support/node_modules/source-map/package.json" + "path": "node_modules/picomatch/package.json" }, { - "path": "node_modules/buffer-equal-constant-time/package.json" + "path": "node_modules/power-assert-renderer-diagram/package.json" }, { - "path": "node_modules/source-map-resolve/package.json" + "path": "node_modules/webpack-cli/package.json" }, { - "path": "node_modules/path-parse/package.json" + "path": "node_modules/webpack-cli/node_modules/v8-compile-cache/package.json" }, { - "path": "node_modules/binary-extensions/package.json" + "path": "node_modules/webpack-cli/node_modules/color-name/package.json" }, { - "path": "node_modules/decamelize-keys/package.json" + "path": "node_modules/webpack-cli/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + "path": "node_modules/webpack-cli/node_modules/string-width/package.json" }, { - "path": "node_modules/os-tmpdir/package.json" + "path": "node_modules/webpack-cli/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/kind-of/package.json" + "path": "node_modules/webpack-cli/node_modules/cliui/package.json" }, { - "path": "node_modules/power-assert-util-string-width/package.json" + "path": "node_modules/webpack-cli/node_modules/p-locate/package.json" }, { - "path": "node_modules/ajv-keywords/package.json" + "path": "node_modules/webpack-cli/node_modules/path-key/package.json" }, { - "path": "node_modules/url-parse-lax/package.json" + "path": "node_modules/webpack-cli/node_modules/shebang-command/package.json" }, { - "path": "node_modules/linkify-it/package.json" + "path": "node_modules/webpack-cli/node_modules/locate-path/package.json" }, { - "path": "node_modules/url/package.json" + "path": "node_modules/webpack-cli/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/url/node_modules/punycode/package.json" + "path": "node_modules/webpack-cli/node_modules/has-flag/package.json" }, { - "path": "node_modules/async-each/package.json" + "path": "node_modules/webpack-cli/node_modules/enhanced-resolve/package.json" }, { - "path": "node_modules/minimist/package.json" + "path": "node_modules/webpack-cli/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/buffer-xor/package.json" + "path": "node_modules/webpack-cli/node_modules/which/package.json" }, { - "path": "node_modules/fresh/package.json" + "path": "node_modules/webpack-cli/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/power-assert-context-formatter/package.json" + "path": "node_modules/webpack-cli/node_modules/semver/package.json" }, { - "path": "node_modules/is-stream/package.json" + "path": "node_modules/webpack-cli/node_modules/supports-color/package.json" }, { - "path": "node_modules/call-matcher/package.json" + "path": "node_modules/webpack-cli/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/is-stream-ended/package.json" + "path": "node_modules/webpack-cli/node_modules/find-up/package.json" }, { - "path": "node_modules/slice-ansi/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/index.js" }, { - "path": "node_modules/onetime/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/README.md" }, { - "path": "node_modules/spdx-correct/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/fast-deep-equal/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/LICENSE" }, { - "path": "node_modules/readable-stream/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/CHANGELOG.md" }, { - "path": "node_modules/xdg-basedir/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/parse.js" }, { - "path": "node_modules/v8-compile-cache/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/enoent.js" }, { - "path": "node_modules/callsites/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/escape.js" }, { - "path": "node_modules/power-assert-renderer-assertion/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/resolveCommand.js" }, { - "path": "node_modules/pify/package.json" + "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/readShebang.js" }, { - "path": "node_modules/source-map-url/package.json" + "path": "node_modules/webpack-cli/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/snapdragon-util/package.json" + "path": "node_modules/webpack-cli/node_modules/path-exists/package.json" }, { - "path": "node_modules/snapdragon-util/node_modules/is-buffer/package.json" + "path": "node_modules/webpack-cli/node_modules/yargs/package.json" }, { - "path": "node_modules/snapdragon-util/node_modules/kind-of/package.json" + "path": "node_modules/webpack-cli/node_modules/color-convert/package.json" }, { - "path": "node_modules/stream-shift/package.json" + "path": "node_modules/webpack-cli/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/crypto-random-string/package.json" + "path": "node_modules/webpack-cli/node_modules/memory-fs/package.json" }, { - "path": "node_modules/escodegen/package.json" + "path": "node_modules/is-stream/package.json" }, { - "path": "node_modules/escodegen/node_modules/esprima/package.json" + "path": "node_modules/component-emitter/package.json" }, { - "path": "node_modules/entities/package.json" + "path": "node_modules/es6-symbol/package.json" }, { - "path": "node_modules/object.getownpropertydescriptors/package.json" + "path": "node_modules/parse-json/package.json" }, { - "path": "node_modules/power-assert-renderer-file/package.json" + "path": "node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/events/package.json" + "path": "node_modules/spdx-license-ids/package.json" }, { - "path": "node_modules/define-property/package.json" + "path": "node_modules/extend-shallow/package.json" }, { - "path": "node_modules/define-property/node_modules/is-data-descriptor/package.json" + "path": "node_modules/extend-shallow/node_modules/is-extendable/package.json" }, { - "path": "node_modules/define-property/node_modules/is-descriptor/package.json" + "path": "node_modules/browserify-cipher/package.json" }, { - "path": "node_modules/define-property/node_modules/is-accessor-descriptor/package.json" + "path": "node_modules/ssri/package.json" }, { - "path": "node_modules/unpipe/package.json" + "path": "node_modules/google-auth-library/package.json" }, { - "path": "node_modules/array-filter/package.json" + "path": "node_modules/webpack/package.json" }, { - "path": "node_modules/furi/package.json" + "path": "node_modules/webpack/node_modules/is-buffer/package.json" }, { - "path": "node_modules/pack-n-play/package.json" + "path": "node_modules/webpack/node_modules/fill-range/package.json" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/package.json" + "path": "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" + "path": "node_modules/webpack/node_modules/is-number/package.json" }, { - "path": "node_modules/miller-rabin/package.json" + "path": "node_modules/webpack/node_modules/is-number/node_modules/kind-of/package.json" }, { - "path": "node_modules/strip-eof/package.json" + "path": "node_modules/webpack/node_modules/eslint-scope/package.json" }, { - "path": "node_modules/map-cache/package.json" + "path": "node_modules/webpack/node_modules/micromatch/index.js" }, { - "path": "node_modules/is-path-inside/package.json" + "path": "node_modules/webpack/node_modules/micromatch/README.md" }, { - "path": "node_modules/ini/package.json" + "path": "node_modules/webpack/node_modules/micromatch/package.json" }, { - "path": "node_modules/currently-unhandled/package.json" + "path": "node_modules/webpack/node_modules/micromatch/LICENSE" }, { - "path": "node_modules/global-modules/package.json" + "path": "node_modules/webpack/node_modules/micromatch/CHANGELOG.md" }, { - "path": "node_modules/global-modules/node_modules/which/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/parsers.js" }, { - "path": "node_modules/global-modules/node_modules/global-prefix/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/.DS_Store" }, { - "path": "node_modules/invert-kv/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/compilers.js" }, { - "path": "node_modules/validate-npm-package-license/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/utils.js" }, { - "path": "node_modules/fill-range/package.json" + "path": "node_modules/webpack/node_modules/micromatch/lib/cache.js" }, { - "path": "node_modules/bignumber.js/package.json" + "path": "node_modules/webpack/node_modules/acorn/package.json" }, { - "path": "node_modules/is-yarn-global/package.json" + "path": "node_modules/webpack/node_modules/braces/package.json" }, { - "path": "node_modules/lodash.has/package.json" + "path": "node_modules/webpack/node_modules/braces/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/camelcase/package.json" + "path": "node_modules/webpack/node_modules/to-regex-range/package.json" }, { - "path": "node_modules/prelude-ls/package.json" + "path": "node_modules/webpack/node_modules/memory-fs/package.json" }, { - "path": "node_modules/codecov/package.json" + "path": "node_modules/split-string/package.json" }, { - "path": "node_modules/es6-promise/package.json" + "path": "node_modules/brace-expansion/package.json" }, { - "path": "node_modules/doctrine/package.json" + "path": "node_modules/posix-character-classes/package.json" }, { - "path": "node_modules/path-exists/package.json" + "path": "node_modules/builtin-modules/package.json" }, { - "path": "node_modules/deep-extend/package.json" + "path": "node_modules/static-extend/package.json" }, { - "path": "node_modules/os-browserify/package.json" + "path": "node_modules/static-extend/node_modules/define-property/package.json" }, { - "path": "node_modules/nth-check/package.json" + "path": "node_modules/process/package.json" }, { - "path": "node_modules/regex-not/package.json" + "path": "node_modules/tslint/package.json" }, { - "path": "node_modules/isarray/package.json" + "path": "node_modules/tslint/node_modules/semver/package.json" }, { - "path": "node_modules/es-to-primitive/package.json" + "path": "node_modules/type-name/package.json" }, { - "path": "node_modules/https-proxy-agent/package.json" + "path": "node_modules/define-properties/package.json" }, { - "path": "node_modules/to-regex/package.json" + "path": "node_modules/universal-deep-strict-equal/package.json" }, { - "path": "node_modules/eslint-plugin-es/package.json" + "path": "node_modules/jws/package.json" }, { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + "path": "node_modules/minipass/package.json" }, { - "path": "node_modules/path-type/package.json" + "path": "node_modules/minipass/node_modules/yallist/package.json" }, { - "path": "node_modules/path-type/node_modules/pify/package.json" + "path": "node_modules/nth-check/package.json" }, { - "path": "node_modules/fs-minipass/package.json" + "path": "node_modules/@xtuc/ieee754/package.json" }, { - "path": "node_modules/pumpify/package.json" + "path": "node_modules/@xtuc/long/package.json" }, { - "path": "node_modules/pumpify/node_modules/pump/package.json" + "path": "node_modules/p-defer/package.json" }, { - "path": "node_modules/fast-json-stable-stringify/package.json" + "path": "node_modules/empower/package.json" }, { - "path": "node_modules/p-locate/package.json" + "path": "node_modules/nanomatch/package.json" }, { - "path": "node_modules/stream-each/package.json" + "path": "node_modules/send/package.json" }, { - "path": "node_modules/enhanced-resolve/package.json" + "path": "node_modules/send/node_modules/debug/package.json" }, { - "path": "node_modules/intelli-espower-loader/package.json" + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" }, { - "path": "node_modules/node-fetch/package.json" + "path": "node_modules/send/node_modules/ms/package.json" }, { - "path": "node_modules/registry-auth-token/package.json" + "path": "node_modules/send/node_modules/mime/package.json" }, { - "path": "node_modules/repeat-string/package.json" + "path": "node_modules/require-directory/package.json" }, { - "path": "node_modules/terser-webpack-plugin/package.json" + "path": "node_modules/object.assign/package.json" }, { - "path": "node_modules/fragment-cache/package.json" + "path": "node_modules/is-npm/package.json" }, { - "path": "node_modules/esutils/package.json" + "path": "node_modules/fs-minipass/package.json" }, { - "path": "node_modules/run-queue/package.json" + "path": "node_modules/browserify-des/package.json" }, { - "path": "node_modules/which-module/package.json" + "path": "node_modules/min-indent/package.json" }, { - "path": "node_modules/function-bind/package.json" + "path": "node_modules/functional-red-black-tree/package.json" }, { - "path": "node_modules/lcid/package.json" + "path": "node_modules/read-pkg/package.json" }, { - "path": "node_modules/map-visit/package.json" + "path": "node_modules/fs-write-stream-atomic/package.json" }, { - "path": "node_modules/trim-newlines/package.json" + "path": "node_modules/registry-url/package.json" }, { - "path": "node_modules/event-target-shim/package.json" + "path": "node_modules/is-regex/package.json" }, { - "path": "node_modules/commondir/package.json" + "path": "node_modules/es-abstract/package.json" }, { - "path": "node_modules/unset-value/package.json" + "path": "node_modules/querystring-es3/package.json" }, { - "path": "node_modules/unset-value/node_modules/has-value/package.json" + "path": "node_modules/parent-module/package.json" }, { - "path": "node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" + "path": "node_modules/create-ecdh/package.json" + }, + { + "path": "node_modules/map-age-cleaner/package.json" + }, + { + "path": "node_modules/hash.js/package.json" + }, + { + "path": "node_modules/signal-exit/package.json" + }, + { + "path": "node_modules/import-fresh/package.json" + }, + { + "path": "node_modules/hash-base/package.json" + }, + { + "path": "node_modules/keyv/package.json" + }, + { + "path": "node_modules/ret/package.json" + }, + { + "path": "node_modules/md5.js/package.json" + }, + { + "path": "node_modules/estraverse/package.json" + }, + { + "path": "node_modules/fast-deep-equal/package.json" + }, + { + "path": "node_modules/mute-stream/package.json" + }, + { + "path": "node_modules/power-assert-context-traversal/package.json" + }, + { + "path": "node_modules/rimraf/package.json" + }, + { + "path": "node_modules/is-installed-globally/package.json" + }, + { + "path": "node_modules/get-stdin/package.json" + }, + { + "path": "node_modules/make-dir/package.json" + }, + { + "path": "node_modules/make-dir/node_modules/semver/package.json" + }, + { + "path": "node_modules/es6-promise/package.json" + }, + { + "path": "node_modules/os-tmpdir/package.json" + }, + { + "path": "node_modules/run-queue/package.json" + }, + { + "path": "node_modules/anymatch/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/fill-range/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/fill-range/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/is-number/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/index.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/README.md" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/LICENSE" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/CHANGELOG.md" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/parsers.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/.DS_Store" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/compilers.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/utils.js" + }, + { + "path": "node_modules/anymatch/node_modules/micromatch/lib/cache.js" + }, + { + "path": "node_modules/anymatch/node_modules/braces/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/braces/node_modules/extend-shallow/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/to-regex-range/package.json" + }, + { + "path": "node_modules/anymatch/node_modules/normalize-path/package.json" + }, + { + "path": "node_modules/retry-request/package.json" + }, + { + "path": "node_modules/retry-request/node_modules/debug/package.json" + }, + { + "path": "node_modules/cli-cursor/package.json" + }, + { + "path": "node_modules/ext/package.json" + }, + { + "path": "node_modules/ext/node_modules/type/package.json" + }, + { + "path": "node_modules/is-symbol/package.json" + }, + { + "path": "node_modules/css-what/package.json" + }, + { + "path": "node_modules/punycode/package.json" + }, + { + "path": "node_modules/os-locale/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/path-key/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/execa/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/which/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/semver/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/setprototypeof/package.json" + }, + { + "path": "node_modules/mixin-deep/package.json" + }, + { + "path": "node_modules/mixin-deep/node_modules/is-extendable/package.json" + }, + { + "path": "node_modules/word-wrap/package.json" + }, + { + "path": "node_modules/foreground-child/package.json" + }, + { + "path": "node_modules/has-values/package.json" + }, + { + "path": "node_modules/has-values/node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/has-values/node_modules/is-number/package.json" + }, + { + "path": "node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/has-values/node_modules/kind-of/package.json" + }, + { + "path": "node_modules/pumpify/package.json" + }, + { + "path": "node_modules/pumpify/node_modules/pump/package.json" + }, + { + "path": "node_modules/es6-map/package.json" + }, + { + "path": "node_modules/detect-file/package.json" + }, + { + "path": "node_modules/source-map-url/package.json" }, { - "path": "node_modules/unset-value/node_modules/has-values/package.json" + "path": "node_modules/call-signature/package.json" }, { - "path": "node_modules/parse-passwd/package.json" + "path": "node_modules/package-json/package.json" }, { - "path": "node_modules/on-finished/package.json" + "path": "node_modules/package-json/node_modules/semver/package.json" }, { - "path": "node_modules/y18n/package.json" + "path": "node_modules/css-select/package.json" }, { - "path": "node_modules/cacache/package.json" + "path": "node_modules/path-is-inside/package.json" }, { - "path": "node_modules/cacache/node_modules/rimraf/package.json" + "path": "node_modules/eslint-plugin-prettier/package.json" }, { - "path": "node_modules/quick-lru/package.json" + "path": "node_modules/p-finally/package.json" }, { - "path": "node_modules/js-yaml/package.json" + "path": "node_modules/inquirer/package.json" }, { - "path": "node_modules/flat/package.json" + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/normalize-package-data/package.json" + "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + "path": "node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/es6-iterator/package.json" + "path": "node_modules/binary-extensions/package.json" }, { - "path": "node_modules/remove-trailing-separator/package.json" + "path": "node_modules/glob/package.json" }, { - "path": "node_modules/typescript/package.json" + "path": "node_modules/mocha/package.json" }, { - "path": "node_modules/mkdirp/package.json" + "path": "node_modules/mocha/node_modules/diff/package.json" }, { - "path": "node_modules/mkdirp/node_modules/minimist/package.json" + "path": "node_modules/mocha/node_modules/color-name/package.json" }, { - "path": "node_modules/chrome-trace-event/package.json" + "path": "node_modules/mocha/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/console-browserify/package.json" + "path": "node_modules/mocha/node_modules/ms/package.json" }, { - "path": "node_modules/fast-text-encoding/package.json" + "path": "node_modules/mocha/node_modules/string-width/package.json" }, { - "path": "node_modules/acorn-es7-plugin/package.json" + "path": "node_modules/mocha/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/through2/package.json" + "path": "node_modules/mocha/node_modules/cliui/package.json" }, { - "path": "node_modules/eslint-visitor-keys/package.json" + "path": "node_modules/mocha/node_modules/p-locate/package.json" }, { - "path": "node_modules/glob/package.json" + "path": "node_modules/mocha/node_modules/locate-path/package.json" }, { - "path": "node_modules/inherits/package.json" + "path": "node_modules/mocha/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/object-copy/package.json" + "path": "node_modules/mocha/node_modules/has-flag/package.json" }, { - "path": "node_modules/object-copy/node_modules/is-buffer/package.json" + "path": "node_modules/mocha/node_modules/glob/package.json" }, { - "path": "node_modules/object-copy/node_modules/kind-of/package.json" + "path": "node_modules/mocha/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/object-copy/node_modules/define-property/package.json" + "path": "node_modules/mocha/node_modules/which/package.json" }, { - "path": "node_modules/string.prototype.trimright/package.json" + "path": "node_modules/mocha/node_modules/supports-color/package.json" }, { - "path": "node_modules/punycode/package.json" + "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/es5-ext/package.json" + "path": "node_modules/mocha/node_modules/find-up/package.json" }, { - "path": "node_modules/is-date-object/package.json" + "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/sprintf-js/package.json" + "path": "node_modules/mocha/node_modules/path-exists/package.json" }, { - "path": "node_modules/is-npm/package.json" + "path": "node_modules/mocha/node_modules/yargs/package.json" }, { - "path": "node_modules/has-yarn/package.json" + "path": "node_modules/mocha/node_modules/color-convert/package.json" }, { - "path": "node_modules/get-stdin/package.json" + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/global-prefix/package.json" + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/global-prefix/node_modules/which/package.json" + "path": "node_modules/loud-rejection/package.json" }, { - "path": "node_modules/extglob/package.json" + "path": "node_modules/event-emitter/package.json" }, { - "path": "node_modules/extglob/node_modules/is-data-descriptor/package.json" + "path": "node_modules/@protobufjs/codegen/package.json" }, { - "path": "node_modules/extglob/node_modules/is-descriptor/package.json" + "path": "node_modules/@protobufjs/base64/package.json" }, { - "path": "node_modules/extglob/node_modules/extend-shallow/package.json" + "path": "node_modules/@protobufjs/utf8/package.json" }, { - "path": "node_modules/extglob/node_modules/is-accessor-descriptor/package.json" + "path": "node_modules/@protobufjs/pool/package.json" }, { - "path": "node_modules/extglob/node_modules/define-property/package.json" + "path": "node_modules/@protobufjs/float/package.json" }, { - "path": "node_modules/ajv-errors/package.json" + "path": "node_modules/@protobufjs/fetch/package.json" }, { - "path": "node_modules/node-libs-browser/package.json" + "path": "node_modules/@protobufjs/path/package.json" }, { - "path": "node_modules/node-libs-browser/node_modules/punycode/package.json" + "path": "node_modules/@protobufjs/aspromise/package.json" }, { - "path": "node_modules/constants-browserify/package.json" + "path": "node_modules/@protobufjs/inquire/package.json" }, { - "path": "node_modules/shebang-command/package.json" + "path": "node_modules/@protobufjs/eventemitter/package.json" }, { - "path": "node_modules/empower-core/package.json" + "path": "node_modules/prr/package.json" }, { - "path": "node_modules/imurmurhash/package.json" + "path": "node_modules/node-forge/package.json" }, { - "path": "node_modules/globals/package.json" + "path": "node_modules/lodash.has/package.json" }, { - "path": "node_modules/create-ecdh/package.json" + "path": "node_modules/global-modules/package.json" }, { - "path": "node_modules/latest-version/package.json" + "path": "node_modules/global-modules/node_modules/global-prefix/package.json" }, { - "path": "node_modules/natural-compare/package.json" + "path": "node_modules/global-modules/node_modules/which/package.json" }, { - "path": "node_modules/commander/package.json" + "path": "node_modules/des.js/package.json" }, { - "path": "node_modules/timers-browserify/package.json" + "path": "node_modules/source-map-support/package.json" }, { - "path": "node_modules/path-is-inside/package.json" + "path": "node_modules/source-map-support/node_modules/source-map/package.json" }, { - "path": "node_modules/rxjs/package.json" + "path": "node_modules/schema-utils/package.json" }, { - "path": "node_modules/node-environment-flags/package.json" + "path": "node_modules/object-assign/package.json" }, { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + "path": "node_modules/has-symbols/package.json" }, { - "path": "node_modules/p-limit/package.json" + "path": "node_modules/find-cache-dir/package.json" }, { - "path": "node_modules/call-signature/package.json" + "path": "node_modules/find-cache-dir/node_modules/make-dir/package.json" }, { - "path": "node_modules/istanbul-lib-coverage/package.json" + "path": "node_modules/find-cache-dir/node_modules/pify/package.json" }, { - "path": "node_modules/neo-async/package.json" + "path": "node_modules/find-cache-dir/node_modules/semver/package.json" }, { - "path": "node_modules/foreground-child/package.json" + "path": "node_modules/unique-slug/package.json" }, { - "path": "node_modules/des.js/package.json" + "path": "node_modules/espurify/package.json" }, { - "path": "node_modules/he/package.json" + "path": "node_modules/lodash.at/package.json" }, { - "path": "node_modules/tar/package.json" + "path": "node_modules/ansi-styles/package.json" }, { - "path": "node_modules/tar/node_modules/yallist/package.json" + "path": "node_modules/merge-estraverse-visitors/package.json" }, { - "path": "node_modules/meow/package.json" + "path": "node_modules/for-in/package.json" }, { - "path": "node_modules/meow/node_modules/locate-path/package.json" + "path": "node_modules/to-object-path/package.json" }, { - "path": "node_modules/meow/node_modules/find-up/package.json" + "path": "node_modules/to-object-path/node_modules/is-buffer/package.json" }, { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" + "path": "node_modules/to-object-path/node_modules/kind-of/package.json" }, { - "path": "node_modules/meow/node_modules/camelcase/package.json" + "path": "node_modules/ansi-colors/package.json" }, { - "path": "node_modules/meow/node_modules/path-exists/package.json" + "path": "node_modules/brorand/package.json" }, { - "path": "node_modules/meow/node_modules/p-locate/package.json" + "path": "node_modules/findup-sync/package.json" }, { - "path": "node_modules/meow/node_modules/p-limit/package.json" + "path": "node_modules/findup-sync/node_modules/is-buffer/package.json" }, { - "path": "node_modules/meow/node_modules/p-try/package.json" + "path": "node_modules/findup-sync/node_modules/fill-range/package.json" }, { - "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + "path": "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/chownr/package.json" + "path": "node_modules/findup-sync/node_modules/is-number/package.json" }, { - "path": "node_modules/toidentifier/package.json" + "path": "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of/package.json" }, { - "path": "node_modules/execa/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/index.js" }, { - "path": "node_modules/execa/node_modules/cross-spawn/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/README.md" }, { - "path": "node_modules/execa/node_modules/lru-cache/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/package.json" }, { - "path": "node_modules/execa/node_modules/yallist/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/LICENSE" }, { - "path": "node_modules/execa/node_modules/which/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/CHANGELOG.md" }, { - "path": "node_modules/execa/node_modules/shebang-regex/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/parsers.js" }, { - "path": "node_modules/execa/node_modules/is-stream/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/.DS_Store" }, { - "path": "node_modules/execa/node_modules/shebang-command/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/compilers.js" }, { - "path": "node_modules/levn/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/utils.js" }, { - "path": "node_modules/unique-string/package.json" + "path": "node_modules/findup-sync/node_modules/micromatch/lib/cache.js" }, { - "path": "node_modules/gaxios/package.json" + "path": "node_modules/findup-sync/node_modules/braces/package.json" }, { - "path": "node_modules/create-hash/package.json" + "path": "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/figgy-pudding/package.json" + "path": "node_modules/findup-sync/node_modules/to-regex-range/package.json" }, { - "path": "node_modules/power-assert-renderer-base/package.json" + "path": "node_modules/p-try/package.json" }, { - "path": "node_modules/browser-stdout/package.json" + "path": "node_modules/escope/package.json" }, { - "path": "node_modules/regexp.prototype.flags/package.json" + "path": "node_modules/evp_bytestokey/package.json" }, { - "path": "node_modules/ieee754/package.json" + "path": "node_modules/json-parse-better-errors/package.json" }, { - "path": "node_modules/run-async/package.json" + "path": "node_modules/worker-farm/package.json" }, { - "path": "node_modules/cheerio/package.json" + "path": "node_modules/ieee754/package.json" }, { - "path": "node_modules/eslint-utils/package.json" + "path": "node_modules/chokidar/package.json" }, { - "path": "node_modules/prepend-http/package.json" + "path": "node_modules/chokidar/node_modules/is-buffer/package.json" }, { - "path": "node_modules/urlgrey/package.json" + "path": "node_modules/chokidar/node_modules/glob-parent/package.json" }, { - "path": "node_modules/define-properties/package.json" + "path": "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob/package.json" }, { - "path": "node_modules/p-timeout/package.json" + "path": "node_modules/chokidar/node_modules/fill-range/package.json" }, { - "path": "node_modules/cli-cursor/package.json" + "path": "node_modules/chokidar/node_modules/is-number/package.json" }, { - "path": "node_modules/unique-filename/package.json" + "path": "node_modules/chokidar/node_modules/kind-of/package.json" }, { - "path": "node_modules/pump/package.json" + "path": "node_modules/chokidar/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/stringifier/package.json" + "path": "node_modules/chokidar/node_modules/braces/package.json" }, { - "path": "node_modules/espower-location-detector/package.json" + "path": "node_modules/chokidar/node_modules/to-regex-range/package.json" }, { - "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" + "path": "node_modules/readable-stream/package.json" }, { - "path": "node_modules/escape-html/package.json" + "path": "node_modules/abort-controller/package.json" }, { - "path": "node_modules/http-cache-semantics/package.json" + "path": "node_modules/which/package.json" }, { - "path": "node_modules/to-readable-stream/package.json" + "path": "node_modules/astral-regex/package.json" }, { - "path": "node_modules/eastasianwidth/package.json" + "path": "node_modules/escodegen/package.json" }, { - "path": "node_modules/chardet/package.json" + "path": "node_modules/escodegen/node_modules/esprima/package.json" }, { - "path": "node_modules/js-tokens/package.json" + "path": "node_modules/escodegen/node_modules/source-map/package.json" }, { - "path": "node_modules/chalk/package.json" + "path": "node_modules/minimist/package.json" }, { - "path": "node_modules/chalk/node_modules/supports-color/package.json" + "path": "node_modules/elliptic/package.json" }, { - "path": "node_modules/is-regex/package.json" + "path": "node_modules/clone-response/package.json" }, { - "path": "node_modules/ajv/package.json" + "path": "node_modules/ecdsa-sig-formatter/package.json" }, { - "path": "node_modules/spdx-expression-parse/package.json" + "path": "node_modules/requizzle/package.json" }, { - "path": "node_modules/cli-width/package.json" + "path": "node_modules/base64-js/package.json" }, { - "path": "node_modules/ms/package.json" + "path": "node_modules/async-each/package.json" }, { - "path": "node_modules/fs-write-stream-atomic/package.json" + "path": "node_modules/pify/package.json" }, { - "path": "node_modules/istanbul-lib-report/package.json" + "path": "node_modules/object-keys/package.json" }, { - "path": "node_modules/base64-js/package.json" + "path": "node_modules/trim-newlines/package.json" }, { - "path": "node_modules/encodeurl/package.json" + "path": "node_modules/deep-is/package.json" }, { - "path": "node_modules/to-arraybuffer/package.json" + "path": "node_modules/fast-levenshtein/package.json" }, { - "path": "node_modules/micromatch/package.json" + "path": "node_modules/urix/package.json" }, { - "path": "node_modules/json-buffer/package.json" + "path": "node_modules/typescript/package.json" }, { - "path": "node_modules/file-entry-cache/package.json" + "path": "node_modules/shebang-regex/package.json" }, { - "path": "node_modules/mixin-deep/package.json" + "path": "node_modules/regex-not/package.json" }, { - "path": "node_modules/mixin-deep/node_modules/is-extendable/package.json" + "path": "node_modules/eslint-plugin-es/package.json" }, { - "path": "node_modules/is-binary-path/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/eslint-utils/package.json" }, { - "path": "node_modules/gtoken/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" }, { - "path": "node_modules/klaw/package.json" + "path": "node_modules/util/package.json" }, { - "path": "node_modules/functional-red-black-tree/package.json" + "path": "node_modules/util/node_modules/inherits/package.json" }, { - "path": "node_modules/dom-serializer/package.json" + "path": "node_modules/mem/package.json" }, { - "path": "node_modules/is-symbol/package.json" + "path": "node_modules/semver/package.json" }, { - "path": "node_modules/vm-browserify/package.json" + "path": "node_modules/unique-string/package.json" }, { - "path": "node_modules/picomatch/package.json" + "path": "node_modules/unique-filename/package.json" }, { - "path": "node_modules/source-list-map/package.json" + "path": "node_modules/decamelize/package.json" }, { - "path": "node_modules/@babel/parser/package.json" + "path": "node_modules/node-libs-browser/package.json" }, { - "path": "node_modules/@babel/highlight/package.json" + "path": "node_modules/node-libs-browser/node_modules/punycode/package.json" }, { - "path": "node_modules/@babel/code-frame/package.json" + "path": "node_modules/ajv-keywords/package.json" }, { - "path": "node_modules/move-concurrently/package.json" + "path": "node_modules/is-descriptor/package.json" }, { - "path": "node_modules/move-concurrently/node_modules/rimraf/package.json" + "path": "node_modules/is-descriptor/node_modules/kind-of/package.json" }, { - "path": "node_modules/type-check/package.json" + "path": "node_modules/arr-union/package.json" }, { - "path": "node_modules/nanomatch/package.json" + "path": "node_modules/acorn/package.json" }, { - "path": "node_modules/iconv-lite/package.json" + "path": "node_modules/wide-align/package.json" }, { - "path": "node_modules/querystring/package.json" + "path": "node_modules/wide-align/node_modules/string-width/package.json" }, { - "path": "node_modules/webpack/package.json" + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/webpack/node_modules/eslint-scope/package.json" + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/webpack/node_modules/braces/package.json" + "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/webpack/node_modules/braces/node_modules/extend-shallow/package.json" + "path": "node_modules/got/package.json" }, { - "path": "node_modules/webpack/node_modules/to-regex-range/package.json" + "path": "node_modules/got/node_modules/get-stream/package.json" }, { - "path": "node_modules/webpack/node_modules/memory-fs/package.json" + "path": "node_modules/sprintf-js/package.json" }, { - "path": "node_modules/webpack/node_modules/is-buffer/package.json" + "path": "node_modules/ts-loader/package.json" }, { - "path": "node_modules/webpack/node_modules/acorn/package.json" + "path": "node_modules/ts-loader/node_modules/semver/package.json" }, { - "path": "node_modules/webpack/node_modules/fill-range/package.json" + "path": "node_modules/isarray/package.json" }, { - "path": "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow/package.json" + "path": "node_modules/string_decoder/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/README.md" + "path": "node_modules/strip-eof/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/package.json" + "path": "node_modules/p-limit/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/CHANGELOG.md" + "path": "node_modules/url-parse-lax/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/index.js" + "path": "node_modules/gts/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/LICENSE" + "path": "node_modules/gts/node_modules/chalk/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/parsers.js" + "path": "node_modules/commander/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/.DS_Store" + "path": "node_modules/mimic-fn/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/utils.js" + "path": "node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/compilers.js" + "path": "node_modules/ini/package.json" }, { - "path": "node_modules/webpack/node_modules/micromatch/lib/cache.js" + "path": "node_modules/js2xmlparser/package.json" }, { - "path": "node_modules/webpack/node_modules/is-number/package.json" + "path": "node_modules/spdx-exceptions/package.json" }, { - "path": "node_modules/webpack/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/external-editor/package.json" }, { - "path": "node_modules/is-url/package.json" + "path": "node_modules/power-assert-formatter/package.json" }, { - "path": "node_modules/randombytes/package.json" + "path": "node_modules/domain-browser/package.json" }, { - "path": "node_modules/domutils/package.json" + "path": "node_modules/eslint-utils/package.json" }, { - "path": "node_modules/browserify-zlib/package.json" + "path": "node_modules/buffer-xor/package.json" }, { - "path": "node_modules/p-queue/package.json" + "path": "node_modules/text-table/package.json" }, { - "path": "node_modules/eventemitter3/package.json" + "path": "node_modules/domutils/package.json" }, { - "path": "node_modules/object-visit/package.json" + "path": "node_modules/supports-color/package.json" }, { - "path": "node_modules/ext/package.json" + "path": "node_modules/strip-indent/package.json" }, { - "path": "node_modules/ext/node_modules/type/package.json" + "path": "node_modules/buffer/package.json" }, { - "path": "node_modules/pkg-dir/package.json" + "path": "node_modules/fs.realpath/package.json" }, { - "path": "node_modules/pkg-dir/node_modules/locate-path/package.json" + "path": "node_modules/parse5/package.json" }, { - "path": "node_modules/pkg-dir/node_modules/find-up/package.json" + "path": "node_modules/decamelize-keys/package.json" }, { - "path": "node_modules/pkg-dir/node_modules/path-exists/package.json" + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" }, { - "path": "node_modules/pkg-dir/node_modules/p-locate/package.json" + "path": "node_modules/empower-core/package.json" }, { - "path": "node_modules/deep-equal/package.json" + "path": "node_modules/is-plain-object/package.json" }, { - "path": "node_modules/parse5/package.json" + "path": "node_modules/terser-webpack-plugin/package.json" }, { - "path": "node_modules/collection-visit/package.json" + "path": "node_modules/terser-webpack-plugin/node_modules/source-map/package.json" }, { - "path": "node_modules/flatted/package.json" + "path": "node_modules/acorn-es7-plugin/package.json" }, { - "path": "node_modules/for-in/package.json" + "path": "node_modules/iferr/package.json" }, { - "path": "node_modules/util/package.json" + "path": "node_modules/figgy-pudding/package.json" }, { - "path": "node_modules/util/node_modules/inherits/package.json" + "path": "node_modules/webpack-sources/package.json" }, { - "path": "node_modules/mem/package.json" + "path": "node_modules/webpack-sources/node_modules/source-map/package.json" }, { - "path": "node_modules/once/package.json" + "path": "node_modules/p-timeout/package.json" }, { - "path": "node_modules/universal-deep-strict-equal/package.json" + "path": "node_modules/upath/package.json" }, { - "path": "node_modules/anymatch/package.json" + "path": "node_modules/neo-async/package.json" }, { - "path": "node_modules/anymatch/node_modules/braces/package.json" + "path": "node_modules/espree/package.json" }, { - "path": "node_modules/anymatch/node_modules/braces/node_modules/extend-shallow/package.json" + "path": "node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/anymatch/node_modules/to-regex-range/package.json" + "path": "node_modules/responselike/package.json" }, { - "path": "node_modules/anymatch/node_modules/is-buffer/package.json" + "path": "node_modules/next-tick/package.json" }, { - "path": "node_modules/anymatch/node_modules/fill-range/package.json" + "path": "node_modules/esrecurse/package.json" }, { - "path": "node_modules/anymatch/node_modules/fill-range/node_modules/extend-shallow/package.json" + "path": "node_modules/stream-http/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/README.md" + "path": "node_modules/promise-inflight/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/package.json" + "path": "node_modules/bignumber.js/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/CHANGELOG.md" + "path": "node_modules/source-map/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/index.js" + "path": "node_modules/find-up/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/LICENSE" + "path": "node_modules/traverse/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/parsers.js" + "path": "node_modules/es-to-primitive/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/.DS_Store" + "path": "node_modules/rc/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/utils.js" + "path": "node_modules/rc/node_modules/minimist/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/compilers.js" + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/anymatch/node_modules/micromatch/lib/cache.js" + "path": "node_modules/safe-buffer/package.json" }, { - "path": "node_modules/anymatch/node_modules/is-number/package.json" + "path": "node_modules/uc.micro/package.json" }, { - "path": "node_modules/anymatch/node_modules/is-number/node_modules/kind-of/package.json" + "path": "node_modules/flat-cache/package.json" }, { - "path": "node_modules/anymatch/node_modules/normalize-path/package.json" + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" }, { - "path": "node_modules/brace-expansion/package.json" + "path": "node_modules/once/package.json" }, { - "path": "node_modules/tapable/package.json" + "path": "node_modules/gtoken/package.json" }, { - "path": "node_modules/is-number/package.json" + "path": "node_modules/urlgrey/package.json" }, { - "path": "node_modules/jsdoc-region-tag/package.json" + "path": "node_modules/convert-source-map/package.json" }, { - "path": "node_modules/serialize-javascript/package.json" + "path": "node_modules/is-date-object/package.json" }, { - "path": "node_modules/webpack-cli/package.json" + "path": "node_modules/tslint-config-prettier/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/locate-path/package.json" + "path": "node_modules/import-local/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/find-up/package.json" + "path": "node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/README.md" + "path": "node_modules/flush-write-stream/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/package.json" + "path": "node_modules/braces/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/CHANGELOG.md" + "path": "node_modules/iconv-lite/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/index.js" + "path": "node_modules/json5/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/LICENSE" + "path": "node_modules/json5/node_modules/minimist/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/parse.js" + "path": "node_modules/get-value/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/enoent.js" + "path": "node_modules/is-glob/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/escape.js" + "path": "node_modules/furi/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "node_modules/tslib/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "node_modules/map-visit/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/memory-fs/package.json" + "path": "node_modules/ripemd160/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/yargs-parser/package.json" + "path": "node_modules/watchpack/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/semver/package.json" + "path": "node_modules/stream-browserify/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/path-key/package.json" + "path": "node_modules/markdown-it-anchor/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/which/package.json" + "path": "node_modules/browser-stdout/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/shebang-regex/package.json" + "path": "node_modules/array-unique/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/v8-compile-cache/package.json" + "path": "node_modules/ajv-errors/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/path-exists/package.json" + "path": "node_modules/path-type/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/p-locate/package.json" + "path": "node_modules/to-regex-range/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/enhanced-resolve/package.json" + "path": "node_modules/randomfill/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/shebang-command/package.json" + "path": "node_modules/npm-packlist/package.json" }, { - "path": "node_modules/webpack-cli/node_modules/yargs/package.json" + "path": "node_modules/copy-concurrently/package.json" }, { - "path": "node_modules/markdown-it-anchor/package.json" + "path": "node_modules/copy-concurrently/node_modules/rimraf/package.json" }, { - "path": "node_modules/traverse/package.json" + "path": "node_modules/loader-runner/package.json" }, { - "path": "node_modules/restore-cursor/package.json" + "path": "node_modules/pump/package.json" }, { - "path": "node_modules/lodash.at/package.json" + "path": "node_modules/process-nextick-args/package.json" }, { - "path": "node_modules/graceful-fs/package.json" + "path": "node_modules/deep-extend/package.json" }, { - "path": "node_modules/isobject/package.json" + "path": "node_modules/resolve-url/package.json" }, { - "path": "node_modules/responselike/package.json" + "path": "node_modules/power-assert-context-reducer-ast/package.json" }, { - "path": "node_modules/pseudomap/package.json" + "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" }, { - "path": "node_modules/hash-base/package.json" + "path": "node_modules/type-check/package.json" }, { - "path": "node_modules/espurify/package.json" + "path": "node_modules/teeny-request/package.json" }, { - "path": "node_modules/espree/package.json" + "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/crypto-browserify/package.json" + "path": "node_modules/jwa/package.json" }, { - "path": "node_modules/power-assert-renderer-diagram/package.json" + "path": "node_modules/walkdir/package.json" }, { - "path": "node_modules/word-wrap/package.json" + "path": "node_modules/hard-rejection/package.json" }, { - "path": "node_modules/espower-source/package.json" + "path": "node_modules/base/package.json" }, { - "path": "node_modules/espower-source/node_modules/acorn/package.json" + "path": "node_modules/base/node_modules/define-property/package.json" }, { - "path": "node_modules/normalize-url/package.json" + "path": "node_modules/base/node_modules/is-data-descriptor/package.json" }, { - "path": "node_modules/infer-owner/package.json" + "path": "node_modules/base/node_modules/is-accessor-descriptor/package.json" }, { - "path": "node_modules/wordwrap/package.json" + "path": "node_modules/base/node_modules/is-descriptor/package.json" }, { - "path": "node_modules/ee-first/package.json" + "path": "node_modules/randombytes/package.json" }, { - "path": "node_modules/table/package.json" + "path": "node_modules/espower-source/package.json" }, { - "path": "node_modules/handlebars/package.json" + "path": "node_modules/espower-source/node_modules/acorn/package.json" }, { - "path": "node_modules/object-assign/package.json" + "path": "node_modules/cross-spawn/package.json" }, { - "path": "node_modules/es6-weak-map/package.json" + "path": "node_modules/@sindresorhus/is/package.json" }, { - "path": "node_modules/protobufjs/package.json" + "path": "node_modules/resolve-dir/package.json" }, { - "path": "node_modules/protobufjs/cli/package.json" + "path": "node_modules/resolve-dir/node_modules/global-modules/package.json" }, { - "path": "node_modules/protobufjs/cli/package-lock.json" + "path": "node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + "path": "node_modules/quick-lru/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + "path": "node_modules/path-exists/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + "path": "node_modules/jsdoc/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + "path": "node_modules/cacheable-request/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" }, { - "path": "node_modules/protobufjs/node_modules/@types/node/package.json" + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/normalize-path/package.json" + "path": "node_modules/escape-html/package.json" }, { - "path": "node_modules/cyclist/package.json" + "path": "node_modules/power-assert-renderer-assertion/package.json" }, { - "path": "node_modules/espower/package.json" + "path": "node_modules/minimist-options/package.json" }, { - "path": "node_modules/espower/node_modules/source-map/package.json" + "path": "node_modules/minimist-options/node_modules/arrify/package.json" }, { - "path": "node_modules/strip-json-comments/package.json" + "path": "node_modules/latest-version/package.json" }, { - "path": "node_modules/process-nextick-args/package.json" + "path": "node_modules/optionator/package.json" }, { - "path": "node_modules/brorand/package.json" + "path": "node_modules/parallel-transform/package.json" }, { - "path": "node_modules/uuid/package.json" + "path": "node_modules/slice-ansi/package.json" }, { - "path": "node_modules/p-is-promise/package.json" + "path": "node_modules/slice-ansi/node_modules/color-name/package.json" }, { - "path": "node_modules/array-find-index/package.json" + "path": "node_modules/slice-ansi/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/astral-regex/package.json" + "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/@grpc/proto-loader/package.json" + "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" }, { - "path": "node_modules/@grpc/grpc-js/package.json" + "path": "node_modules/power-assert-renderer-comparison/package.json" }, { - "path": "node_modules/test-exclude/package.json" + "path": "node_modules/flatted/package.json" }, { - "path": "node_modules/es6-promisify/package.json" + "path": "node_modules/unset-value/package.json" }, { - "path": "node_modules/p-try/package.json" + "path": "node_modules/unset-value/node_modules/has-value/package.json" }, { - "path": "node_modules/optionator/package.json" + "path": "node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" }, { - "path": "node_modules/is-plain-object/package.json" + "path": "node_modules/unset-value/node_modules/has-values/package.json" }, { - "path": "node_modules/requizzle/package.json" + "path": "node_modules/inherits/package.json" }, { - "path": "node_modules/c8/package.json" + "path": "node_modules/depd/package.json" }, { - "path": "node_modules/fast-levenshtein/package.json" + "path": "node_modules/es6-promisify/package.json" }, { - "path": "node_modules/statuses/package.json" + "path": "node_modules/long/package.json" }, { - "path": "node_modules/semver-diff/package.json" + "path": "node_modules/regexpp/package.json" }, { - "path": "node_modules/semver-diff/node_modules/semver/package.json" + "path": "node_modules/cli-width/package.json" }, { - "path": "node_modules/signal-exit/package.json" + "path": "node_modules/call-matcher/package.json" }, { - "path": "node_modules/jsdoc/package.json" + "path": "node_modules/resolve-cwd/package.json" }, { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + "path": "node_modules/resolve-cwd/node_modules/resolve-from/package.json" }, { - "path": "node_modules/map-age-cleaner/package.json" + "path": "node_modules/eslint/package.json" }, { - "path": "node_modules/resolve-url/package.json" + "path": "node_modules/eslint/node_modules/debug/package.json" }, { - "path": "node_modules/duplexify/package.json" + "path": "node_modules/eslint/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/ret/package.json" + "path": "node_modules/eslint/node_modules/path-key/package.json" }, { - "path": "node_modules/object-is/package.json" + "path": "node_modules/eslint/node_modules/shebang-command/package.json" }, { - "path": "node_modules/tslib/package.json" + "path": "node_modules/eslint/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/extend/package.json" + "path": "node_modules/eslint/node_modules/which/package.json" }, { - "path": "node_modules/is-wsl/package.json" + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/power-assert-context-reducer-ast/package.json" + "path": "node_modules/eslint/node_modules/semver/package.json" }, { - "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" }, { - "path": "node_modules/css-what/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" }, { - "path": "node_modules/power-assert-renderer-comparison/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/ecdsa-sig-formatter/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" }, { - "path": "node_modules/unique-slug/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" }, { - "path": "node_modules/typedarray-to-buffer/README.md" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" }, { - "path": "node_modules/typedarray-to-buffer/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" }, { - "path": "node_modules/typedarray-to-buffer/.travis.yml" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" }, { - "path": "node_modules/typedarray-to-buffer/index.js" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" }, { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" }, { - "path": "node_modules/typedarray-to-buffer/LICENSE" + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" }, { - "path": "node_modules/typedarray-to-buffer/test/basic.js" + "path": "node_modules/npm-bundled/package.json" }, { - "path": "node_modules/upath/package.json" + "path": "node_modules/is-wsl/package.json" }, { - "path": "node_modules/markdown-it/package.json" + "path": "node_modules/mdurl/package.json" }, { - "path": "node_modules/tslint-config-prettier/package.json" + "path": "node_modules/typedarray/package.json" }, { - "path": "node_modules/buffer-from/package.json" + "path": "node_modules/v8-to-istanbul/package.json" }, { - "path": "node_modules/minizlib/package.json" + "path": "node_modules/espower-loader/package.json" }, { - "path": "node_modules/minizlib/node_modules/yallist/package.json" + "path": "node_modules/object.getownpropertydescriptors/package.json" }, { - "path": "node_modules/domelementtype/package.json" + "path": "node_modules/cache-base/package.json" }, { - "path": "node_modules/ci-info/package.json" + "path": "node_modules/array-find-index/package.json" }, { - "path": "node_modules/@types/mocha/package.json" + "path": "node_modules/yargs/package.json" }, { - "path": "node_modules/@types/color-name/package.json" + "path": "node_modules/ci-info/package.json" }, { - "path": "node_modules/@types/is-windows/package.json" + "path": "node_modules/miller-rabin/package.json" }, { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" + "path": "node_modules/color-convert/package.json" }, { - "path": "node_modules/@types/node/package.json" + "path": "node_modules/use/package.json" }, { - "path": "node_modules/@types/long/package.json" + "path": "node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/serve-static/package.json" + "path": "node_modules/to-arraybuffer/package.json" }, { - "path": "node_modules/make-dir/package.json" + "path": "node_modules/extglob/package.json" }, { - "path": "node_modules/make-dir/node_modules/semver/package.json" + "path": "node_modules/extglob/node_modules/define-property/package.json" }, { - "path": "node_modules/md5.js/package.json" + "path": "node_modules/extglob/node_modules/is-data-descriptor/package.json" }, { - "path": "node_modules/esquery/package.json" + "path": "node_modules/extglob/node_modules/is-accessor-descriptor/package.json" }, { - "path": "node_modules/ncp/package.json" + "path": "node_modules/extglob/node_modules/extend-shallow/package.json" }, { - "path": "node_modules/emoji-regex/package.json" + "path": "node_modules/extglob/node_modules/is-descriptor/package.json" }, { - "path": "node_modules/set-value/package.json" + "path": "node_modules/eslint-visitor-keys/package.json" }, { - "path": "node_modules/set-value/node_modules/extend-shallow/package.json" + "path": "node_modules/to-regex/package.json" }, { - "path": "node_modules/read-pkg/package.json" + "path": "node_modules/path-browserify/package.json" }, { - "path": "node_modules/fast-diff/package.json" + "path": "node_modules/agent-base/package.json" }, { - "path": "node_modules/path-browserify/package.json" + "path": "node_modules/repeat-string/package.json" }, { - "path": "node_modules/xtend/package.json" + "path": "node_modules/flat/package.json" }, { - "path": "node_modules/resolve/package.json" + "path": "node_modules/through2/package.json" }, { - "path": "node_modules/lowercase-keys/package.json" + "path": "node_modules/gaxios/package.json" }, { - "path": "node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/p-queue/package.json" }, { - "path": "node_modules/webpack-sources/package.json" + "path": "node_modules/encodeurl/package.json" }, { - "path": "node_modules/is-extendable/package.json" + "path": "node_modules/normalize-path/package.json" }, { - "path": "node_modules/read-pkg-up/package.json" + "path": "node_modules/js-tokens/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + "path": "node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + "path": "node_modules/eslint-config-prettier/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + "path": "node_modules/uri-js/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + "path": "node_modules/test-exclude/package.json" }, { - "path": "node_modules/p-cancelable/package.json" + "path": "node_modules/safer-buffer/package.json" }, { - "path": "node_modules/aproba/package.json" + "path": "node_modules/prettier/package.json" }, { - "path": "node_modules/resolve-dir/package.json" + "path": "node_modules/regexp.prototype.flags/package.json" }, { - "path": "node_modules/resolve-dir/node_modules/global-modules/package.json" + "path": "node_modules/yargs-parser/package.json" }, { - "path": "node_modules/acorn-jsx/package.json" + "path": "node_modules/copy-descriptor/package.json" }, { - "path": "node_modules/interpret/package.json" + "path": "node_modules/@babel/code-frame/package.json" }, { - "path": "node_modules/power-assert-context-traversal/package.json" + "path": "node_modules/@babel/highlight/package.json" }, { - "path": "node_modules/long/package.json" + "path": "node_modules/@babel/parser/package.json" }, { - "path": "node_modules/d/package.json" + "path": "node_modules/configstore/package.json" }, { - "path": "node_modules/debug/package.json" + "path": "node_modules/configstore/node_modules/make-dir/package.json" }, { - "path": "node_modules/mimic-fn/package.json" + "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/bn.js/package.json" + "path": "node_modules/is-plain-obj/package.json" }, { - "path": "node_modules/arr-union/package.json" + "path": "node_modules/eastasianwidth/package.json" }, { - "path": "node_modules/cipher-base/package.json" + "path": "node_modules/memory-fs/package.json" }, { - "path": "node_modules/typedarray/package.json" + "path": "node_modules/has-yarn/package.json" }, { - "path": "node_modules/isexe/package.json" + "path": "node_modules/core-js/package.json" }, { - "path": "node_modules/multi-stage-sourcemap/package.json" + "path": "samples/analyze.v1beta2.js" }, { - "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" + "path": "samples/setEndpoint.js" }, { - "path": "node_modules/find-cache-dir/package.json" + "path": "samples/automlNaturalLanguageModel.js" }, { - "path": "node_modules/uc.micro/package.json" + "path": "samples/analyze.v1.js" }, { - "path": "node_modules/fs.realpath/package.json" + "path": "samples/automlNaturalLanguagePredict.js" }, { - "path": "node_modules/eslint-plugin-prettier/package.json" + "path": "samples/README.md" }, { - "path": "node_modules/yargs/package.json" + "path": "samples/automlNaturalLanguageDataset.js" }, { - "path": "node_modules/yargs/node_modules/locate-path/package.json" + "path": "samples/package.json" }, { - "path": "node_modules/yargs/node_modules/find-up/package.json" + "path": "samples/quickstart.js" }, { - "path": "node_modules/yargs/node_modules/path-exists/package.json" + "path": "samples/.eslintrc.yml" }, { - "path": "node_modules/yargs/node_modules/p-locate/package.json" + "path": "samples/automl/automlNaturalLanguageModel.js" }, { - "path": "node_modules/nice-try/package.json" + "path": "samples/automl/automlNaturalLanguagePredict.js" }, { - "path": "node_modules/static-extend/package.json" + "path": "samples/automl/automlNaturalLanguageDataset.js" }, { - "path": "node_modules/static-extend/node_modules/define-property/package.json" + "path": "samples/automl/resources/test.txt" }, { - "path": "node_modules/has/package.json" + "path": "samples/test/analyze.v1.test.js" }, { - "path": "node_modules/xmlcreate/package.json" + "path": "samples/test/automlNaturalLanguage.test.js" }, { - "path": "node_modules/escallmatch/package.json" + "path": "samples/test/analyze.v1beta2.test.js" }, { - "path": "node_modules/escallmatch/node_modules/esprima/package.json" + "path": "samples/test/quickstart.test.js" }, { - "path": "node_modules/get-caller-file/package.json" + "path": "samples/test/setEndpoint.test.js" }, { - "path": "node_modules/jwa/package.json" + "path": "samples/resources/text.txt" }, { - "path": "node_modules/json5/package.json" + "path": "samples/resources/android_text.txt" }, { - "path": "node_modules/json5/node_modules/minimist/package.json" + "path": "__pycache__/synth.cpython-36.pyc" }, { "path": "smoke-test/.eslintrc.yml" diff --git a/packages/google-cloud-language/system-test/install.ts b/packages/google-cloud-language/system-test/install.ts index 2736aee84f7..c9aa74ec221 100644 --- a/packages/google-cloud-language/system-test/install.ts +++ b/packages/google-cloud-language/system-test/install.ts @@ -18,6 +18,7 @@ import {packNTest} from 'pack-n-play'; import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; describe('typescript consumer tests', () => { it('should have correct type signature for typescript users', async function() { From e34445dc47e58b78bc8f3916e9861b7f496bd25f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2020 10:46:57 -0800 Subject: [PATCH 304/488] chore: release 3.7.0 * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-language/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 71cdf5dd056..68a24d1aa18 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [3.7.0](https://www.github.com/googleapis/nodejs-language/compare/v3.6.3...v3.7.0) (2020-01-03) + + +### Features + +* move library to typescript code generation ([#338](https://www.github.com/googleapis/nodejs-language/issues/338)) ([8317b02](https://www.github.com/googleapis/nodejs-language/commit/8317b02ad94724b3eee93895131e89cc9dc1e5cd)) + + +### Bug Fixes + +* closing a client twice throws error earlier ([9bf7e7c](https://www.github.com/googleapis/nodejs-language/commit/9bf7e7cbe0e34bbb49f920882a06e6739e7075d9)) + ### [3.6.3](https://www.github.com/googleapis/nodejs-language/compare/v3.6.2...v3.6.3) (2019-12-05) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index efbda0abc99..56e698854b7 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.6.3", + "version": "3.7.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index a0dd8a70b9e..155735a74d8 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.6.3", + "@google-cloud/language": "^3.7.0", "@google-cloud/storage": "^4.0.0", "yargs": "^15.0.0" }, From 63d5acf512ee6cc9e135b5b41ef0ce587ba3eb00 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 6 Jan 2020 22:33:22 +0200 Subject: [PATCH 305/488] chore(deps): update dependency mocha to v7 (#348) --- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 56e698854b7..f1acebe9e21 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -61,7 +61,7 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", - "mocha": "^6.1.4", + "mocha": "^7.0.0", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", "power-assert": "^1.6.0", diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 155735a74d8..be1c8074d29 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "chai": "^4.2.0", - "mocha": "^6.0.0", + "mocha": "^7.0.0", "uuid": "^3.2.1" } } From 859f3870014b7aaacf221d7e1b2ab73e9aec5ad2 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 Jan 2020 16:25:32 -0800 Subject: [PATCH 306/488] chore: clear synth.metadata --- packages/google-cloud-language/synth.metadata | 4023 ----------------- 1 file changed, 4023 deletions(-) delete mode 100644 packages/google-cloud-language/synth.metadata diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata deleted file mode 100644 index 769dca08131..00000000000 --- a/packages/google-cloud-language/synth.metadata +++ /dev/null @@ -1,4023 +0,0 @@ -{ - "updateTime": "2020-01-03T12:16:16.650006Z", - "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4d45a6399e9444fbddaeb1c86aabfde210723714", - "internalRef": "287908369" - } - }, - { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "language", - "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "language", - "apiVersion": "v1beta2", - "language": "typescript", - "generator": "gapic-generator-typescript" - } - } - ], - "newFiles": [ - { - "path": "synth.metadata" - }, - { - "path": ".repo-metadata.json" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": "linkinator.config.json" - }, - { - "path": ".prettierignore" - }, - { - "path": "tsconfig.json" - }, - { - "path": ".jsdoc.js" - }, - { - "path": ".gitignore" - }, - { - "path": "synth.py" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "README.md" - }, - { - "path": "package-lock.json" - }, - { - "path": ".prettierrc" - }, - { - "path": ".readme-partials.yml" - }, - { - "path": "codecov.yaml" - }, - { - "path": ".nycrc" - }, - { - "path": "package.json" - }, - { - "path": "webpack.config.js" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": "tslint.json" - }, - { - "path": "renovate.json" - }, - { - "path": "LICENSE" - }, - { - "path": "CHANGELOG.md" - }, - { - "path": ".eslintignore" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/.gitattributes" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/common.cfg" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": "test/gapic-language_service-v1.ts" - }, - { - "path": "test/mocha.opts" - }, - { - "path": "test/gapic-language_service-v1beta2.ts" - }, - { - "path": "system-test/language_service_smoke_test.js" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "system-test/fixtures/sample/src/index.ts" - }, - { - "path": "system-test/fixtures/sample/src/index.js" - }, - { - "path": "build/test/gapic-language_service-v1.d.ts" - }, - { - "path": "build/test/gapic-language_service-v1.js" - }, - { - "path": "build/test/gapic-language_service-v1.js.map" - }, - { - "path": "build/test/gapic-language_service-v1beta2.js" - }, - { - "path": "build/test/gapic-language_service-v1beta2.d.ts" - }, - { - "path": "build/test/gapic-language_service-v1beta2.js.map" - }, - { - "path": "build/system-test/install.d.ts" - }, - { - "path": "build/system-test/install.js" - }, - { - "path": "build/system-test/install.js.map" - }, - { - "path": "build/protos/protos.d.ts" - }, - { - "path": "build/protos/protos.js" - }, - { - "path": "build/protos/protos.json" - }, - { - "path": "build/protos/google/cloud/language/v1beta2/language_service.proto" - }, - { - "path": "build/protos/google/cloud/language/v1/language_service.proto" - }, - { - "path": "build/src/index.js" - }, - { - "path": "build/src/index.js.map" - }, - { - "path": "build/src/index.d.ts" - }, - { - "path": "build/src/v1beta2/language_service_client.js.map" - }, - { - "path": "build/src/v1beta2/language_service_client.d.ts" - }, - { - "path": "build/src/v1beta2/index.js" - }, - { - "path": "build/src/v1beta2/language_service_client_config.d.ts" - }, - { - "path": "build/src/v1beta2/language_service_client_config.json" - }, - { - "path": "build/src/v1beta2/index.js.map" - }, - { - "path": "build/src/v1beta2/language_service_client.js" - }, - { - "path": "build/src/v1beta2/index.d.ts" - }, - { - "path": "build/src/v1/language_service_client.js.map" - }, - { - "path": "build/src/v1/language_service_client.d.ts" - }, - { - "path": "build/src/v1/index.js" - }, - { - "path": "build/src/v1/language_service_client_config.d.ts" - }, - { - "path": "build/src/v1/language_service_client_config.json" - }, - { - "path": "build/src/v1/index.js.map" - }, - { - "path": "build/src/v1/language_service_client.js" - }, - { - "path": "build/src/v1/index.d.ts" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.json" - }, - { - "path": "protos/google/cloud/language/v1beta2/language_service.proto" - }, - { - "path": "protos/google/cloud/language/v1/language_service.proto" - }, - { - "path": ".git/shallow" - }, - { - "path": ".git/HEAD" - }, - { - "path": ".git/config" - }, - { - "path": ".git/packed-refs" - }, - { - "path": ".git/index" - }, - { - "path": ".git/description" - }, - { - "path": ".git/objects/pack/pack-dcd9eba3ba8cc88b161725e192577c892e44296c.idx" - }, - { - "path": ".git/objects/pack/pack-dcd9eba3ba8cc88b161725e192577c892e44296c.pack" - }, - { - "path": ".git/logs/HEAD" - }, - { - "path": ".git/logs/refs/heads/master" - }, - { - "path": ".git/logs/refs/heads/autosynth" - }, - { - "path": ".git/logs/refs/remotes/origin/HEAD" - }, - { - "path": ".git/hooks/update.sample" - }, - { - "path": ".git/hooks/pre-push.sample" - }, - { - "path": ".git/hooks/pre-rebase.sample" - }, - { - "path": ".git/hooks/pre-commit.sample" - }, - { - "path": ".git/hooks/applypatch-msg.sample" - }, - { - "path": ".git/hooks/post-update.sample" - }, - { - "path": ".git/hooks/pre-applypatch.sample" - }, - { - "path": ".git/hooks/prepare-commit-msg.sample" - }, - { - "path": ".git/hooks/commit-msg.sample" - }, - { - "path": ".git/hooks/pre-receive.sample" - }, - { - "path": ".git/hooks/fsmonitor-watchman.sample" - }, - { - "path": ".git/refs/heads/master" - }, - { - "path": ".git/refs/heads/autosynth" - }, - { - "path": ".git/refs/remotes/origin/HEAD" - }, - { - "path": ".git/info/exclude" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/v1beta2/language_service_proto_list.json" - }, - { - "path": "src/v1beta2/index.ts" - }, - { - "path": "src/v1beta2/language_service_client_config.json" - }, - { - "path": "src/v1beta2/language_service_client.ts" - }, - { - "path": "src/v1/language_service_proto_list.json" - }, - { - "path": "src/v1/index.ts" - }, - { - "path": "src/v1/language_service_client_config.json" - }, - { - "path": "src/v1/language_service_client.ts" - }, - { - "path": "node_modules/builtin-status-codes/package.json" - }, - { - "path": "node_modules/progress/package.json" - }, - { - "path": "node_modules/is-ci/package.json" - }, - { - "path": "node_modules/isobject/package.json" - }, - { - "path": "node_modules/mamacro/package.json" - }, - { - "path": "node_modules/define-property/package.json" - }, - { - "path": "node_modules/define-property/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/define-property/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/define-property/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/destroy/package.json" - }, - { - "path": "node_modules/snapdragon-util/package.json" - }, - { - "path": "node_modules/snapdragon-util/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/snapdragon-util/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/power-assert-context-formatter/package.json" - }, - { - "path": "node_modules/fast-json-stable-stringify/package.json" - }, - { - "path": "node_modules/nice-try/package.json" - }, - { - "path": "node_modules/which-module/package.json" - }, - { - "path": "node_modules/asn1.js/package.json" - }, - { - "path": "node_modules/array-find/package.json" - }, - { - "path": "node_modules/catharsis/package.json" - }, - { - "path": "node_modules/is-promise/package.json" - }, - { - "path": "node_modules/v8-compile-cache/package.json" - }, - { - "path": "node_modules/create-hmac/package.json" - }, - { - "path": "node_modules/tapable/package.json" - }, - { - "path": "node_modules/.bin/sha.js" - }, - { - "path": "node_modules/doctrine/package.json" - }, - { - "path": "node_modules/callsites/package.json" - }, - { - "path": "node_modules/diff/package.json" - }, - { - "path": "node_modules/hosted-git-info/package.json" - }, - { - "path": "node_modules/color-name/package.json" - }, - { - "path": "node_modules/path-dirname/package.json" - }, - { - "path": "node_modules/defer-to-connect/package.json" - }, - { - "path": "node_modules/snapdragon/index.js" - }, - { - "path": "node_modules/snapdragon/README.md" - }, - { - "path": "node_modules/snapdragon/package.json" - }, - { - "path": "node_modules/snapdragon/LICENSE" - }, - { - "path": "node_modules/snapdragon/lib/position.js" - }, - { - "path": "node_modules/snapdragon/lib/compiler.js" - }, - { - "path": "node_modules/snapdragon/lib/source-maps.js" - }, - { - "path": "node_modules/snapdragon/lib/utils.js" - }, - { - "path": "node_modules/snapdragon/lib/parser.js" - }, - { - "path": "node_modules/snapdragon/node_modules/define-property/package.json" - }, - { - "path": "node_modules/snapdragon/node_modules/debug/package.json" - }, - { - "path": "node_modules/snapdragon/node_modules/ms/package.json" - }, - { - "path": "node_modules/snapdragon/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/snapdragon/node_modules/source-map/package.json" - }, - { - "path": "node_modules/unpipe/package.json" - }, - { - "path": "node_modules/parse-asn1/package.json" - }, - { - "path": "node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/http-errors/package.json" - }, - { - "path": "node_modules/eventemitter3/package.json" - }, - { - "path": "node_modules/esutils/package.json" - }, - { - "path": "node_modules/npm-run-path/package.json" - }, - { - "path": "node_modules/npm-run-path/node_modules/path-key/package.json" - }, - { - "path": "node_modules/he/package.json" - }, - { - "path": "node_modules/pack-n-play/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/tmp/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/on-finished/package.json" - }, - { - "path": "node_modules/crypto-browserify/package.json" - }, - { - "path": "node_modules/linkinator/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/redent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/meow/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/term-size/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/indent-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-obj/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/boxen/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/chalk/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/arrify/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/widest-line/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/parse-json/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-npm/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/unique-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/configstore/package.json" - }, - { - "path": "node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/p-cancelable/package.json" - }, - { - "path": "node_modules/markdown-it/package.json" - }, - { - "path": "node_modules/setimmediate/package.json" - }, - { - "path": "node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/require-main-filename/package.json" - }, - { - "path": "node_modules/fast-diff/package.json" - }, - { - "path": "node_modules/lodash.camelcase/package.json" - }, - { - "path": "node_modules/redent/package.json" - }, - { - "path": "node_modules/resolve/package.json" - }, - { - "path": "node_modules/globals/package.json" - }, - { - "path": "node_modules/p-is-promise/package.json" - }, - { - "path": "node_modules/range-parser/package.json" - }, - { - "path": "node_modules/string.prototype.trimright/package.json" - }, - { - "path": "node_modules/chrome-trace-event/package.json" - }, - { - "path": "node_modules/constants-browserify/package.json" - }, - { - "path": "node_modules/inflight/package.json" - }, - { - "path": "node_modules/debug/package.json" - }, - { - "path": "node_modules/htmlparser2/package.json" - }, - { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/semver-diff/node_modules/semver/package.json" - }, - { - "path": "node_modules/tsutils/package.json" - }, - { - "path": "node_modules/multi-stage-sourcemap/package.json" - }, - { - "path": "node_modules/multi-stage-sourcemap/node_modules/source-map/package.json" - }, - { - "path": "node_modules/ms/package.json" - }, - { - "path": "node_modules/linkify-it/package.json" - }, - { - "path": "node_modules/through/package.json" - }, - { - "path": "node_modules/power-assert-renderer-file/package.json" - }, - { - "path": "node_modules/homedir-polyfill/package.json" - }, - { - "path": "node_modules/string-width/package.json" - }, - { - "path": "node_modules/html-escaper/package.json" - }, - { - "path": "node_modules/type/package.json" - }, - { - "path": "node_modules/move-concurrently/package.json" - }, - { - "path": "node_modules/move-concurrently/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/type-fest/package.json" - }, - { - "path": "node_modules/intelli-espower-loader/package.json" - }, - { - "path": "node_modules/parseurl/package.json" - }, - { - "path": "node_modules/buffer-from/package.json" - }, - { - "path": "node_modules/google-p12-pem/package.json" - }, - { - "path": "node_modules/get-caller-file/package.json" - }, - { - "path": "node_modules/klaw/package.json" - }, - { - "path": "node_modules/public-encrypt/package.json" - }, - { - "path": "node_modules/map-obj/package.json" - }, - { - "path": "node_modules/node-fetch/package.json" - }, - { - "path": "node_modules/jsonexport/package.json" - }, - { - "path": "node_modules/isexe/package.json" - }, - { - "path": "node_modules/object.pick/package.json" - }, - { - "path": "node_modules/escallmatch/package.json" - }, - { - "path": "node_modules/escallmatch/node_modules/esprima/package.json" - }, - { - "path": "node_modules/espower/package.json" - }, - { - "path": "node_modules/espower/node_modules/source-map/package.json" - }, - { - "path": "node_modules/run-async/package.json" - }, - { - "path": "node_modules/@webassemblyjs/ast/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wast-printer/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-code-frame/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wasm-opt/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-wasm-bytecode/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-wasm-section/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wasm-parser/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-api-error/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-buffer/package.json" - }, - { - "path": "node_modules/@webassemblyjs/utf8/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wast-parser/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wasm-gen/package.json" - }, - { - "path": "node_modules/@webassemblyjs/leb128/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-fsm/package.json" - }, - { - "path": "node_modules/@webassemblyjs/wasm-edit/package.json" - }, - { - "path": "node_modules/@webassemblyjs/ieee754/package.json" - }, - { - "path": "node_modules/@webassemblyjs/helper-module-context/package.json" - }, - { - "path": "node_modules/@webassemblyjs/floating-point-hex-parser/package.json" - }, - { - "path": "node_modules/validate-npm-package-license/package.json" - }, - { - "path": "node_modules/file-entry-cache/package.json" - }, - { - "path": "node_modules/meow/package.json" - }, - { - "path": "node_modules/meow/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/cacache/package.json" - }, - { - "path": "node_modules/cacache/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/concat-map/package.json" - }, - { - "path": "node_modules/infer-owner/package.json" - }, - { - "path": "node_modules/term-size/package.json" - }, - { - "path": "node_modules/xmlcreate/package.json" - }, - { - "path": "node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/yallist/package.json" - }, - { - "path": "node_modules/class-utils/package.json" - }, - { - "path": "node_modules/class-utils/node_modules/define-property/package.json" - }, - { - "path": "node_modules/json-bigint/package.json" - }, - { - "path": "node_modules/hmac-drbg/package.json" - }, - { - "path": "node_modules/resolve-from/package.json" - }, - { - "path": "node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/cliui/package.json" - }, - { - "path": "node_modules/cipher-base/package.json" - }, - { - "path": "node_modules/toidentifier/package.json" - }, - { - "path": "node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/marked/package.json" - }, - { - "path": "node_modules/wrappy/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/package.json" - }, - { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" - }, - { - "path": "node_modules/glob-parent/package.json" - }, - { - "path": "node_modules/collection-visit/package.json" - }, - { - "path": "node_modules/xtend/package.json" - }, - { - "path": "node_modules/loader-utils/package.json" - }, - { - "path": "node_modules/assign-symbols/package.json" - }, - { - "path": "node_modules/assert/package.json" - }, - { - "path": "node_modules/assert/node_modules/util/package.json" - }, - { - "path": "node_modules/assert/node_modules/inherits/package.json" - }, - { - "path": "node_modules/is-arguments/package.json" - }, - { - "path": "node_modules/bn.js/package.json" - }, - { - "path": "node_modules/set-blocking/package.json" - }, - { - "path": "node_modules/fill-range/package.json" - }, - { - "path": "node_modules/from2/package.json" - }, - { - "path": "node_modules/object-visit/package.json" - }, - { - "path": "node_modules/istanbul-lib-report/package.json" - }, - { - "path": "node_modules/load-json-file/package.json" - }, - { - "path": "node_modules/mississippi/package.json" - }, - { - "path": "node_modules/mississippi/node_modules/through2/package.json" - }, - { - "path": "node_modules/has-value/package.json" - }, - { - "path": "node_modules/readdirp/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/is-number/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/readdirp/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/readdirp/node_modules/braces/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/readdirp/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/is-number/package.json" - }, - { - "path": "node_modules/ansi-align/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/atob/package.json" - }, - { - "path": "node_modules/duplexer3/package.json" - }, - { - "path": "node_modules/esprima/package.json" - }, - { - "path": "node_modules/is-stream-ended/package.json" - }, - { - "path": "node_modules/minimatch/package.json" - }, - { - "path": "node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/growl/package.json" - }, - { - "path": "node_modules/string.prototype.trimleft/package.json" - }, - { - "path": "node_modules/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/global-prefix/package.json" - }, - { - "path": "node_modules/global-prefix/node_modules/which/package.json" - }, - { - "path": "node_modules/normalize-package-data/package.json" - }, - { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" - }, - { - "path": "node_modules/fast-text-encoding/package.json" - }, - { - "path": "node_modules/tar/package.json" - }, - { - "path": "node_modules/tar/node_modules/yallist/package.json" - }, - { - "path": "node_modules/cyclist/package.json" - }, - { - "path": "node_modules/server-destroy/package.json" - }, - { - "path": "node_modules/remove-trailing-separator/package.json" - }, - { - "path": "node_modules/prelude-ls/package.json" - }, - { - "path": "node_modules/d/package.json" - }, - { - "path": "node_modules/protobufjs/package.json" - }, - { - "path": "node_modules/protobufjs/cli/package-lock.json" - }, - { - "path": "node_modules/protobufjs/cli/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/uglify-js/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/commander/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" - }, - { - "path": "node_modules/protobufjs/node_modules/@types/node/package.json" - }, - { - "path": "node_modules/domhandler/package.json" - }, - { - "path": "node_modules/pkg-dir/package.json" - }, - { - "path": "node_modules/pkg-dir/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/pkg-dir/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/pkg-dir/node_modules/find-up/package.json" - }, - { - "path": "node_modules/pkg-dir/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/ansi-escapes/package.json" - }, - { - "path": "node_modules/power-assert-renderer-base/package.json" - }, - { - "path": "node_modules/boolbase/package.json" - }, - { - "path": "node_modules/aproba/package.json" - }, - { - "path": "node_modules/fragment-cache/package.json" - }, - { - "path": "node_modules/indent-string/package.json" - }, - { - "path": "node_modules/lodash/package.json" - }, - { - "path": "node_modules/taffydb/package.json" - }, - { - "path": "node_modules/extend/package.json" - }, - { - "path": "node_modules/is-yarn-global/package.json" - }, - { - "path": "node_modules/dom-serializer/package.json" - }, - { - "path": "node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/log-symbols/package.json" - }, - { - "path": "node_modules/is-callable/package.json" - }, - { - "path": "node_modules/es5-ext/package.json" - }, - { - "path": "node_modules/https-browserify/package.json" - }, - { - "path": "node_modules/stringifier/package.json" - }, - { - "path": "node_modules/source-list-map/package.json" - }, - { - "path": "node_modules/vm-browserify/package.json" - }, - { - "path": "node_modules/es6-weak-map/package.json" - }, - { - "path": "node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/browserify-zlib/package.json" - }, - { - "path": "node_modules/pascalcase/package.json" - }, - { - "path": "node_modules/decompress-response/package.json" - }, - { - "path": "node_modules/set-value/package.json" - }, - { - "path": "node_modules/set-value/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/js-yaml/package.json" - }, - { - "path": "node_modules/cli-boxes/package.json" - }, - { - "path": "node_modules/is-obj/package.json" - }, - { - "path": "node_modules/is-typedarray/package.json" - }, - { - "path": "node_modules/is-binary-path/package.json" - }, - { - "path": "node_modules/registry-auth-token/package.json" - }, - { - "path": "node_modules/safe-regex/package.json" - }, - { - "path": "node_modules/decode-uri-component/package.json" - }, - { - "path": "node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/buffer-equal-constant-time/package.json" - }, - { - "path": "node_modules/@bcoe/v8-coverage/package.json" - }, - { - "path": "node_modules/eslint-scope/package.json" - }, - { - "path": "node_modules/stream-shift/package.json" - }, - { - "path": "node_modules/union-value/package.json" - }, - { - "path": "node_modules/invert-kv/package.json" - }, - { - "path": "node_modules/snapdragon-node/package.json" - }, - { - "path": "node_modules/snapdragon-node/node_modules/define-property/package.json" - }, - { - "path": "node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/snapdragon-node/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/is-extglob/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/index.js" - }, - { - "path": "node_modules/typedarray-to-buffer/README.md" - }, - { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/.travis.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/LICENSE" - }, - { - "path": "node_modules/typedarray-to-buffer/test/basic.js" - }, - { - "path": "node_modules/restore-cursor/package.json" - }, - { - "path": "node_modules/pbkdf2/package.json" - }, - { - "path": "node_modules/events/package.json" - }, - { - "path": "node_modules/map-cache/package.json" - }, - { - "path": "node_modules/mimic-response/package.json" - }, - { - "path": "node_modules/normalize-url/package.json" - }, - { - "path": "node_modules/kind-of/package.json" - }, - { - "path": "node_modules/fresh/package.json" - }, - { - "path": "node_modules/interpret/package.json" - }, - { - "path": "node_modules/imurmurhash/package.json" - }, - { - "path": "node_modules/indexof/package.json" - }, - { - "path": "node_modules/arr-flatten/package.json" - }, - { - "path": "node_modules/codecov/package.json" - }, - { - "path": "node_modules/ajv/package.json" - }, - { - "path": "node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/timers-browserify/package.json" - }, - { - "path": "node_modules/import-lazy/package.json" - }, - { - "path": "node_modules/json-schema-traverse/package.json" - }, - { - "path": "node_modules/ncp/package.json" - }, - { - "path": "node_modules/rxjs/package.json" - }, - { - "path": "node_modules/p-locate/package.json" - }, - { - "path": "node_modules/figures/package.json" - }, - { - "path": "node_modules/os-browserify/package.json" - }, - { - "path": "node_modules/underscore/package.json" - }, - { - "path": "node_modules/finalhandler/package.json" - }, - { - "path": "node_modules/finalhandler/node_modules/debug/package.json" - }, - { - "path": "node_modules/finalhandler/node_modules/ms/package.json" - }, - { - "path": "node_modules/ignore/package.json" - }, - { - "path": "node_modules/argv/package.json" - }, - { - "path": "node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/arr-diff/package.json" - }, - { - "path": "node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/currently-unhandled/package.json" - }, - { - "path": "node_modules/minizlib/package.json" - }, - { - "path": "node_modules/minizlib/node_modules/yallist/package.json" - }, - { - "path": "node_modules/source-map-resolve/package.json" - }, - { - "path": "node_modules/google-gax/package.json" - }, - { - "path": "node_modules/browserify-aes/package.json" - }, - { - "path": "node_modules/commondir/package.json" - }, - { - "path": "node_modules/onetime/package.json" - }, - { - "path": "node_modules/lcid/package.json" - }, - { - "path": "node_modules/path-key/package.json" - }, - { - "path": "node_modules/core-util-is/package.json" - }, - { - "path": "node_modules/array-filter/package.json" - }, - { - "path": "node_modules/prepend-http/package.json" - }, - { - "path": "node_modules/console-browserify/package.json" - }, - { - "path": "node_modules/write/package.json" - }, - { - "path": "node_modules/duplexify/package.json" - }, - { - "path": "node_modules/camelcase/package.json" - }, - { - "path": "node_modules/tty-browserify/package.json" - }, - { - "path": "node_modules/error-ex/package.json" - }, - { - "path": "node_modules/empower-assert/package.json" - }, - { - "path": "node_modules/micromatch/package.json" - }, - { - "path": "node_modules/boxen/package.json" - }, - { - "path": "node_modules/boxen/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/boxen/node_modules/string-width/package.json" - }, - { - "path": "node_modules/boxen/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/boxen/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/boxen/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/repeat-element/package.json" - }, - { - "path": "node_modules/querystring/package.json" - }, - { - "path": "node_modules/node-environment-flags/package.json" - }, - { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" - }, - { - "path": "node_modules/c8/package.json" - }, - { - "path": "node_modules/gcp-metadata/package.json" - }, - { - "path": "node_modules/json-buffer/package.json" - }, - { - "path": "node_modules/stream-each/package.json" - }, - { - "path": "node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/bluebird/package.json" - }, - { - "path": "node_modules/null-loader/package.json" - }, - { - "path": "node_modules/big.js/package.json" - }, - { - "path": "node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/serve-static/package.json" - }, - { - "path": "node_modules/object-copy/package.json" - }, - { - "path": "node_modules/object-copy/node_modules/define-property/package.json" - }, - { - "path": "node_modules/object-copy/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/object-copy/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/path-parse/package.json" - }, - { - "path": "node_modules/mime/package.json" - }, - { - "path": "node_modules/terser/package.json" - }, - { - "path": "node_modules/terser/node_modules/source-map-support/package.json" - }, - { - "path": "node_modules/terser/node_modules/source-map/package.json" - }, - { - "path": "node_modules/emojis-list/package.json" - }, - { - "path": "node_modules/yargs-unparser/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/minimalistic-crypto-utils/package.json" - }, - { - "path": "node_modules/lines-and-columns/package.json" - }, - { - "path": "node_modules/minimalistic-assert/package.json" - }, - { - "path": "node_modules/is-url/package.json" - }, - { - "path": "node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/is-data-descriptor/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/is-data-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/chalk/package.json" - }, - { - "path": "node_modules/chalk/node_modules/color-name/package.json" - }, - { - "path": "node_modules/chalk/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/chalk/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/chalk/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/chalk/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/locate-path/package.json" - }, - { - "path": "node_modules/spdx-expression-parse/package.json" - }, - { - "path": "node_modules/power-assert-util-string-width/package.json" - }, - { - "path": "node_modules/esquery/package.json" - }, - { - "path": "node_modules/to-readable-stream/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" - }, - { - "path": "node_modules/espower-location-detector/package.json" - }, - { - "path": "node_modules/espower-location-detector/node_modules/source-map/package.json" - }, - { - "path": "node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/is-arrayish/package.json" - }, - { - "path": "node_modules/prettier-linter-helpers/package.json" - }, - { - "path": "node_modules/chardet/package.json" - }, - { - "path": "node_modules/amdefine/package.json" - }, - { - "path": "node_modules/http-cache-semantics/package.json" - }, - { - "path": "node_modules/concat-stream/package.json" - }, - { - "path": "node_modules/has-flag/package.json" - }, - { - "path": "node_modules/cheerio/package.json" - }, - { - "path": "node_modules/domelementtype/package.json" - }, - { - "path": "node_modules/npm-normalize-package-bin/package.json" - }, - { - "path": "node_modules/diffie-hellman/package.json" - }, - { - "path": "node_modules/@szmarczak/http-timer/package.json" - }, - { - "path": "node_modules/tmp/package.json" - }, - { - "path": "node_modules/entities/package.json" - }, - { - "path": "node_modules/execa/package.json" - }, - { - "path": "node_modules/execa/node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/execa/node_modules/yallist/package.json" - }, - { - "path": "node_modules/execa/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/execa/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/execa/node_modules/which/package.json" - }, - { - "path": "node_modules/execa/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/execa/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/is-accessor-descriptor/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/strip-bom/package.json" - }, - { - "path": "node_modules/argparse/package.json" - }, - { - "path": "node_modules/has/package.json" - }, - { - "path": "node_modules/ee-first/package.json" - }, - { - "path": "node_modules/serialize-javascript/package.json" - }, - { - "path": "node_modules/sha.js/sha512.js" - }, - { - "path": "node_modules/sha.js/bin.js" - }, - { - "path": "node_modules/sha.js/index.js" - }, - { - "path": "node_modules/sha.js/README.md" - }, - { - "path": "node_modules/sha.js/sha.js" - }, - { - "path": "node_modules/sha.js/sha256.js" - }, - { - "path": "node_modules/sha.js/hash.js" - }, - { - "path": "node_modules/sha.js/.travis.yml" - }, - { - "path": "node_modules/sha.js/package.json" - }, - { - "path": "node_modules/sha.js/sha384.js" - }, - { - "path": "node_modules/sha.js/sha1.js" - }, - { - "path": "node_modules/sha.js/LICENSE" - }, - { - "path": "node_modules/sha.js/sha224.js" - }, - { - "path": "node_modules/sha.js/test/test.js" - }, - { - "path": "node_modules/sha.js/test/hash.js" - }, - { - "path": "node_modules/sha.js/test/vectors.js" - }, - { - "path": "node_modules/object-inspect/package.json" - }, - { - "path": "node_modules/deep-equal/package.json" - }, - { - "path": "node_modules/create-hash/package.json" - }, - { - "path": "node_modules/table/package.json" - }, - { - "path": "node_modules/table/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/table/node_modules/string-width/package.json" - }, - { - "path": "node_modules/table/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/table/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/spdx-correct/package.json" - }, - { - "path": "node_modules/get-stream/package.json" - }, - { - "path": "node_modules/expand-tilde/package.json" - }, - { - "path": "node_modules/chownr/package.json" - }, - { - "path": "node_modules/power-assert/package.json" - }, - { - "path": "node_modules/expand-brackets/package.json" - }, - { - "path": "node_modules/expand-brackets/node_modules/define-property/package.json" - }, - { - "path": "node_modules/expand-brackets/node_modules/debug/package.json" - }, - { - "path": "node_modules/expand-brackets/node_modules/ms/package.json" - }, - { - "path": "node_modules/expand-brackets/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/statuses/package.json" - }, - { - "path": "node_modules/browserify-rsa/package.json" - }, - { - "path": "node_modules/@istanbuljs/schema/package.json" - }, - { - "path": "node_modules/es6-set/package.json" - }, - { - "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" - }, - { - "path": "node_modules/parse-passwd/package.json" - }, - { - "path": "node_modules/istanbul-reports/package.json" - }, - { - "path": "node_modules/browserify-sign/package.json" - }, - { - "path": "node_modules/enhanced-resolve/package.json" - }, - { - "path": "node_modules/@grpc/grpc-js/package.json" - }, - { - "path": "node_modules/@grpc/grpc-js/node_modules/semver/package.json" - }, - { - "path": "node_modules/@grpc/proto-loader/package.json" - }, - { - "path": "node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/etag/package.json" - }, - { - "path": "node_modules/y18n/package.json" - }, - { - "path": "node_modules/diff-match-patch/package.json" - }, - { - "path": "node_modules/es6-iterator/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/semver/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/natural-compare/package.json" - }, - { - "path": "node_modules/uuid/package.json" - }, - { - "path": "node_modules/event-target-shim/package.json" - }, - { - "path": "node_modules/url/package.json" - }, - { - "path": "node_modules/url/node_modules/punycode/package.json" - }, - { - "path": "node_modules/pako/package.json" - }, - { - "path": "node_modules/arrify/package.json" - }, - { - "path": "node_modules/widest-line/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/string-width/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/ignore-walk/package.json" - }, - { - "path": "node_modules/errno/package.json" - }, - { - "path": "node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/function-bind/package.json" - }, - { - "path": "node_modules/object-is/package.json" - }, - { - "path": "node_modules/@types/color-name/package.json" - }, - { - "path": "node_modules/@types/node/package.json" - }, - { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/@types/normalize-package-data/package.json" - }, - { - "path": "node_modules/@types/is-windows/package.json" - }, - { - "path": "node_modules/@types/mocha/package.json" - }, - { - "path": "node_modules/@types/minimist/package.json" - }, - { - "path": "node_modules/@types/fs-extra/package.json" - }, - { - "path": "node_modules/@types/fs-extra/node_modules/@types/node/package.json" - }, - { - "path": "node_modules/@types/long/package.json" - }, - { - "path": "node_modules/is-windows/package.json" - }, - { - "path": "node_modules/levn/package.json" - }, - { - "path": "node_modules/pseudomap/package.json" - }, - { - "path": "node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/picomatch/package.json" - }, - { - "path": "node_modules/power-assert-renderer-diagram/package.json" - }, - { - "path": "node_modules/webpack-cli/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/v8-compile-cache/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/color-name/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/string-width/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cliui/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/path-key/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/enhanced-resolve/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/which/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/semver/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/find-up/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/LICENSE" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/CHANGELOG.md" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/parse.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/enoent.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/escape.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/resolveCommand.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/readShebang.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/yargs/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/is-stream/package.json" - }, - { - "path": "node_modules/component-emitter/package.json" - }, - { - "path": "node_modules/es6-symbol/package.json" - }, - { - "path": "node_modules/parse-json/package.json" - }, - { - "path": "node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/spdx-license-ids/package.json" - }, - { - "path": "node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/extend-shallow/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/browserify-cipher/package.json" - }, - { - "path": "node_modules/ssri/package.json" - }, - { - "path": "node_modules/google-auth-library/package.json" - }, - { - "path": "node_modules/webpack/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-number/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/eslint-scope/package.json" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/webpack/node_modules/acorn/package.json" - }, - { - "path": "node_modules/webpack/node_modules/braces/package.json" - }, - { - "path": "node_modules/webpack/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/webpack/node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/split-string/package.json" - }, - { - "path": "node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/posix-character-classes/package.json" - }, - { - "path": "node_modules/builtin-modules/package.json" - }, - { - "path": "node_modules/static-extend/package.json" - }, - { - "path": "node_modules/static-extend/node_modules/define-property/package.json" - }, - { - "path": "node_modules/process/package.json" - }, - { - "path": "node_modules/tslint/package.json" - }, - { - "path": "node_modules/tslint/node_modules/semver/package.json" - }, - { - "path": "node_modules/type-name/package.json" - }, - { - "path": "node_modules/define-properties/package.json" - }, - { - "path": "node_modules/universal-deep-strict-equal/package.json" - }, - { - "path": "node_modules/jws/package.json" - }, - { - "path": "node_modules/minipass/package.json" - }, - { - "path": "node_modules/minipass/node_modules/yallist/package.json" - }, - { - "path": "node_modules/nth-check/package.json" - }, - { - "path": "node_modules/@xtuc/ieee754/package.json" - }, - { - "path": "node_modules/@xtuc/long/package.json" - }, - { - "path": "node_modules/p-defer/package.json" - }, - { - "path": "node_modules/empower/package.json" - }, - { - "path": "node_modules/nanomatch/package.json" - }, - { - "path": "node_modules/send/package.json" - }, - { - "path": "node_modules/send/node_modules/debug/package.json" - }, - { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" - }, - { - "path": "node_modules/send/node_modules/ms/package.json" - }, - { - "path": "node_modules/send/node_modules/mime/package.json" - }, - { - "path": "node_modules/require-directory/package.json" - }, - { - "path": "node_modules/object.assign/package.json" - }, - { - "path": "node_modules/is-npm/package.json" - }, - { - "path": "node_modules/fs-minipass/package.json" - }, - { - "path": "node_modules/browserify-des/package.json" - }, - { - "path": "node_modules/min-indent/package.json" - }, - { - "path": "node_modules/functional-red-black-tree/package.json" - }, - { - "path": "node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/fs-write-stream-atomic/package.json" - }, - { - "path": "node_modules/registry-url/package.json" - }, - { - "path": "node_modules/is-regex/package.json" - }, - { - "path": "node_modules/es-abstract/package.json" - }, - { - "path": "node_modules/querystring-es3/package.json" - }, - { - "path": "node_modules/parent-module/package.json" - }, - { - "path": "node_modules/create-ecdh/package.json" - }, - { - "path": "node_modules/map-age-cleaner/package.json" - }, - { - "path": "node_modules/hash.js/package.json" - }, - { - "path": "node_modules/signal-exit/package.json" - }, - { - "path": "node_modules/import-fresh/package.json" - }, - { - "path": "node_modules/hash-base/package.json" - }, - { - "path": "node_modules/keyv/package.json" - }, - { - "path": "node_modules/ret/package.json" - }, - { - "path": "node_modules/md5.js/package.json" - }, - { - "path": "node_modules/estraverse/package.json" - }, - { - "path": "node_modules/fast-deep-equal/package.json" - }, - { - "path": "node_modules/mute-stream/package.json" - }, - { - "path": "node_modules/power-assert-context-traversal/package.json" - }, - { - "path": "node_modules/rimraf/package.json" - }, - { - "path": "node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/get-stdin/package.json" - }, - { - "path": "node_modules/make-dir/package.json" - }, - { - "path": "node_modules/make-dir/node_modules/semver/package.json" - }, - { - "path": "node_modules/es6-promise/package.json" - }, - { - "path": "node_modules/os-tmpdir/package.json" - }, - { - "path": "node_modules/run-queue/package.json" - }, - { - "path": "node_modules/anymatch/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/is-number/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/anymatch/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/anymatch/node_modules/braces/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/anymatch/node_modules/normalize-path/package.json" - }, - { - "path": "node_modules/retry-request/package.json" - }, - { - "path": "node_modules/retry-request/node_modules/debug/package.json" - }, - { - "path": "node_modules/cli-cursor/package.json" - }, - { - "path": "node_modules/ext/package.json" - }, - { - "path": "node_modules/ext/node_modules/type/package.json" - }, - { - "path": "node_modules/is-symbol/package.json" - }, - { - "path": "node_modules/css-what/package.json" - }, - { - "path": "node_modules/punycode/package.json" - }, - { - "path": "node_modules/os-locale/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/path-key/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/execa/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/which/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/semver/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/LICENSE" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/parse.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js" - }, - { - "path": "node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js" - }, - { - "path": "node_modules/setprototypeof/package.json" - }, - { - "path": "node_modules/mixin-deep/package.json" - }, - { - "path": "node_modules/mixin-deep/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/word-wrap/package.json" - }, - { - "path": "node_modules/foreground-child/package.json" - }, - { - "path": "node_modules/has-values/package.json" - }, - { - "path": "node_modules/has-values/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/has-values/node_modules/is-number/package.json" - }, - { - "path": "node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/has-values/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/pumpify/package.json" - }, - { - "path": "node_modules/pumpify/node_modules/pump/package.json" - }, - { - "path": "node_modules/es6-map/package.json" - }, - { - "path": "node_modules/detect-file/package.json" - }, - { - "path": "node_modules/source-map-url/package.json" - }, - { - "path": "node_modules/call-signature/package.json" - }, - { - "path": "node_modules/package-json/package.json" - }, - { - "path": "node_modules/package-json/node_modules/semver/package.json" - }, - { - "path": "node_modules/css-select/package.json" - }, - { - "path": "node_modules/path-is-inside/package.json" - }, - { - "path": "node_modules/eslint-plugin-prettier/package.json" - }, - { - "path": "node_modules/p-finally/package.json" - }, - { - "path": "node_modules/inquirer/package.json" - }, - { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/acorn-jsx/package.json" - }, - { - "path": "node_modules/binary-extensions/package.json" - }, - { - "path": "node_modules/glob/package.json" - }, - { - "path": "node_modules/mocha/package.json" - }, - { - "path": "node_modules/mocha/node_modules/diff/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-name/package.json" - }, - { - "path": "node_modules/mocha/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ms/package.json" - }, - { - "path": "node_modules/mocha/node_modules/string-width/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/cliui/package.json" - }, - { - "path": "node_modules/mocha/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/mocha/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/mocha/node_modules/glob/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/mocha/node_modules/which/package.json" - }, - { - "path": "node_modules/mocha/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/mocha/node_modules/find-up/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/loud-rejection/package.json" - }, - { - "path": "node_modules/event-emitter/package.json" - }, - { - "path": "node_modules/@protobufjs/codegen/package.json" - }, - { - "path": "node_modules/@protobufjs/base64/package.json" - }, - { - "path": "node_modules/@protobufjs/utf8/package.json" - }, - { - "path": "node_modules/@protobufjs/pool/package.json" - }, - { - "path": "node_modules/@protobufjs/float/package.json" - }, - { - "path": "node_modules/@protobufjs/fetch/package.json" - }, - { - "path": "node_modules/@protobufjs/path/package.json" - }, - { - "path": "node_modules/@protobufjs/aspromise/package.json" - }, - { - "path": "node_modules/@protobufjs/inquire/package.json" - }, - { - "path": "node_modules/@protobufjs/eventemitter/package.json" - }, - { - "path": "node_modules/prr/package.json" - }, - { - "path": "node_modules/node-forge/package.json" - }, - { - "path": "node_modules/lodash.has/package.json" - }, - { - "path": "node_modules/global-modules/package.json" - }, - { - "path": "node_modules/global-modules/node_modules/global-prefix/package.json" - }, - { - "path": "node_modules/global-modules/node_modules/which/package.json" - }, - { - "path": "node_modules/des.js/package.json" - }, - { - "path": "node_modules/source-map-support/package.json" - }, - { - "path": "node_modules/source-map-support/node_modules/source-map/package.json" - }, - { - "path": "node_modules/schema-utils/package.json" - }, - { - "path": "node_modules/object-assign/package.json" - }, - { - "path": "node_modules/has-symbols/package.json" - }, - { - "path": "node_modules/find-cache-dir/package.json" - }, - { - "path": "node_modules/find-cache-dir/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/find-cache-dir/node_modules/pify/package.json" - }, - { - "path": "node_modules/find-cache-dir/node_modules/semver/package.json" - }, - { - "path": "node_modules/unique-slug/package.json" - }, - { - "path": "node_modules/espurify/package.json" - }, - { - "path": "node_modules/lodash.at/package.json" - }, - { - "path": "node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/merge-estraverse-visitors/package.json" - }, - { - "path": "node_modules/for-in/package.json" - }, - { - "path": "node_modules/to-object-path/package.json" - }, - { - "path": "node_modules/to-object-path/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/to-object-path/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/ansi-colors/package.json" - }, - { - "path": "node_modules/brorand/package.json" - }, - { - "path": "node_modules/findup-sync/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/is-number/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/findup-sync/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/findup-sync/node_modules/braces/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/findup-sync/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/p-try/package.json" - }, - { - "path": "node_modules/escope/package.json" - }, - { - "path": "node_modules/evp_bytestokey/package.json" - }, - { - "path": "node_modules/json-parse-better-errors/package.json" - }, - { - "path": "node_modules/worker-farm/package.json" - }, - { - "path": "node_modules/ieee754/package.json" - }, - { - "path": "node_modules/chokidar/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/glob-parent/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/is-number/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/braces/package.json" - }, - { - "path": "node_modules/chokidar/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/abort-controller/package.json" - }, - { - "path": "node_modules/which/package.json" - }, - { - "path": "node_modules/astral-regex/package.json" - }, - { - "path": "node_modules/escodegen/package.json" - }, - { - "path": "node_modules/escodegen/node_modules/esprima/package.json" - }, - { - "path": "node_modules/escodegen/node_modules/source-map/package.json" - }, - { - "path": "node_modules/minimist/package.json" - }, - { - "path": "node_modules/elliptic/package.json" - }, - { - "path": "node_modules/clone-response/package.json" - }, - { - "path": "node_modules/ecdsa-sig-formatter/package.json" - }, - { - "path": "node_modules/requizzle/package.json" - }, - { - "path": "node_modules/base64-js/package.json" - }, - { - "path": "node_modules/async-each/package.json" - }, - { - "path": "node_modules/pify/package.json" - }, - { - "path": "node_modules/object-keys/package.json" - }, - { - "path": "node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/deep-is/package.json" - }, - { - "path": "node_modules/fast-levenshtein/package.json" - }, - { - "path": "node_modules/urix/package.json" - }, - { - "path": "node_modules/typescript/package.json" - }, - { - "path": "node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/regex-not/package.json" - }, - { - "path": "node_modules/eslint-plugin-es/package.json" - }, - { - "path": "node_modules/eslint-plugin-es/node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" - }, - { - "path": "node_modules/util/package.json" - }, - { - "path": "node_modules/util/node_modules/inherits/package.json" - }, - { - "path": "node_modules/mem/package.json" - }, - { - "path": "node_modules/semver/package.json" - }, - { - "path": "node_modules/unique-string/package.json" - }, - { - "path": "node_modules/unique-filename/package.json" - }, - { - "path": "node_modules/decamelize/package.json" - }, - { - "path": "node_modules/node-libs-browser/package.json" - }, - { - "path": "node_modules/node-libs-browser/node_modules/punycode/package.json" - }, - { - "path": "node_modules/ajv-keywords/package.json" - }, - { - "path": "node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/is-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/arr-union/package.json" - }, - { - "path": "node_modules/acorn/package.json" - }, - { - "path": "node_modules/wide-align/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/got/package.json" - }, - { - "path": "node_modules/got/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/sprintf-js/package.json" - }, - { - "path": "node_modules/ts-loader/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/semver/package.json" - }, - { - "path": "node_modules/isarray/package.json" - }, - { - "path": "node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/strip-eof/package.json" - }, - { - "path": "node_modules/p-limit/package.json" - }, - { - "path": "node_modules/url-parse-lax/package.json" - }, - { - "path": "node_modules/gts/package.json" - }, - { - "path": "node_modules/gts/node_modules/chalk/package.json" - }, - { - "path": "node_modules/commander/package.json" - }, - { - "path": "node_modules/mimic-fn/package.json" - }, - { - "path": "node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/ini/package.json" - }, - { - "path": "node_modules/js2xmlparser/package.json" - }, - { - "path": "node_modules/spdx-exceptions/package.json" - }, - { - "path": "node_modules/external-editor/package.json" - }, - { - "path": "node_modules/power-assert-formatter/package.json" - }, - { - "path": "node_modules/domain-browser/package.json" - }, - { - "path": "node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/buffer-xor/package.json" - }, - { - "path": "node_modules/text-table/package.json" - }, - { - "path": "node_modules/domutils/package.json" - }, - { - "path": "node_modules/supports-color/package.json" - }, - { - "path": "node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/buffer/package.json" - }, - { - "path": "node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/parse5/package.json" - }, - { - "path": "node_modules/decamelize-keys/package.json" - }, - { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/empower-core/package.json" - }, - { - "path": "node_modules/is-plain-object/package.json" - }, - { - "path": "node_modules/terser-webpack-plugin/package.json" - }, - { - "path": "node_modules/terser-webpack-plugin/node_modules/source-map/package.json" - }, - { - "path": "node_modules/acorn-es7-plugin/package.json" - }, - { - "path": "node_modules/iferr/package.json" - }, - { - "path": "node_modules/figgy-pudding/package.json" - }, - { - "path": "node_modules/webpack-sources/package.json" - }, - { - "path": "node_modules/webpack-sources/node_modules/source-map/package.json" - }, - { - "path": "node_modules/p-timeout/package.json" - }, - { - "path": "node_modules/upath/package.json" - }, - { - "path": "node_modules/neo-async/package.json" - }, - { - "path": "node_modules/espree/package.json" - }, - { - "path": "node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/responselike/package.json" - }, - { - "path": "node_modules/next-tick/package.json" - }, - { - "path": "node_modules/esrecurse/package.json" - }, - { - "path": "node_modules/stream-http/package.json" - }, - { - "path": "node_modules/promise-inflight/package.json" - }, - { - "path": "node_modules/bignumber.js/package.json" - }, - { - "path": "node_modules/source-map/package.json" - }, - { - "path": "node_modules/find-up/package.json" - }, - { - "path": "node_modules/traverse/package.json" - }, - { - "path": "node_modules/es-to-primitive/package.json" - }, - { - "path": "node_modules/rc/package.json" - }, - { - "path": "node_modules/rc/node_modules/minimist/package.json" - }, - { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/uc.micro/package.json" - }, - { - "path": "node_modules/flat-cache/package.json" - }, - { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/once/package.json" - }, - { - "path": "node_modules/gtoken/package.json" - }, - { - "path": "node_modules/urlgrey/package.json" - }, - { - "path": "node_modules/convert-source-map/package.json" - }, - { - "path": "node_modules/is-date-object/package.json" - }, - { - "path": "node_modules/tslint-config-prettier/package.json" - }, - { - "path": "node_modules/import-local/package.json" - }, - { - "path": "node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/flush-write-stream/package.json" - }, - { - "path": "node_modules/braces/package.json" - }, - { - "path": "node_modules/iconv-lite/package.json" - }, - { - "path": "node_modules/json5/package.json" - }, - { - "path": "node_modules/json5/node_modules/minimist/package.json" - }, - { - "path": "node_modules/get-value/package.json" - }, - { - "path": "node_modules/is-glob/package.json" - }, - { - "path": "node_modules/furi/package.json" - }, - { - "path": "node_modules/tslib/package.json" - }, - { - "path": "node_modules/map-visit/package.json" - }, - { - "path": "node_modules/ripemd160/package.json" - }, - { - "path": "node_modules/watchpack/package.json" - }, - { - "path": "node_modules/stream-browserify/package.json" - }, - { - "path": "node_modules/markdown-it-anchor/package.json" - }, - { - "path": "node_modules/browser-stdout/package.json" - }, - { - "path": "node_modules/array-unique/package.json" - }, - { - "path": "node_modules/ajv-errors/package.json" - }, - { - "path": "node_modules/path-type/package.json" - }, - { - "path": "node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/randomfill/package.json" - }, - { - "path": "node_modules/npm-packlist/package.json" - }, - { - "path": "node_modules/copy-concurrently/package.json" - }, - { - "path": "node_modules/copy-concurrently/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/loader-runner/package.json" - }, - { - "path": "node_modules/pump/package.json" - }, - { - "path": "node_modules/process-nextick-args/package.json" - }, - { - "path": "node_modules/deep-extend/package.json" - }, - { - "path": "node_modules/resolve-url/package.json" - }, - { - "path": "node_modules/power-assert-context-reducer-ast/package.json" - }, - { - "path": "node_modules/power-assert-context-reducer-ast/node_modules/acorn/package.json" - }, - { - "path": "node_modules/type-check/package.json" - }, - { - "path": "node_modules/teeny-request/package.json" - }, - { - "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/jwa/package.json" - }, - { - "path": "node_modules/walkdir/package.json" - }, - { - "path": "node_modules/hard-rejection/package.json" - }, - { - "path": "node_modules/base/package.json" - }, - { - "path": "node_modules/base/node_modules/define-property/package.json" - }, - { - "path": "node_modules/base/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/base/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/base/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/randombytes/package.json" - }, - { - "path": "node_modules/espower-source/package.json" - }, - { - "path": "node_modules/espower-source/node_modules/acorn/package.json" - }, - { - "path": "node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/@sindresorhus/is/package.json" - }, - { - "path": "node_modules/resolve-dir/package.json" - }, - { - "path": "node_modules/resolve-dir/node_modules/global-modules/package.json" - }, - { - "path": "node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/path-exists/package.json" - }, - { - "path": "node_modules/jsdoc/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/cacheable-request/package.json" - }, - { - "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/escape-html/package.json" - }, - { - "path": "node_modules/power-assert-renderer-assertion/package.json" - }, - { - "path": "node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" - }, - { - "path": "node_modules/latest-version/package.json" - }, - { - "path": "node_modules/optionator/package.json" - }, - { - "path": "node_modules/parallel-transform/package.json" - }, - { - "path": "node_modules/slice-ansi/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/color-name/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/power-assert-renderer-comparison/package.json" - }, - { - "path": "node_modules/flatted/package.json" - }, - { - "path": "node_modules/unset-value/package.json" - }, - { - "path": "node_modules/unset-value/node_modules/has-value/package.json" - }, - { - "path": "node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" - }, - { - "path": "node_modules/unset-value/node_modules/has-values/package.json" - }, - { - "path": "node_modules/inherits/package.json" - }, - { - "path": "node_modules/depd/package.json" - }, - { - "path": "node_modules/es6-promisify/package.json" - }, - { - "path": "node_modules/long/package.json" - }, - { - "path": "node_modules/regexpp/package.json" - }, - { - "path": "node_modules/cli-width/package.json" - }, - { - "path": "node_modules/call-matcher/package.json" - }, - { - "path": "node_modules/resolve-cwd/package.json" - }, - { - "path": "node_modules/resolve-cwd/node_modules/resolve-from/package.json" - }, - { - "path": "node_modules/eslint/package.json" - }, - { - "path": "node_modules/eslint/node_modules/debug/package.json" - }, - { - "path": "node_modules/eslint/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/eslint/node_modules/path-key/package.json" - }, - { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/eslint/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/eslint/node_modules/which/package.json" - }, - { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/eslint/node_modules/semver/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" - }, - { - "path": "node_modules/npm-bundled/package.json" - }, - { - "path": "node_modules/is-wsl/package.json" - }, - { - "path": "node_modules/mdurl/package.json" - }, - { - "path": "node_modules/typedarray/package.json" - }, - { - "path": "node_modules/v8-to-istanbul/package.json" - }, - { - "path": "node_modules/espower-loader/package.json" - }, - { - "path": "node_modules/object.getownpropertydescriptors/package.json" - }, - { - "path": "node_modules/cache-base/package.json" - }, - { - "path": "node_modules/array-find-index/package.json" - }, - { - "path": "node_modules/yargs/package.json" - }, - { - "path": "node_modules/ci-info/package.json" - }, - { - "path": "node_modules/miller-rabin/package.json" - }, - { - "path": "node_modules/color-convert/package.json" - }, - { - "path": "node_modules/use/package.json" - }, - { - "path": "node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/to-arraybuffer/package.json" - }, - { - "path": "node_modules/extglob/package.json" - }, - { - "path": "node_modules/extglob/node_modules/define-property/package.json" - }, - { - "path": "node_modules/extglob/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/extglob/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/extglob/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/extglob/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/eslint-visitor-keys/package.json" - }, - { - "path": "node_modules/to-regex/package.json" - }, - { - "path": "node_modules/path-browserify/package.json" - }, - { - "path": "node_modules/agent-base/package.json" - }, - { - "path": "node_modules/repeat-string/package.json" - }, - { - "path": "node_modules/flat/package.json" - }, - { - "path": "node_modules/through2/package.json" - }, - { - "path": "node_modules/gaxios/package.json" - }, - { - "path": "node_modules/p-queue/package.json" - }, - { - "path": "node_modules/encodeurl/package.json" - }, - { - "path": "node_modules/normalize-path/package.json" - }, - { - "path": "node_modules/js-tokens/package.json" - }, - { - "path": "node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/eslint-config-prettier/package.json" - }, - { - "path": "node_modules/uri-js/package.json" - }, - { - "path": "node_modules/test-exclude/package.json" - }, - { - "path": "node_modules/safer-buffer/package.json" - }, - { - "path": "node_modules/prettier/package.json" - }, - { - "path": "node_modules/regexp.prototype.flags/package.json" - }, - { - "path": "node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/copy-descriptor/package.json" - }, - { - "path": "node_modules/@babel/code-frame/package.json" - }, - { - "path": "node_modules/@babel/highlight/package.json" - }, - { - "path": "node_modules/@babel/parser/package.json" - }, - { - "path": "node_modules/configstore/package.json" - }, - { - "path": "node_modules/configstore/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/is-plain-obj/package.json" - }, - { - "path": "node_modules/eastasianwidth/package.json" - }, - { - "path": "node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/has-yarn/package.json" - }, - { - "path": "node_modules/core-js/package.json" - }, - { - "path": "samples/analyze.v1beta2.js" - }, - { - "path": "samples/setEndpoint.js" - }, - { - "path": "samples/automlNaturalLanguageModel.js" - }, - { - "path": "samples/analyze.v1.js" - }, - { - "path": "samples/automlNaturalLanguagePredict.js" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/automlNaturalLanguageDataset.js" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/.eslintrc.yml" - }, - { - "path": "samples/automl/automlNaturalLanguageModel.js" - }, - { - "path": "samples/automl/automlNaturalLanguagePredict.js" - }, - { - "path": "samples/automl/automlNaturalLanguageDataset.js" - }, - { - "path": "samples/automl/resources/test.txt" - }, - { - "path": "samples/test/analyze.v1.test.js" - }, - { - "path": "samples/test/automlNaturalLanguage.test.js" - }, - { - "path": "samples/test/analyze.v1beta2.test.js" - }, - { - "path": "samples/test/quickstart.test.js" - }, - { - "path": "samples/test/setEndpoint.test.js" - }, - { - "path": "samples/resources/text.txt" - }, - { - "path": "samples/resources/android_text.txt" - }, - { - "path": "__pycache__/synth.cpython-36.pyc" - }, - { - "path": "smoke-test/.eslintrc.yml" - } - ] -} \ No newline at end of file From 2ea4afa37d62f6bb6879086ec67c704fedcacb05 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 27 Jan 2020 16:01:00 -0800 Subject: [PATCH 307/488] chore: regenerate synth.metadata (#352) --- packages/google-cloud-language/synth.metadata | 360 ++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 packages/google-cloud-language/synth.metadata diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata new file mode 100644 index 00000000000..a1744100c95 --- /dev/null +++ b/packages/google-cloud-language/synth.metadata @@ -0,0 +1,360 @@ +{ + "updateTime": "2020-01-24T12:23:42.923708Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "e26cab8afd19d396b929039dac5d874cf0b5336c", + "internalRef": "291240093" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.10.17" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "language", + "apiVersion": "v1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "language", + "apiVersion": "v1beta2", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + } + ], + "newFiles": [ + { + "path": ".eslintignore" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".gitignore" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".kokoro/.gitattributes" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/release/common.cfg" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".nycrc" + }, + { + "path": ".prettierignore" + }, + { + "path": ".prettierrc" + }, + { + "path": ".readme-partials.yml" + }, + { + "path": ".repo-metadata.json" + }, + { + "path": "CHANGELOG.md" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": "LICENSE" + }, + { + "path": "README.md" + }, + { + "path": "codecov.yaml" + }, + { + "path": "linkinator.config.json" + }, + { + "path": "package.json" + }, + { + "path": "protos/google/cloud/language/v1/language_service.proto" + }, + { + "path": "protos/google/cloud/language/v1beta2/language_service.proto" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "renovate.json" + }, + { + "path": "samples/.eslintrc.yml" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/analyze.v1.js" + }, + { + "path": "samples/analyze.v1beta2.js" + }, + { + "path": "samples/automl/automlNaturalLanguageDataset.js" + }, + { + "path": "samples/automl/automlNaturalLanguageModel.js" + }, + { + "path": "samples/automl/automlNaturalLanguagePredict.js" + }, + { + "path": "samples/automl/resources/test.txt" + }, + { + "path": "samples/automlNaturalLanguageDataset.js" + }, + { + "path": "samples/automlNaturalLanguageModel.js" + }, + { + "path": "samples/automlNaturalLanguagePredict.js" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/resources/android_text.txt" + }, + { + "path": "samples/resources/text.txt" + }, + { + "path": "samples/setEndpoint.js" + }, + { + "path": "samples/test/analyze.v1.test.js" + }, + { + "path": "samples/test/analyze.v1beta2.test.js" + }, + { + "path": "samples/test/automlNaturalLanguage.test.js" + }, + { + "path": "samples/test/quickstart.test.js" + }, + { + "path": "samples/test/setEndpoint.test.js" + }, + { + "path": "smoke-test/.eslintrc.yml" + }, + { + "path": "src/index.ts" + }, + { + "path": "src/v1/index.ts" + }, + { + "path": "src/v1/language_service_client.ts" + }, + { + "path": "src/v1/language_service_client_config.json" + }, + { + "path": "src/v1/language_service_proto_list.json" + }, + { + "path": "src/v1beta2/index.ts" + }, + { + "path": "src/v1beta2/language_service_client.ts" + }, + { + "path": "src/v1beta2/language_service_client_config.json" + }, + { + "path": "src/v1beta2/language_service_proto_list.json" + }, + { + "path": "synth.py" + }, + { + "path": "system-test/fixtures/sample/src/index.js" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/language_service_smoke_test.js" + }, + { + "path": "test/gapic-language_service-v1.ts" + }, + { + "path": "test/gapic-language_service-v1beta2.ts" + }, + { + "path": "test/mocha.opts" + }, + { + "path": "tsconfig.json" + }, + { + "path": "tslint.json" + }, + { + "path": "webpack.config.js" + } + ] +} \ No newline at end of file From aa91dc5fef81ac43e3c014eb24e96836eef7c127 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 28 Jan 2020 20:24:06 -0800 Subject: [PATCH 308/488] fix: enum, bytes, and Long types now accept strings (#353) * [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * fix: regenerated proto.d.ts Co-authored-by: Alexander Fenster --- .../google-cloud-language/protos/protos.d.ts | 208 +++++++++--------- packages/google-cloud-language/synth.metadata | 102 +-------- 2 files changed, 107 insertions(+), 203 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index d32873e4420..01fd3732f2b 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -180,7 +180,7 @@ export namespace google { interface IDocument { /** Document type */ - type?: (google.cloud.language.v1.Document.Type|null); + type?: (google.cloud.language.v1.Document.Type|keyof typeof google.cloud.language.v1.Document.Type|null); /** Document content */ content?: (string|null); @@ -202,7 +202,7 @@ export namespace google { constructor(properties?: google.cloud.language.v1.IDocument); /** Document type. */ - public type: google.cloud.language.v1.Document.Type; + public type: (google.cloud.language.v1.Document.Type|keyof typeof google.cloud.language.v1.Document.Type); /** Document content. */ public content: string; @@ -400,7 +400,7 @@ export namespace google { name?: (string|null); /** Entity type */ - type?: (google.cloud.language.v1.Entity.Type|null); + type?: (google.cloud.language.v1.Entity.Type|keyof typeof google.cloud.language.v1.Entity.Type|null); /** Entity metadata */ metadata?: ({ [k: string]: string }|null); @@ -428,7 +428,7 @@ export namespace google { public name: string; /** Entity type. */ - public type: google.cloud.language.v1.Entity.Type; + public type: (google.cloud.language.v1.Entity.Type|keyof typeof google.cloud.language.v1.Entity.Type); /** Entity metadata. */ public metadata: { [k: string]: string }; @@ -749,40 +749,40 @@ export namespace google { interface IPartOfSpeech { /** PartOfSpeech tag */ - tag?: (google.cloud.language.v1.PartOfSpeech.Tag|null); + tag?: (google.cloud.language.v1.PartOfSpeech.Tag|keyof typeof google.cloud.language.v1.PartOfSpeech.Tag|null); /** PartOfSpeech aspect */ - aspect?: (google.cloud.language.v1.PartOfSpeech.Aspect|null); + aspect?: (google.cloud.language.v1.PartOfSpeech.Aspect|keyof typeof google.cloud.language.v1.PartOfSpeech.Aspect|null); /** PartOfSpeech case */ - "case"?: (google.cloud.language.v1.PartOfSpeech.Case|null); + "case"?: (google.cloud.language.v1.PartOfSpeech.Case|keyof typeof google.cloud.language.v1.PartOfSpeech.Case|null); /** PartOfSpeech form */ - form?: (google.cloud.language.v1.PartOfSpeech.Form|null); + form?: (google.cloud.language.v1.PartOfSpeech.Form|keyof typeof google.cloud.language.v1.PartOfSpeech.Form|null); /** PartOfSpeech gender */ - gender?: (google.cloud.language.v1.PartOfSpeech.Gender|null); + gender?: (google.cloud.language.v1.PartOfSpeech.Gender|keyof typeof google.cloud.language.v1.PartOfSpeech.Gender|null); /** PartOfSpeech mood */ - mood?: (google.cloud.language.v1.PartOfSpeech.Mood|null); + mood?: (google.cloud.language.v1.PartOfSpeech.Mood|keyof typeof google.cloud.language.v1.PartOfSpeech.Mood|null); /** PartOfSpeech number */ - number?: (google.cloud.language.v1.PartOfSpeech.Number|null); + number?: (google.cloud.language.v1.PartOfSpeech.Number|keyof typeof google.cloud.language.v1.PartOfSpeech.Number|null); /** PartOfSpeech person */ - person?: (google.cloud.language.v1.PartOfSpeech.Person|null); + person?: (google.cloud.language.v1.PartOfSpeech.Person|keyof typeof google.cloud.language.v1.PartOfSpeech.Person|null); /** PartOfSpeech proper */ - proper?: (google.cloud.language.v1.PartOfSpeech.Proper|null); + proper?: (google.cloud.language.v1.PartOfSpeech.Proper|keyof typeof google.cloud.language.v1.PartOfSpeech.Proper|null); /** PartOfSpeech reciprocity */ - reciprocity?: (google.cloud.language.v1.PartOfSpeech.Reciprocity|null); + reciprocity?: (google.cloud.language.v1.PartOfSpeech.Reciprocity|keyof typeof google.cloud.language.v1.PartOfSpeech.Reciprocity|null); /** PartOfSpeech tense */ - tense?: (google.cloud.language.v1.PartOfSpeech.Tense|null); + tense?: (google.cloud.language.v1.PartOfSpeech.Tense|keyof typeof google.cloud.language.v1.PartOfSpeech.Tense|null); /** PartOfSpeech voice */ - voice?: (google.cloud.language.v1.PartOfSpeech.Voice|null); + voice?: (google.cloud.language.v1.PartOfSpeech.Voice|keyof typeof google.cloud.language.v1.PartOfSpeech.Voice|null); } /** Represents a PartOfSpeech. */ @@ -795,40 +795,40 @@ export namespace google { constructor(properties?: google.cloud.language.v1.IPartOfSpeech); /** PartOfSpeech tag. */ - public tag: google.cloud.language.v1.PartOfSpeech.Tag; + public tag: (google.cloud.language.v1.PartOfSpeech.Tag|keyof typeof google.cloud.language.v1.PartOfSpeech.Tag); /** PartOfSpeech aspect. */ - public aspect: google.cloud.language.v1.PartOfSpeech.Aspect; + public aspect: (google.cloud.language.v1.PartOfSpeech.Aspect|keyof typeof google.cloud.language.v1.PartOfSpeech.Aspect); /** PartOfSpeech case. */ - public case: google.cloud.language.v1.PartOfSpeech.Case; + public case: (google.cloud.language.v1.PartOfSpeech.Case|keyof typeof google.cloud.language.v1.PartOfSpeech.Case); /** PartOfSpeech form. */ - public form: google.cloud.language.v1.PartOfSpeech.Form; + public form: (google.cloud.language.v1.PartOfSpeech.Form|keyof typeof google.cloud.language.v1.PartOfSpeech.Form); /** PartOfSpeech gender. */ - public gender: google.cloud.language.v1.PartOfSpeech.Gender; + public gender: (google.cloud.language.v1.PartOfSpeech.Gender|keyof typeof google.cloud.language.v1.PartOfSpeech.Gender); /** PartOfSpeech mood. */ - public mood: google.cloud.language.v1.PartOfSpeech.Mood; + public mood: (google.cloud.language.v1.PartOfSpeech.Mood|keyof typeof google.cloud.language.v1.PartOfSpeech.Mood); /** PartOfSpeech number. */ - public number: google.cloud.language.v1.PartOfSpeech.Number; + public number: (google.cloud.language.v1.PartOfSpeech.Number|keyof typeof google.cloud.language.v1.PartOfSpeech.Number); /** PartOfSpeech person. */ - public person: google.cloud.language.v1.PartOfSpeech.Person; + public person: (google.cloud.language.v1.PartOfSpeech.Person|keyof typeof google.cloud.language.v1.PartOfSpeech.Person); /** PartOfSpeech proper. */ - public proper: google.cloud.language.v1.PartOfSpeech.Proper; + public proper: (google.cloud.language.v1.PartOfSpeech.Proper|keyof typeof google.cloud.language.v1.PartOfSpeech.Proper); /** PartOfSpeech reciprocity. */ - public reciprocity: google.cloud.language.v1.PartOfSpeech.Reciprocity; + public reciprocity: (google.cloud.language.v1.PartOfSpeech.Reciprocity|keyof typeof google.cloud.language.v1.PartOfSpeech.Reciprocity); /** PartOfSpeech tense. */ - public tense: google.cloud.language.v1.PartOfSpeech.Tense; + public tense: (google.cloud.language.v1.PartOfSpeech.Tense|keyof typeof google.cloud.language.v1.PartOfSpeech.Tense); /** PartOfSpeech voice. */ - public voice: google.cloud.language.v1.PartOfSpeech.Voice; + public voice: (google.cloud.language.v1.PartOfSpeech.Voice|keyof typeof google.cloud.language.v1.PartOfSpeech.Voice); /** * Creates a new PartOfSpeech instance using the specified properties. @@ -1041,7 +1041,7 @@ export namespace google { headTokenIndex?: (number|null); /** DependencyEdge label */ - label?: (google.cloud.language.v1.DependencyEdge.Label|null); + label?: (google.cloud.language.v1.DependencyEdge.Label|keyof typeof google.cloud.language.v1.DependencyEdge.Label|null); } /** Represents a DependencyEdge. */ @@ -1057,7 +1057,7 @@ export namespace google { public headTokenIndex: number; /** DependencyEdge label. */ - public label: google.cloud.language.v1.DependencyEdge.Label; + public label: (google.cloud.language.v1.DependencyEdge.Label|keyof typeof google.cloud.language.v1.DependencyEdge.Label); /** * Creates a new DependencyEdge instance using the specified properties. @@ -1227,7 +1227,7 @@ export namespace google { text?: (google.cloud.language.v1.ITextSpan|null); /** EntityMention type */ - type?: (google.cloud.language.v1.EntityMention.Type|null); + type?: (google.cloud.language.v1.EntityMention.Type|keyof typeof google.cloud.language.v1.EntityMention.Type|null); /** EntityMention sentiment */ sentiment?: (google.cloud.language.v1.ISentiment|null); @@ -1246,7 +1246,7 @@ export namespace google { public text?: (google.cloud.language.v1.ITextSpan|null); /** EntityMention type. */ - public type: google.cloud.language.v1.EntityMention.Type; + public type: (google.cloud.language.v1.EntityMention.Type|keyof typeof google.cloud.language.v1.EntityMention.Type); /** EntityMention sentiment. */ public sentiment?: (google.cloud.language.v1.ISentiment|null); @@ -1531,7 +1531,7 @@ export namespace google { document?: (google.cloud.language.v1.IDocument|null); /** AnalyzeSentimentRequest encodingType */ - encodingType?: (google.cloud.language.v1.EncodingType|null); + encodingType?: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType|null); } /** Represents an AnalyzeSentimentRequest. */ @@ -1547,7 +1547,7 @@ export namespace google { public document?: (google.cloud.language.v1.IDocument|null); /** AnalyzeSentimentRequest encodingType. */ - public encodingType: google.cloud.language.v1.EncodingType; + public encodingType: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType); /** * Creates a new AnalyzeSentimentRequest instance using the specified properties. @@ -1729,7 +1729,7 @@ export namespace google { document?: (google.cloud.language.v1.IDocument|null); /** AnalyzeEntitySentimentRequest encodingType */ - encodingType?: (google.cloud.language.v1.EncodingType|null); + encodingType?: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType|null); } /** Represents an AnalyzeEntitySentimentRequest. */ @@ -1745,7 +1745,7 @@ export namespace google { public document?: (google.cloud.language.v1.IDocument|null); /** AnalyzeEntitySentimentRequest encodingType. */ - public encodingType: google.cloud.language.v1.EncodingType; + public encodingType: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType); /** * Creates a new AnalyzeEntitySentimentRequest instance using the specified properties. @@ -1921,7 +1921,7 @@ export namespace google { document?: (google.cloud.language.v1.IDocument|null); /** AnalyzeEntitiesRequest encodingType */ - encodingType?: (google.cloud.language.v1.EncodingType|null); + encodingType?: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType|null); } /** Represents an AnalyzeEntitiesRequest. */ @@ -1937,7 +1937,7 @@ export namespace google { public document?: (google.cloud.language.v1.IDocument|null); /** AnalyzeEntitiesRequest encodingType. */ - public encodingType: google.cloud.language.v1.EncodingType; + public encodingType: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType); /** * Creates a new AnalyzeEntitiesRequest instance using the specified properties. @@ -2113,7 +2113,7 @@ export namespace google { document?: (google.cloud.language.v1.IDocument|null); /** AnalyzeSyntaxRequest encodingType */ - encodingType?: (google.cloud.language.v1.EncodingType|null); + encodingType?: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType|null); } /** Represents an AnalyzeSyntaxRequest. */ @@ -2129,7 +2129,7 @@ export namespace google { public document?: (google.cloud.language.v1.IDocument|null); /** AnalyzeSyntaxRequest encodingType. */ - public encodingType: google.cloud.language.v1.EncodingType; + public encodingType: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType); /** * Creates a new AnalyzeSyntaxRequest instance using the specified properties. @@ -2494,7 +2494,7 @@ export namespace google { features?: (google.cloud.language.v1.AnnotateTextRequest.IFeatures|null); /** AnnotateTextRequest encodingType */ - encodingType?: (google.cloud.language.v1.EncodingType|null); + encodingType?: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType|null); } /** Represents an AnnotateTextRequest. */ @@ -2513,7 +2513,7 @@ export namespace google { public features?: (google.cloud.language.v1.AnnotateTextRequest.IFeatures|null); /** AnnotateTextRequest encodingType. */ - public encodingType: google.cloud.language.v1.EncodingType; + public encodingType: (google.cloud.language.v1.EncodingType|keyof typeof google.cloud.language.v1.EncodingType); /** * Creates a new AnnotateTextRequest instance using the specified properties. @@ -2981,7 +2981,7 @@ export namespace google { interface IDocument { /** Document type */ - type?: (google.cloud.language.v1beta2.Document.Type|null); + type?: (google.cloud.language.v1beta2.Document.Type|keyof typeof google.cloud.language.v1beta2.Document.Type|null); /** Document content */ content?: (string|null); @@ -3003,7 +3003,7 @@ export namespace google { constructor(properties?: google.cloud.language.v1beta2.IDocument); /** Document type. */ - public type: google.cloud.language.v1beta2.Document.Type; + public type: (google.cloud.language.v1beta2.Document.Type|keyof typeof google.cloud.language.v1beta2.Document.Type); /** Document content. */ public content: string; @@ -3201,7 +3201,7 @@ export namespace google { name?: (string|null); /** Entity type */ - type?: (google.cloud.language.v1beta2.Entity.Type|null); + type?: (google.cloud.language.v1beta2.Entity.Type|keyof typeof google.cloud.language.v1beta2.Entity.Type|null); /** Entity metadata */ metadata?: ({ [k: string]: string }|null); @@ -3229,7 +3229,7 @@ export namespace google { public name: string; /** Entity type. */ - public type: google.cloud.language.v1beta2.Entity.Type; + public type: (google.cloud.language.v1beta2.Entity.Type|keyof typeof google.cloud.language.v1beta2.Entity.Type); /** Entity metadata. */ public metadata: { [k: string]: string }; @@ -3550,40 +3550,40 @@ export namespace google { interface IPartOfSpeech { /** PartOfSpeech tag */ - tag?: (google.cloud.language.v1beta2.PartOfSpeech.Tag|null); + tag?: (google.cloud.language.v1beta2.PartOfSpeech.Tag|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Tag|null); /** PartOfSpeech aspect */ - aspect?: (google.cloud.language.v1beta2.PartOfSpeech.Aspect|null); + aspect?: (google.cloud.language.v1beta2.PartOfSpeech.Aspect|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Aspect|null); /** PartOfSpeech case */ - "case"?: (google.cloud.language.v1beta2.PartOfSpeech.Case|null); + "case"?: (google.cloud.language.v1beta2.PartOfSpeech.Case|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Case|null); /** PartOfSpeech form */ - form?: (google.cloud.language.v1beta2.PartOfSpeech.Form|null); + form?: (google.cloud.language.v1beta2.PartOfSpeech.Form|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Form|null); /** PartOfSpeech gender */ - gender?: (google.cloud.language.v1beta2.PartOfSpeech.Gender|null); + gender?: (google.cloud.language.v1beta2.PartOfSpeech.Gender|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Gender|null); /** PartOfSpeech mood */ - mood?: (google.cloud.language.v1beta2.PartOfSpeech.Mood|null); + mood?: (google.cloud.language.v1beta2.PartOfSpeech.Mood|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Mood|null); /** PartOfSpeech number */ - number?: (google.cloud.language.v1beta2.PartOfSpeech.Number|null); + number?: (google.cloud.language.v1beta2.PartOfSpeech.Number|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Number|null); /** PartOfSpeech person */ - person?: (google.cloud.language.v1beta2.PartOfSpeech.Person|null); + person?: (google.cloud.language.v1beta2.PartOfSpeech.Person|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Person|null); /** PartOfSpeech proper */ - proper?: (google.cloud.language.v1beta2.PartOfSpeech.Proper|null); + proper?: (google.cloud.language.v1beta2.PartOfSpeech.Proper|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Proper|null); /** PartOfSpeech reciprocity */ - reciprocity?: (google.cloud.language.v1beta2.PartOfSpeech.Reciprocity|null); + reciprocity?: (google.cloud.language.v1beta2.PartOfSpeech.Reciprocity|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Reciprocity|null); /** PartOfSpeech tense */ - tense?: (google.cloud.language.v1beta2.PartOfSpeech.Tense|null); + tense?: (google.cloud.language.v1beta2.PartOfSpeech.Tense|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Tense|null); /** PartOfSpeech voice */ - voice?: (google.cloud.language.v1beta2.PartOfSpeech.Voice|null); + voice?: (google.cloud.language.v1beta2.PartOfSpeech.Voice|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Voice|null); } /** Represents a PartOfSpeech. */ @@ -3596,40 +3596,40 @@ export namespace google { constructor(properties?: google.cloud.language.v1beta2.IPartOfSpeech); /** PartOfSpeech tag. */ - public tag: google.cloud.language.v1beta2.PartOfSpeech.Tag; + public tag: (google.cloud.language.v1beta2.PartOfSpeech.Tag|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Tag); /** PartOfSpeech aspect. */ - public aspect: google.cloud.language.v1beta2.PartOfSpeech.Aspect; + public aspect: (google.cloud.language.v1beta2.PartOfSpeech.Aspect|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Aspect); /** PartOfSpeech case. */ - public case: google.cloud.language.v1beta2.PartOfSpeech.Case; + public case: (google.cloud.language.v1beta2.PartOfSpeech.Case|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Case); /** PartOfSpeech form. */ - public form: google.cloud.language.v1beta2.PartOfSpeech.Form; + public form: (google.cloud.language.v1beta2.PartOfSpeech.Form|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Form); /** PartOfSpeech gender. */ - public gender: google.cloud.language.v1beta2.PartOfSpeech.Gender; + public gender: (google.cloud.language.v1beta2.PartOfSpeech.Gender|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Gender); /** PartOfSpeech mood. */ - public mood: google.cloud.language.v1beta2.PartOfSpeech.Mood; + public mood: (google.cloud.language.v1beta2.PartOfSpeech.Mood|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Mood); /** PartOfSpeech number. */ - public number: google.cloud.language.v1beta2.PartOfSpeech.Number; + public number: (google.cloud.language.v1beta2.PartOfSpeech.Number|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Number); /** PartOfSpeech person. */ - public person: google.cloud.language.v1beta2.PartOfSpeech.Person; + public person: (google.cloud.language.v1beta2.PartOfSpeech.Person|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Person); /** PartOfSpeech proper. */ - public proper: google.cloud.language.v1beta2.PartOfSpeech.Proper; + public proper: (google.cloud.language.v1beta2.PartOfSpeech.Proper|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Proper); /** PartOfSpeech reciprocity. */ - public reciprocity: google.cloud.language.v1beta2.PartOfSpeech.Reciprocity; + public reciprocity: (google.cloud.language.v1beta2.PartOfSpeech.Reciprocity|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Reciprocity); /** PartOfSpeech tense. */ - public tense: google.cloud.language.v1beta2.PartOfSpeech.Tense; + public tense: (google.cloud.language.v1beta2.PartOfSpeech.Tense|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Tense); /** PartOfSpeech voice. */ - public voice: google.cloud.language.v1beta2.PartOfSpeech.Voice; + public voice: (google.cloud.language.v1beta2.PartOfSpeech.Voice|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Voice); /** * Creates a new PartOfSpeech instance using the specified properties. @@ -3842,7 +3842,7 @@ export namespace google { headTokenIndex?: (number|null); /** DependencyEdge label */ - label?: (google.cloud.language.v1beta2.DependencyEdge.Label|null); + label?: (google.cloud.language.v1beta2.DependencyEdge.Label|keyof typeof google.cloud.language.v1beta2.DependencyEdge.Label|null); } /** Represents a DependencyEdge. */ @@ -3858,7 +3858,7 @@ export namespace google { public headTokenIndex: number; /** DependencyEdge label. */ - public label: google.cloud.language.v1beta2.DependencyEdge.Label; + public label: (google.cloud.language.v1beta2.DependencyEdge.Label|keyof typeof google.cloud.language.v1beta2.DependencyEdge.Label); /** * Creates a new DependencyEdge instance using the specified properties. @@ -4028,7 +4028,7 @@ export namespace google { text?: (google.cloud.language.v1beta2.ITextSpan|null); /** EntityMention type */ - type?: (google.cloud.language.v1beta2.EntityMention.Type|null); + type?: (google.cloud.language.v1beta2.EntityMention.Type|keyof typeof google.cloud.language.v1beta2.EntityMention.Type|null); /** EntityMention sentiment */ sentiment?: (google.cloud.language.v1beta2.ISentiment|null); @@ -4047,7 +4047,7 @@ export namespace google { public text?: (google.cloud.language.v1beta2.ITextSpan|null); /** EntityMention type. */ - public type: google.cloud.language.v1beta2.EntityMention.Type; + public type: (google.cloud.language.v1beta2.EntityMention.Type|keyof typeof google.cloud.language.v1beta2.EntityMention.Type); /** EntityMention sentiment. */ public sentiment?: (google.cloud.language.v1beta2.ISentiment|null); @@ -4332,7 +4332,7 @@ export namespace google { document?: (google.cloud.language.v1beta2.IDocument|null); /** AnalyzeSentimentRequest encodingType */ - encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + encodingType?: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType|null); } /** Represents an AnalyzeSentimentRequest. */ @@ -4348,7 +4348,7 @@ export namespace google { public document?: (google.cloud.language.v1beta2.IDocument|null); /** AnalyzeSentimentRequest encodingType. */ - public encodingType: google.cloud.language.v1beta2.EncodingType; + public encodingType: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType); /** * Creates a new AnalyzeSentimentRequest instance using the specified properties. @@ -4530,7 +4530,7 @@ export namespace google { document?: (google.cloud.language.v1beta2.IDocument|null); /** AnalyzeEntitySentimentRequest encodingType */ - encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + encodingType?: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType|null); } /** Represents an AnalyzeEntitySentimentRequest. */ @@ -4546,7 +4546,7 @@ export namespace google { public document?: (google.cloud.language.v1beta2.IDocument|null); /** AnalyzeEntitySentimentRequest encodingType. */ - public encodingType: google.cloud.language.v1beta2.EncodingType; + public encodingType: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType); /** * Creates a new AnalyzeEntitySentimentRequest instance using the specified properties. @@ -4722,7 +4722,7 @@ export namespace google { document?: (google.cloud.language.v1beta2.IDocument|null); /** AnalyzeEntitiesRequest encodingType */ - encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + encodingType?: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType|null); } /** Represents an AnalyzeEntitiesRequest. */ @@ -4738,7 +4738,7 @@ export namespace google { public document?: (google.cloud.language.v1beta2.IDocument|null); /** AnalyzeEntitiesRequest encodingType. */ - public encodingType: google.cloud.language.v1beta2.EncodingType; + public encodingType: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType); /** * Creates a new AnalyzeEntitiesRequest instance using the specified properties. @@ -4914,7 +4914,7 @@ export namespace google { document?: (google.cloud.language.v1beta2.IDocument|null); /** AnalyzeSyntaxRequest encodingType */ - encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + encodingType?: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType|null); } /** Represents an AnalyzeSyntaxRequest. */ @@ -4930,7 +4930,7 @@ export namespace google { public document?: (google.cloud.language.v1beta2.IDocument|null); /** AnalyzeSyntaxRequest encodingType. */ - public encodingType: google.cloud.language.v1beta2.EncodingType; + public encodingType: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType); /** * Creates a new AnalyzeSyntaxRequest instance using the specified properties. @@ -5295,7 +5295,7 @@ export namespace google { features?: (google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures|null); /** AnnotateTextRequest encodingType */ - encodingType?: (google.cloud.language.v1beta2.EncodingType|null); + encodingType?: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType|null); } /** Represents an AnnotateTextRequest. */ @@ -5314,7 +5314,7 @@ export namespace google { public features?: (google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures|null); /** AnnotateTextRequest encodingType. */ - public encodingType: google.cloud.language.v1beta2.EncodingType; + public encodingType: (google.cloud.language.v1beta2.EncodingType|keyof typeof google.cloud.language.v1beta2.EncodingType); /** * Creates a new AnnotateTextRequest instance using the specified properties. @@ -6674,10 +6674,10 @@ export namespace google { number?: (number|null); /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); /** FieldDescriptorProto typeName */ typeName?: (string|null); @@ -6714,10 +6714,10 @@ export namespace google { public number: number; /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); /** FieldDescriptorProto typeName. */ public typeName: string; @@ -7492,7 +7492,7 @@ export namespace google { javaStringCheckUtf8?: (boolean|null); /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); /** FileOptions goPackage */ goPackage?: (string|null); @@ -7565,7 +7565,7 @@ export namespace google { public javaStringCheckUtf8: boolean; /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); /** FileOptions goPackage. */ public goPackage: string; @@ -7811,13 +7811,13 @@ export namespace google { interface IFieldOptions { /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); /** FieldOptions packed */ packed?: (boolean|null); /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); /** FieldOptions lazy */ lazy?: (boolean|null); @@ -7845,13 +7845,13 @@ export namespace google { constructor(properties?: google.protobuf.IFieldOptions); /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); /** FieldOptions packed. */ public packed: boolean; /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); /** FieldOptions lazy. */ public lazy: boolean; @@ -8350,7 +8350,7 @@ export namespace google { deprecated?: (boolean|null); /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); /** MethodOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -8375,7 +8375,7 @@ export namespace google { public deprecated: boolean; /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); /** MethodOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -8471,16 +8471,16 @@ export namespace google { identifierValue?: (string|null); /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|null); + positiveIntValue?: (number|Long|string|null); /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|null); + negativeIntValue?: (number|Long|string|null); /** UninterpretedOption doubleValue */ doubleValue?: (number|null); /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); + stringValue?: (Uint8Array|string|null); /** UninterpretedOption aggregateValue */ aggregateValue?: (string|null); @@ -8502,16 +8502,16 @@ export namespace google { public identifierValue: string; /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long); + public positiveIntValue: (number|Long|string); /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long); + public negativeIntValue: (number|Long|string); /** UninterpretedOption doubleValue. */ public doubleValue: number; /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; + public stringValue: (Uint8Array|string); /** UninterpretedOption aggregateValue. */ public aggregateValue: string; @@ -9098,7 +9098,7 @@ export namespace google { interface ITimestamp { /** Timestamp seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Timestamp nanos */ nanos?: (number|null); @@ -9114,7 +9114,7 @@ export namespace google { constructor(properties?: google.protobuf.ITimestamp); /** Timestamp seconds. */ - public seconds: (number|Long); + public seconds: (number|Long|string); /** Timestamp nanos. */ public nanos: number; diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index a1744100c95..d40ae549c1b 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2020-01-24T12:23:42.923708Z", + "updateTime": "2020-01-29T04:11:42.726010Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e26cab8afd19d396b929039dac5d874cf0b5336c", - "internalRef": "291240093" + "sha": "cf3b61102ed5f36b827bc82ec39be09525f018c8", + "internalRef": "292034635" } }, { @@ -59,15 +59,9 @@ { "path": ".github/release-please.yml" }, - { - "path": ".gitignore" - }, { "path": ".jsdoc.js" }, - { - "path": ".kokoro/.gitattributes" - }, { "path": ".kokoro/common.cfg" }, @@ -146,9 +140,6 @@ { "path": ".kokoro/publish.sh" }, - { - "path": ".kokoro/release/common.cfg" - }, { "path": ".kokoro/release/docs.cfg" }, @@ -182,15 +173,6 @@ { "path": ".prettierrc" }, - { - "path": ".readme-partials.yml" - }, - { - "path": ".repo-metadata.json" - }, - { - "path": "CHANGELOG.md" - }, { "path": "CODE_OF_CONDUCT.md" }, @@ -209,9 +191,6 @@ { "path": "linkinator.config.json" }, - { - "path": "package.json" - }, { "path": "protos/google/cloud/language/v1/language_service.proto" }, @@ -230,75 +209,9 @@ { "path": "renovate.json" }, - { - "path": "samples/.eslintrc.yml" - }, { "path": "samples/README.md" }, - { - "path": "samples/analyze.v1.js" - }, - { - "path": "samples/analyze.v1beta2.js" - }, - { - "path": "samples/automl/automlNaturalLanguageDataset.js" - }, - { - "path": "samples/automl/automlNaturalLanguageModel.js" - }, - { - "path": "samples/automl/automlNaturalLanguagePredict.js" - }, - { - "path": "samples/automl/resources/test.txt" - }, - { - "path": "samples/automlNaturalLanguageDataset.js" - }, - { - "path": "samples/automlNaturalLanguageModel.js" - }, - { - "path": "samples/automlNaturalLanguagePredict.js" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/resources/android_text.txt" - }, - { - "path": "samples/resources/text.txt" - }, - { - "path": "samples/setEndpoint.js" - }, - { - "path": "samples/test/analyze.v1.test.js" - }, - { - "path": "samples/test/analyze.v1beta2.test.js" - }, - { - "path": "samples/test/automlNaturalLanguage.test.js" - }, - { - "path": "samples/test/quickstart.test.js" - }, - { - "path": "samples/test/setEndpoint.test.js" - }, - { - "path": "smoke-test/.eslintrc.yml" - }, - { - "path": "src/index.ts" - }, { "path": "src/v1/index.ts" }, @@ -323,9 +236,6 @@ { "path": "src/v1beta2/language_service_proto_list.json" }, - { - "path": "synth.py" - }, { "path": "system-test/fixtures/sample/src/index.js" }, @@ -335,18 +245,12 @@ { "path": "system-test/install.ts" }, - { - "path": "system-test/language_service_smoke_test.js" - }, { "path": "test/gapic-language_service-v1.ts" }, { "path": "test/gapic-language_service-v1beta2.ts" }, - { - "path": "test/mocha.opts" - }, { "path": "tsconfig.json" }, From 81fc7429048237461e03dd22f9b4e743927ccad1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 30 Jan 2020 16:34:19 +0100 Subject: [PATCH 309/488] chore(deps): update dependency @types/mocha to v7 --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f1acebe9e21..059d96a814f 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -47,7 +47,7 @@ "google-gax": "^1.9.0" }, "devDependencies": { - "@types/mocha": "^5.2.5", + "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", "c8": "^7.0.0", "codecov": "^3.0.2", From f59b3f802e02421a78c59ff296fec15acbc4446e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2020 15:15:36 -0800 Subject: [PATCH 310/488] chore: release 3.7.1 (#354) --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 68a24d1aa18..52c1cea2adc 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.7.1](https://www.github.com/googleapis/nodejs-language/compare/v3.7.0...v3.7.1) (2020-01-29) + + +### Bug Fixes + +* enum, bytes, and Long types now accept strings ([#353](https://www.github.com/googleapis/nodejs-language/issues/353)) ([bc20af5](https://www.github.com/googleapis/nodejs-language/commit/bc20af562dd29a0a1b3663e40062e70d07760185)) + ## [3.7.0](https://www.github.com/googleapis/nodejs-language/compare/v3.6.3...v3.7.0) (2020-01-03) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 059d96a814f..6472b033a86 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.7.0", + "version": "3.7.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index be1c8074d29..e45fbf72699 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.7.0", + "@google-cloud/language": "^3.7.1", "@google-cloud/storage": "^4.0.0", "yargs": "^15.0.0" }, From c0b3e714fb31b2e485bd0f016e6c131650021d79 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 17:22:45 -0800 Subject: [PATCH 311/488] chore: skip img.shields.io in docs test --- packages/google-cloud-language/linkinator.config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/linkinator.config.json b/packages/google-cloud-language/linkinator.config.json index d780d6bfff5..b555215ca02 100644 --- a/packages/google-cloud-language/linkinator.config.json +++ b/packages/google-cloud-language/linkinator.config.json @@ -2,6 +2,7 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com" + "www.googleapis.com", + "img.shields.io" ] } From 0e88c0a3156f2a4b65c2f1015a27a59fa7738777 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Feb 2020 18:56:08 -0800 Subject: [PATCH 312/488] test: modernize mocha config (#356) --- packages/google-cloud-language/.mocharc.json | 5 +++++ packages/google-cloud-language/package.json | 2 -- packages/google-cloud-language/test/mocha.opts | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-language/.mocharc.json delete mode 100644 packages/google-cloud-language/test/mocha.opts diff --git a/packages/google-cloud-language/.mocharc.json b/packages/google-cloud-language/.mocharc.json new file mode 100644 index 00000000000..670c5e2c24b --- /dev/null +++ b/packages/google-cloud-language/.mocharc.json @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6472b033a86..3bddaaf6d8d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -56,7 +56,6 @@ "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.0", "gts": "^1.0.0", - "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", @@ -64,7 +63,6 @@ "mocha": "^7.0.0", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", - "power-assert": "^1.6.0", "prettier": "^1.11.1", "ts-loader": "^6.2.1", "typescript": "^3.7.0", diff --git a/packages/google-cloud-language/test/mocha.opts b/packages/google-cloud-language/test/mocha.opts deleted file mode 100644 index 8751e7bae37..00000000000 --- a/packages/google-cloud-language/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require intelli-espower-loader ---timeout 10000 ---throw-deprecation From 35aeca351ed1575f37d16ebfce6da6dbf97ffda9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 7 Feb 2020 10:29:20 -0800 Subject: [PATCH 313/488] chore: updated .gitignore --- packages/google-cloud-language/.gitignore | 7 +- packages/google-cloud-language/synth.metadata | 233 +----------------- 2 files changed, 9 insertions(+), 231 deletions(-) diff --git a/packages/google-cloud-language/.gitignore b/packages/google-cloud-language/.gitignore index dd48b9d7f36..5d32b23782f 100644 --- a/packages/google-cloud-language/.gitignore +++ b/packages/google-cloud-language/.gitignore @@ -1,13 +1,14 @@ **/*.log **/node_modules .coverage +coverage .nyc_output docs/ out/ +build/ system-test/secrets.js system-test/*key.json *.lock -package-lock.json -__pycache__/ .DS_Store -build/ +package-lock.json +__pycache__ diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index d40ae549c1b..1bc5a57b873 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,19 +1,20 @@ { - "updateTime": "2020-01-29T04:11:42.726010Z", + "updateTime": "2020-02-07T12:26:14.137486Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cf3b61102ed5f36b827bc82ec39be09525f018c8", - "internalRef": "292034635" + "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", + "internalRef": "293710856", + "log": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\n" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ], @@ -36,229 +37,5 @@ "generator": "gapic-generator-typescript" } } - ], - "newFiles": [ - { - "path": ".eslintignore" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".jsdoc.js" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".nycrc" - }, - { - "path": ".prettierignore" - }, - { - "path": ".prettierrc" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": "LICENSE" - }, - { - "path": "README.md" - }, - { - "path": "codecov.yaml" - }, - { - "path": "linkinator.config.json" - }, - { - "path": "protos/google/cloud/language/v1/language_service.proto" - }, - { - "path": "protos/google/cloud/language/v1beta2/language_service.proto" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.json" - }, - { - "path": "renovate.json" - }, - { - "path": "samples/README.md" - }, - { - "path": "src/v1/index.ts" - }, - { - "path": "src/v1/language_service_client.ts" - }, - { - "path": "src/v1/language_service_client_config.json" - }, - { - "path": "src/v1/language_service_proto_list.json" - }, - { - "path": "src/v1beta2/index.ts" - }, - { - "path": "src/v1beta2/language_service_client.ts" - }, - { - "path": "src/v1beta2/language_service_client_config.json" - }, - { - "path": "src/v1beta2/language_service_proto_list.json" - }, - { - "path": "system-test/fixtures/sample/src/index.js" - }, - { - "path": "system-test/fixtures/sample/src/index.ts" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "test/gapic-language_service-v1.ts" - }, - { - "path": "test/gapic-language_service-v1beta2.ts" - }, - { - "path": "tsconfig.json" - }, - { - "path": "tslint.json" - }, - { - "path": "webpack.config.js" - } ] } \ No newline at end of file From bfe4065d4debcad5fee776c1ed9bd5d31450fabe Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Feb 2020 18:04:58 +0100 Subject: [PATCH 314/488] chore(deps): update dependency linkinator to v2 --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 3bddaaf6d8d..0727aab75c3 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -59,7 +59,7 @@ "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", + "linkinator": "^2.0.0", "mocha": "^7.0.0", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", From b9582b3cca1694f3743997d7f7f9a77e35e06096 Mon Sep 17 00:00:00 2001 From: Eric Schmidt Date: Mon, 10 Feb 2020 11:32:46 -0800 Subject: [PATCH 315/488] fix: adds encodingType to analyzeSyntax* sampless (#364) This adds the encodingType field to requests to the analyze-syntax method of the Natural Language API. The pull request updates the following region tags: language_syntax_gcs language_syntax_text --- packages/google-cloud-language/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-language/.gitignore b/packages/google-cloud-language/.gitignore index 5d32b23782f..1626055c5db 100644 --- a/packages/google-cloud-language/.gitignore +++ b/packages/google-cloud-language/.gitignore @@ -12,3 +12,5 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ +.vscode +*.code-workspace \ No newline at end of file From d4a3aa1d210a6b8635c23f3b8749f28cdab2c472 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2020 12:55:16 -0800 Subject: [PATCH 316/488] chore: release 3.7.2 (#366) --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 52c1cea2adc..9c88bf77bff 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [3.7.2](https://www.github.com/googleapis/nodejs-language/compare/v3.7.1...v3.7.2) (2020-02-10) + + +### Bug Fixes + +* adds encodingType to analyzeSyntax* sampless ([#364](https://www.github.com/googleapis/nodejs-language/issues/364)) ([5bb849a](https://www.github.com/googleapis/nodejs-language/commit/5bb849a3a563f4d138e280b87a5b5ae1069e7a00)) + ### [3.7.1](https://www.github.com/googleapis/nodejs-language/compare/v3.7.0...v3.7.1) (2020-01-29) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 0727aab75c3..181928ec0c4 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.7.1", + "version": "3.7.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index e45fbf72699..e00c4960673 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.7.1", + "@google-cloud/language": "^3.7.2", "@google-cloud/storage": "^4.0.0", "yargs": "^15.0.0" }, From 5798cb52bfccaae50a00d4bb81088e3cb1e018d4 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 11 Feb 2020 22:34:42 -0800 Subject: [PATCH 317/488] build: add GitHub actions config for unit tests * build: add GitHub actions config for unit tests * chore: link root directory before linting * chore: also need to npm i --- packages/google-cloud-language/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 181928ec0c4..8e52a3ed38e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -41,7 +41,8 @@ "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "predocs-test": "npm run docs", - "prepare": "npm run compile" + "prepare": "npm run compile", + "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { "google-gax": "^1.9.0" From c7890d73b8c8606185c7fab7dc832163693ee3d2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 17 Feb 2020 09:09:11 -0800 Subject: [PATCH 318/488] chore: update gitignore (#369) --- packages/google-cloud-language/.gitignore | 2 -- packages/google-cloud-language/synth.metadata | 22 +++++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-language/.gitignore b/packages/google-cloud-language/.gitignore index 1626055c5db..5d32b23782f 100644 --- a/packages/google-cloud-language/.gitignore +++ b/packages/google-cloud-language/.gitignore @@ -12,5 +12,3 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ -.vscode -*.code-workspace \ No newline at end of file diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 1bc5a57b873..b0676675a7e 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,13 +1,27 @@ { - "updateTime": "2020-02-07T12:26:14.137486Z", + "updateTime": "2020-02-14T12:26:06.111347Z", "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/nodejs-language.git", + "sha": "9d871fedac23e022c5c2607c4909e0bff259af84" + } + }, + { + "git": { + "name": "synthtool", + "remote": "rpc://devrel/cloud/libraries/tools/autosynth", + "sha": "dd7cd93888cbeb1d4c56a1ca814491c7813160e8" + } + }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", - "internalRef": "293710856", - "log": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\n" + "sha": "5169f46d9f792e2934d9fa25c36d0515b4fd0024", + "internalRef": "295026522", + "log": "5169f46d9f792e2934d9fa25c36d0515b4fd0024\nAdded cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295026522\n\n56b55aa8818cd0a532a7d779f6ef337ba809ccbd\nFix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource.\n\nPiperOrigin-RevId: 294931650\n\n0646bc775203077226c2c34d3e4d50cc4ec53660\nRemove unnecessary languages from bigquery-related artman configuration files.\n\nPiperOrigin-RevId: 294809380\n\n8b78aa04382e3d4147112ad6d344666771bb1909\nUpdate backend.proto for schemes and protocol\n\nPiperOrigin-RevId: 294788800\n\n80b8f8b3de2359831295e24e5238641a38d8488f\nAdds artman config files for bigquerystorage endpoints v1beta2, v1alpha2, v1\n\nPiperOrigin-RevId: 294763931\n\n2c17ac33b226194041155bb5340c3f34733f1b3a\nAdd parameter to sample generated for UpdateInstance. Related to https://github.com/googleapis/python-redis/issues/4\n\nPiperOrigin-RevId: 294734008\n\nd5e8a8953f2acdfe96fb15e85eb2f33739623957\nMove bigquery datatransfer to gapic v2.\n\nPiperOrigin-RevId: 294703703\n\nefd36705972cfcd7d00ab4c6dfa1135bafacd4ae\nfix: Add two annotations that we missed.\n\nPiperOrigin-RevId: 294664231\n\n8a36b928873ff9c05b43859b9d4ea14cd205df57\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1beta2).\n\nPiperOrigin-RevId: 294459768\n\nc7a3caa2c40c49f034a3c11079dd90eb24987047\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1).\n\nPiperOrigin-RevId: 294456889\n\n5006247aa157e59118833658084345ee59af7c09\nFix: Make deprecated fields optional\nFix: Deprecate SetLoggingServiceRequest.zone in line with the comments\nFeature: Add resource name method signatures where appropriate\n\nPiperOrigin-RevId: 294383128\n\neabba40dac05c5cbe0fca3a35761b17e372036c4\nFix: C# and PHP package/namespace capitalization for BigQuery Storage v1.\n\nPiperOrigin-RevId: 294382444\n\nf8d9a858a7a55eba8009a23aa3f5cc5fe5e88dde\nfix: artman configuration file for bigtable-admin\n\nPiperOrigin-RevId: 294322616\n\n0f29555d1cfcf96add5c0b16b089235afbe9b1a9\nAPI definition for (not-yet-launched) GCS gRPC.\n\nPiperOrigin-RevId: 294321472\n\nfcc86bee0e84dc11e9abbff8d7c3529c0626f390\nfix: Bigtable Admin v2\n\nChange LRO metadata from PartialUpdateInstanceMetadata\nto UpdateInstanceMetadata. (Otherwise, it will not build.)\n\nPiperOrigin-RevId: 294264582\n\n6d9361eae2ebb3f42d8c7ce5baf4bab966fee7c0\nrefactor: Add annotations to Bigtable Admin v2.\n\nPiperOrigin-RevId: 294243406\n\nad7616f3fc8e123451c8b3a7987bc91cea9e6913\nFix: Resource type in CreateLogMetricRequest should use logging.googleapis.com.\nFix: ListLogEntries should have a method signature for convenience of calling it.\n\nPiperOrigin-RevId: 294222165\n\n63796fcbb08712676069e20a3e455c9f7aa21026\nFix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey.\n\nPiperOrigin-RevId: 294176658\n\ne7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\n" } }, { From 738ab82fd37913de08fa542341d1e1d7e38938bd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 Feb 2020 21:34:53 +0100 Subject: [PATCH 319/488] chore(deps): update dependency uuid to v7 --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index e00c4960673..4099cd351c8 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -24,6 +24,6 @@ "devDependencies": { "chai": "^4.2.0", "mocha": "^7.0.0", - "uuid": "^3.2.1" + "uuid": "^7.0.0" } } From c2bcccef2019760dd7cc04132ecf5dd6bebc28d5 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Wed, 26 Feb 2020 15:36:52 -0800 Subject: [PATCH 320/488] feat: export protos in src/index.ts --- packages/google-cloud-language/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-language/src/index.ts b/packages/google-cloud-language/src/index.ts index c7557cf407c..99569d71493 100644 --- a/packages/google-cloud-language/src/index.ts +++ b/packages/google-cloud-language/src/index.ts @@ -24,3 +24,5 @@ export {v1, v1beta2, LanguageServiceClient}; // For compatibility with JavaScript libraries we need to provide this default export: // tslint:disable-next-line no-default-export export default {v1, v1beta2, LanguageServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; From c120555b6b36bd4b54a19de8761208d4e506f9af Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 27 Feb 2020 11:53:52 -0800 Subject: [PATCH 321/488] chore: update jsdoc.js (#378) --- packages/google-cloud-language/.jsdoc.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index cba7b2d6ed4..8141f34ee31 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -36,11 +36,14 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2018 Google, LLC.', + copyright: 'Copyright 2019 Google, LLC.', includeDate: false, sourceFiles: false, systemName: '@google-cloud/language', - theme: 'lumen' + theme: 'lumen', + default: { + "outputSourceFiles": false + } }, markdown: { idInHeadings: true From b74df952cc56debea3ccb910a785c968649d7598 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 27 Feb 2020 21:42:24 -0800 Subject: [PATCH 322/488] chore: correct .jsdoc.js protos and double quotes (#380) --- packages/google-cloud-language/.jsdoc.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index 8141f34ee31..6447bdc0e65 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -31,7 +31,8 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'build/src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, @@ -42,7 +43,7 @@ module.exports = { systemName: '@google-cloud/language', theme: 'lumen', default: { - "outputSourceFiles": false + outputSourceFiles: false } }, markdown: { From f956b7a1cae5e151ced3b7e1d42fa2c2450b80c2 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Fri, 28 Feb 2020 16:33:12 -0800 Subject: [PATCH 323/488] chore: update jsdoc with macro license (#383) --- packages/google-cloud-language/.jsdoc.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index 6447bdc0e65..606ea06c511 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. // +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** 'use strict'; From 8323de838dc6a8eaf05f40d0cf8d38073ff721e3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2020 00:08:10 +0000 Subject: [PATCH 324/488] chore: release 3.8.0 (#381) :robot: I have created a release \*beep\* \*boop\* --- ## [3.8.0](https://www.github.com/googleapis/nodejs-language/compare/v3.7.2...v3.8.0) (2020-02-28) ### Features * export protos in src/index.ts ([482fb10](https://www.github.com/googleapis/nodejs-language/commit/482fb10bc1d4f01bd3de38a0301cda2a2efb491d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 9c88bf77bff..1d1cbd5c5c3 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [3.8.0](https://www.github.com/googleapis/nodejs-language/compare/v3.7.2...v3.8.0) (2020-02-28) + + +### Features + +* export protos in src/index.ts ([482fb10](https://www.github.com/googleapis/nodejs-language/commit/482fb10bc1d4f01bd3de38a0301cda2a2efb491d)) + ### [3.7.2](https://www.github.com/googleapis/nodejs-language/compare/v3.7.1...v3.7.2) (2020-02-10) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 8e52a3ed38e..5e4f4b3a7fa 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.7.2", + "version": "3.8.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 4099cd351c8..54604d849e2 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^1.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.7.2", + "@google-cloud/language": "^3.8.0", "@google-cloud/storage": "^4.0.0", "yargs": "^15.0.0" }, From c06189edddc59351076330a70a07d20fae6911ee Mon Sep 17 00:00:00 2001 From: "gcf-merge-on-green[bot]" <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2020 00:08:22 +0000 Subject: [PATCH 325/488] feat: deferred client initialization (#384) This PR includes changes from https://github.com/googleapis/gapic-generator-typescript/pull/317 that will move the asynchronous initialization and authentication from the client constructor to an `initialize()` method. This method will be automatically called when the first RPC call is performed. The client library usage has not changed, there is no need to update any code. If you want to make sure the client is authenticated _before_ the first RPC call, you can do ```js await client.initialize(); ``` manually before calling any client method. --- .../src/v1/language_service_client.ts | 73 ++++++++++++++----- .../src/v1beta2/language_service_client.ts | 73 ++++++++++++++----- packages/google-cloud-language/synth.metadata | 22 +----- .../test/gapic-language_service-v1.ts | 40 ++++++++++ .../test/gapic-language_service-v1beta2.ts | 40 ++++++++++ 5 files changed, 190 insertions(+), 58 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index a230f6d010a..47cfc5733fd 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -41,8 +41,13 @@ export class LanguageServiceClient { private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; - languageServiceStub: Promise<{[name: string]: Function}>; + languageServiceStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of LanguageServiceClient. @@ -66,8 +71,6 @@ export class LanguageServiceClient { * app is running in an environment which supports * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. - * @param {function} [options.promise] - Custom promise module to use instead - * of native Promises. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. */ @@ -97,25 +100,28 @@ export class LanguageServiceClient { // If we are in browser, we are already using fallback because of the // "browser" field in package.json. // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = (this.constructor as typeof LanguageServiceClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { - clientHeader.push(`gl-web/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -131,12 +137,12 @@ export class LanguageServiceClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.cloud.language.v1.LanguageService', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -147,17 +153,35 @@ export class LanguageServiceClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this._innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.languageServiceStub) { + return this.languageServiceStub; + } // Put together the "service stub" for // google.cloud.language.v1.LanguageService. - this.languageServiceStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.languageServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.cloud.language.v1.LanguageService' ) : // tslint:disable-next-line no-any - (protos as any).google.cloud.language.v1.LanguageService, - opts + (this._protos as any).google.cloud.language.v1.LanguageService, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -184,9 +208,9 @@ export class LanguageServiceClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -200,6 +224,8 @@ export class LanguageServiceClient { return apiCall(argument, callOptions, callback); }; } + + return this.languageServiceStub; } /** @@ -320,6 +346,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( @@ -389,6 +416,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( @@ -415,7 +443,7 @@ export class LanguageServiceClient { > ): void; /** - * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes + * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes * sentiment associated with each entity and its mentions. * * @param {Object} request @@ -465,6 +493,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.analyzeEntitySentiment( request, options, @@ -538,6 +567,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( @@ -602,6 +632,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.classifyText(request, options, callback); } annotateText( @@ -671,6 +702,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.annotateText(request, options, callback); } @@ -680,8 +712,9 @@ export class LanguageServiceClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.languageServiceStub.then(stub => { + return this.languageServiceStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index c8898519062..ea09d01c34e 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -41,8 +41,13 @@ export class LanguageServiceClient { private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; - languageServiceStub: Promise<{[name: string]: Function}>; + languageServiceStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of LanguageServiceClient. @@ -66,8 +71,6 @@ export class LanguageServiceClient { * app is running in an environment which supports * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. - * @param {function} [options.promise] - Custom promise module to use instead - * of native Promises. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. */ @@ -97,25 +100,28 @@ export class LanguageServiceClient { // If we are in browser, we are already using fallback because of the // "browser" field in package.json. // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = (this.constructor as typeof LanguageServiceClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { - clientHeader.push(`gl-web/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -131,12 +137,12 @@ export class LanguageServiceClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.cloud.language.v1beta2.LanguageService', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -147,17 +153,35 @@ export class LanguageServiceClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this._innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.languageServiceStub) { + return this.languageServiceStub; + } // Put together the "service stub" for // google.cloud.language.v1beta2.LanguageService. - this.languageServiceStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.languageServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.cloud.language.v1beta2.LanguageService' ) : // tslint:disable-next-line no-any - (protos as any).google.cloud.language.v1beta2.LanguageService, - opts + (this._protos as any).google.cloud.language.v1beta2.LanguageService, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -184,9 +208,9 @@ export class LanguageServiceClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -200,6 +224,8 @@ export class LanguageServiceClient { return apiCall(argument, callOptions, callback); }; } + + return this.languageServiceStub; } /** @@ -329,6 +355,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( @@ -406,6 +433,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( @@ -432,7 +460,7 @@ export class LanguageServiceClient { > ): void; /** - * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes + * Finds entities, similar to {@link google.cloud.language.v1beta2.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes * sentiment associated with each entity and its mentions. * * @param {Object} request @@ -482,6 +510,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.analyzeEntitySentiment( request, options, @@ -563,6 +592,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( @@ -636,6 +666,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.classifyText(request, options, callback); } annotateText( @@ -714,6 +745,7 @@ export class LanguageServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.annotateText(request, options, callback); } @@ -723,8 +755,9 @@ export class LanguageServiceClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.languageServiceStub.then(stub => { + return this.languageServiceStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index b0676675a7e..458b0a750f5 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,27 +1,13 @@ { - "updateTime": "2020-02-14T12:26:06.111347Z", + "updateTime": "2020-03-05T23:10:39.769777Z", "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "9d871fedac23e022c5c2607c4909e0bff259af84" - } - }, - { - "git": { - "name": "synthtool", - "remote": "rpc://devrel/cloud/libraries/tools/autosynth", - "sha": "dd7cd93888cbeb1d4c56a1ca814491c7813160e8" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5169f46d9f792e2934d9fa25c36d0515b4fd0024", - "internalRef": "295026522", - "log": "5169f46d9f792e2934d9fa25c36d0515b4fd0024\nAdded cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295026522\n\n56b55aa8818cd0a532a7d779f6ef337ba809ccbd\nFix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource.\n\nPiperOrigin-RevId: 294931650\n\n0646bc775203077226c2c34d3e4d50cc4ec53660\nRemove unnecessary languages from bigquery-related artman configuration files.\n\nPiperOrigin-RevId: 294809380\n\n8b78aa04382e3d4147112ad6d344666771bb1909\nUpdate backend.proto for schemes and protocol\n\nPiperOrigin-RevId: 294788800\n\n80b8f8b3de2359831295e24e5238641a38d8488f\nAdds artman config files for bigquerystorage endpoints v1beta2, v1alpha2, v1\n\nPiperOrigin-RevId: 294763931\n\n2c17ac33b226194041155bb5340c3f34733f1b3a\nAdd parameter to sample generated for UpdateInstance. Related to https://github.com/googleapis/python-redis/issues/4\n\nPiperOrigin-RevId: 294734008\n\nd5e8a8953f2acdfe96fb15e85eb2f33739623957\nMove bigquery datatransfer to gapic v2.\n\nPiperOrigin-RevId: 294703703\n\nefd36705972cfcd7d00ab4c6dfa1135bafacd4ae\nfix: Add two annotations that we missed.\n\nPiperOrigin-RevId: 294664231\n\n8a36b928873ff9c05b43859b9d4ea14cd205df57\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1beta2).\n\nPiperOrigin-RevId: 294459768\n\nc7a3caa2c40c49f034a3c11079dd90eb24987047\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1).\n\nPiperOrigin-RevId: 294456889\n\n5006247aa157e59118833658084345ee59af7c09\nFix: Make deprecated fields optional\nFix: Deprecate SetLoggingServiceRequest.zone in line with the comments\nFeature: Add resource name method signatures where appropriate\n\nPiperOrigin-RevId: 294383128\n\neabba40dac05c5cbe0fca3a35761b17e372036c4\nFix: C# and PHP package/namespace capitalization for BigQuery Storage v1.\n\nPiperOrigin-RevId: 294382444\n\nf8d9a858a7a55eba8009a23aa3f5cc5fe5e88dde\nfix: artman configuration file for bigtable-admin\n\nPiperOrigin-RevId: 294322616\n\n0f29555d1cfcf96add5c0b16b089235afbe9b1a9\nAPI definition for (not-yet-launched) GCS gRPC.\n\nPiperOrigin-RevId: 294321472\n\nfcc86bee0e84dc11e9abbff8d7c3529c0626f390\nfix: Bigtable Admin v2\n\nChange LRO metadata from PartialUpdateInstanceMetadata\nto UpdateInstanceMetadata. (Otherwise, it will not build.)\n\nPiperOrigin-RevId: 294264582\n\n6d9361eae2ebb3f42d8c7ce5baf4bab966fee7c0\nrefactor: Add annotations to Bigtable Admin v2.\n\nPiperOrigin-RevId: 294243406\n\nad7616f3fc8e123451c8b3a7987bc91cea9e6913\nFix: Resource type in CreateLogMetricRequest should use logging.googleapis.com.\nFix: ListLogEntries should have a method signature for convenience of calling it.\n\nPiperOrigin-RevId: 294222165\n\n63796fcbb08712676069e20a3e455c9f7aa21026\nFix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey.\n\nPiperOrigin-RevId: 294176658\n\ne7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\n" + "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", + "internalRef": "299181282", + "log": "f0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\nf077632ba7fee588922d9e8717ee272039be126d\nfirestore: add update_transform\n\nPiperOrigin-RevId: 297405063\n\n0aba1900ffef672ec5f0da677cf590ee5686e13b\ncluster: use square brace for cross-reference\n\nPiperOrigin-RevId: 297204568\n\n5dac2da18f6325cbaed54603c43f0667ecd50247\nRestore retry params in gapic config because securitycenter has non-standard default retry params.\nRestore a few retry codes for some idempotent methods.\n\nPiperOrigin-RevId: 297196720\n\n1eb61455530252bba8b2c8d4bc9832960e5a56f6\npubsub: v1 replace IAM HTTP rules\n\nPiperOrigin-RevId: 297188590\n\n80b2d25f8d43d9d47024ff06ead7f7166548a7ba\nDialogflow weekly v2/v2beta1 library update:\n - updates to mega agent api\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297187629\n\n0b1876b35e98f560f9c9ca9797955f020238a092\nUse an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions.\n\nprotoc-docs-plugin >=0.4.0 (see commit https://github.com/googleapis/protoc-docs-plugin/commit/979f03ede6678c487337f3d7e88bae58df5207af) is incompatible with protobuf 3.9.1.\n\nPiperOrigin-RevId: 296986742\n\n1e47e676cddbbd8d93f19ba0665af15b5532417e\nFix: Restore a method signature for UpdateCluster\n\nPiperOrigin-RevId: 296901854\n\n7f910bcc4fc4704947ccfd3ceed015d16b9e00c2\nUpdate Dataproc v1beta2 client.\n\nPiperOrigin-RevId: 296451205\n\nde287524405a3dce124d301634731584fc0432d7\nFix: Reinstate method signatures that had been missed off some RPCs\nFix: Correct resource types for two fields\n\nPiperOrigin-RevId: 296435091\n\ne5bc9566ae057fb4c92f8b7e047f1c8958235b53\nDeprecate the endpoint_uris field, as it is unused.\n\nPiperOrigin-RevId: 296357191\n\n8c12e2b4dca94e12bff9f538bdac29524ff7ef7a\nUpdate Dataproc v1 client.\n\nPiperOrigin-RevId: 296336662\n\n17567c4a1ef0a9b50faa87024d66f8acbb561089\nRemoving erroneous comment, a la https://github.com/googleapis/java-speech/pull/103\n\nPiperOrigin-RevId: 296332968\n\n3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\nd9835e922ea79eed8497db270d2f9f85099a519c\nUpdate some minor docs changes about user event proto\n\nPiperOrigin-RevId: 295185610\n\n5f311e416e69c170243de722023b22f3df89ec1c\nfix: use correct PHP package name in gapic configuration\n\nPiperOrigin-RevId: 295161330\n\n6cdd74dcdb071694da6a6b5a206e3a320b62dd11\npubsub: v1 add client config annotations and retry config\n\nPiperOrigin-RevId: 295158776\n\n" } }, { diff --git a/packages/google-cloud-language/test/gapic-language_service-v1.ts b/packages/google-cloud-language/test/gapic-language_service-v1.ts index df16b561082..cdc0388c85a 100644 --- a/packages/google-cloud-language/test/gapic-language_service-v1.ts +++ b/packages/google-cloud-language/test/gapic-language_service-v1.ts @@ -83,12 +83,30 @@ describe('v1.LanguageServiceClient', () => { }); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); + }); + it('has close method', () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest = {}; // Mock response @@ -111,6 +129,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest = {}; // Mock response @@ -135,6 +155,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest = {}; // Mock response @@ -157,6 +179,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest = {}; // Mock response @@ -181,6 +205,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest = {}; // Mock response @@ -203,6 +229,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest = {}; // Mock response @@ -227,6 +255,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest = {}; // Mock response @@ -249,6 +279,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest = {}; // Mock response @@ -273,6 +305,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IClassifyTextRequest = {}; // Mock response @@ -295,6 +329,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IClassifyTextRequest = {}; // Mock response @@ -319,6 +355,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest = {}; // Mock response @@ -341,6 +379,8 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest = {}; // Mock response diff --git a/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts b/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts index 78185b1d31b..79369b0aaab 100644 --- a/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts +++ b/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts @@ -83,12 +83,30 @@ describe('v1beta2.LanguageServiceClient', () => { }); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); + }); + it('has close method', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); describe('analyzeSentiment', () => { it('invokes analyzeSentiment without error', done => { const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest = {}; // Mock response @@ -111,6 +129,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest = {}; // Mock response @@ -135,6 +155,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest = {}; // Mock response @@ -157,6 +179,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest = {}; // Mock response @@ -181,6 +205,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest = {}; // Mock response @@ -203,6 +229,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest = {}; // Mock response @@ -227,6 +255,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest = {}; // Mock response @@ -249,6 +279,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest = {}; // Mock response @@ -273,6 +305,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest = {}; // Mock response @@ -295,6 +329,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest = {}; // Mock response @@ -319,6 +355,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest = {}; // Mock response @@ -341,6 +379,8 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest = {}; // Mock response From 65d7b3661d826e0d73b0a960abb64056f19caebc Mon Sep 17 00:00:00 2001 From: "gcf-merge-on-green[bot]" <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2020 01:24:20 +0000 Subject: [PATCH 326/488] build: update linkinator config (#386) --- packages/google-cloud-language/linkinator.config.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-language/linkinator.config.json b/packages/google-cloud-language/linkinator.config.json index b555215ca02..29a223b6db6 100644 --- a/packages/google-cloud-language/linkinator.config.json +++ b/packages/google-cloud-language/linkinator.config.json @@ -4,5 +4,7 @@ "https://codecov.io/gh/googleapis/", "www.googleapis.com", "img.shields.io" - ] + ], + "silent": true, + "concurrency": 10 } From 3e880ed1f1148d091ea40534b4b7cb9dbbc69ac1 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 6 Mar 2020 14:57:48 -0800 Subject: [PATCH 327/488] build(tests): fix coveralls and enable build cop (#387) --- packages/google-cloud-language/.mocharc.js | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/google-cloud-language/.mocharc.js diff --git a/packages/google-cloud-language/.mocharc.js b/packages/google-cloud-language/.mocharc.js new file mode 100644 index 00000000000..ff7b34fa5d1 --- /dev/null +++ b/packages/google-cloud-language/.mocharc.js @@ -0,0 +1,28 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config From 79a11226f46f4b711c05d726e72ad8dab53ad062 Mon Sep 17 00:00:00 2001 From: Jonathan Simon Date: Wed, 11 Mar 2020 14:58:41 -0700 Subject: [PATCH 328/488] chore: remove samples no longer referenced in docs --- .../google-cloud-language/samples/README.md | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 78ac6d7789c..ee75bba7647 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -15,7 +15,6 @@ analysis, and syntax analysis. This API is part of the larger Cloud Machine Lear * [Before you begin](#before-you-begin) * [Samples](#samples) * [Analyze v1](#analyze-v1) - * [Analyze v1beta2](#analyze-v1beta2) * [Automl Natural Language Dataset](#automl-natural-language-dataset) * [Automl Natural Language Model](#automl-natural-language-model) * [Automl Natural Language Predict](#automl-natural-language-predict) @@ -54,23 +53,6 @@ __Usage:__ -### Analyze v1beta2 - -View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) - -__Usage:__ - - -`node samples/analyze.v1beta2.js` - - ------ - - - - ### Automl Natural Language Dataset View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageDataset.js). From 3b1267210858faf2b72a6bcb44e04a4a3bc45503 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 17 Mar 2020 15:50:08 -0700 Subject: [PATCH 329/488] docs: remove stale sample (#390) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` {synth_log} ```
--- packages/google-cloud-language/README.md | 1 - packages/google-cloud-language/synth.metadata | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 9a2c5a33065..8e20206a63a 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -93,7 +93,6 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | | Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) | -| Analyze v1beta2 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) | | Automl Natural Language Dataset | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageDataset.js,samples/README.md) | | Automl Natural Language Model | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageModel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageModel.js,samples/README.md) | | Automl Natural Language Predict | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguagePredict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguagePredict.js,samples/README.md) | diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 458b0a750f5..fbf01a3e480 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,13 +1,13 @@ { - "updateTime": "2020-03-05T23:10:39.769777Z", + "updateTime": "2020-03-12T11:29:13.125922Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", - "internalRef": "299181282", - "log": "f0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\nf077632ba7fee588922d9e8717ee272039be126d\nfirestore: add update_transform\n\nPiperOrigin-RevId: 297405063\n\n0aba1900ffef672ec5f0da677cf590ee5686e13b\ncluster: use square brace for cross-reference\n\nPiperOrigin-RevId: 297204568\n\n5dac2da18f6325cbaed54603c43f0667ecd50247\nRestore retry params in gapic config because securitycenter has non-standard default retry params.\nRestore a few retry codes for some idempotent methods.\n\nPiperOrigin-RevId: 297196720\n\n1eb61455530252bba8b2c8d4bc9832960e5a56f6\npubsub: v1 replace IAM HTTP rules\n\nPiperOrigin-RevId: 297188590\n\n80b2d25f8d43d9d47024ff06ead7f7166548a7ba\nDialogflow weekly v2/v2beta1 library update:\n - updates to mega agent api\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297187629\n\n0b1876b35e98f560f9c9ca9797955f020238a092\nUse an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions.\n\nprotoc-docs-plugin >=0.4.0 (see commit https://github.com/googleapis/protoc-docs-plugin/commit/979f03ede6678c487337f3d7e88bae58df5207af) is incompatible with protobuf 3.9.1.\n\nPiperOrigin-RevId: 296986742\n\n1e47e676cddbbd8d93f19ba0665af15b5532417e\nFix: Restore a method signature for UpdateCluster\n\nPiperOrigin-RevId: 296901854\n\n7f910bcc4fc4704947ccfd3ceed015d16b9e00c2\nUpdate Dataproc v1beta2 client.\n\nPiperOrigin-RevId: 296451205\n\nde287524405a3dce124d301634731584fc0432d7\nFix: Reinstate method signatures that had been missed off some RPCs\nFix: Correct resource types for two fields\n\nPiperOrigin-RevId: 296435091\n\ne5bc9566ae057fb4c92f8b7e047f1c8958235b53\nDeprecate the endpoint_uris field, as it is unused.\n\nPiperOrigin-RevId: 296357191\n\n8c12e2b4dca94e12bff9f538bdac29524ff7ef7a\nUpdate Dataproc v1 client.\n\nPiperOrigin-RevId: 296336662\n\n17567c4a1ef0a9b50faa87024d66f8acbb561089\nRemoving erroneous comment, a la https://github.com/googleapis/java-speech/pull/103\n\nPiperOrigin-RevId: 296332968\n\n3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\nd9835e922ea79eed8497db270d2f9f85099a519c\nUpdate some minor docs changes about user event proto\n\nPiperOrigin-RevId: 295185610\n\n5f311e416e69c170243de722023b22f3df89ec1c\nfix: use correct PHP package name in gapic configuration\n\nPiperOrigin-RevId: 295161330\n\n6cdd74dcdb071694da6a6b5a206e3a320b62dd11\npubsub: v1 add client config annotations and retry config\n\nPiperOrigin-RevId: 295158776\n\n" + "sha": "34a5450c591b6be3d6566f25ac31caa5211b2f3f", + "internalRef": "300474272", + "log": "34a5450c591b6be3d6566f25ac31caa5211b2f3f\nIncreases the default timeout from 20s to 30s for MetricService\n\nPiperOrigin-RevId: 300474272\n\n5d8bffe87cd01ba390c32f1714230e5a95d5991d\nfeat: use the latest gapic-generator in WORKSPACE for bazel build.\n\nPiperOrigin-RevId: 300461878\n\nd631c651e3bcfac5d371e8560c27648f7b3e2364\nUpdated the GAPIC configs to include parameters for Backups APIs.\n\nPiperOrigin-RevId: 300443402\n\n678afc7055c1adea9b7b54519f3bdb228013f918\nAdding Game Servers v1beta API.\n\nPiperOrigin-RevId: 300433218\n\n80d2bd2c652a5e213302041b0620aff423132589\nEnable proto annotation and gapic v2 for talent API.\n\nPiperOrigin-RevId: 300393997\n\n85e454be7a353f7fe1bf2b0affb753305785b872\ndocs(google/maps/roads): remove mention of nonexported api\n\nPiperOrigin-RevId: 300367734\n\nbf839ae632e0f263a729569e44be4b38b1c85f9c\nAdding protocol buffer annotations and updated config info for v1 and v2.\n\nPiperOrigin-RevId: 300276913\n\n309b899ca18a4c604bce63882a161d44854da549\nPublish `Backup` APIs and protos.\n\nPiperOrigin-RevId: 300246038\n\neced64c3f122421350b4aca68a28e89121d20db8\nadd PHP client libraries\n\nPiperOrigin-RevId: 300193634\n\n7727af0e39df1ae9ad715895c8576d7b65cf6c6d\nfeat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE.\n\nPiperOrigin-RevId: 300188410\n\n2a25aa351dd5b5fe14895266aff5824d90ce757b\nBreaking change: remove the ProjectOrTenant resource and its references.\n\nPiperOrigin-RevId: 300182152\n\na499dbb28546379415f51803505cfb6123477e71\nUpdate web risk v1 gapic config and BUILD file.\n\nPiperOrigin-RevId: 300152177\n\n52701da10fec2a5f9796e8d12518c0fe574488fe\nFix: apply appropriate namespace/package options for C#, PHP and Ruby.\n\nPiperOrigin-RevId: 300123508\n\n365c029b8cdb63f7751b92ab490f1976e616105c\nAdd CC targets to the kms protos.\n\nThese are needed by go/tink.\n\nPiperOrigin-RevId: 300038469\n\n4ba9aa8a4a1413b88dca5a8fa931824ee9c284e6\nExpose logo recognition API proto for GA.\n\nPiperOrigin-RevId: 299971671\n\n1c9fc2c9e03dadf15f16b1c4f570955bdcebe00e\nAdding ruby_package option to accessapproval.proto for the Ruby client libraries generation.\n\nPiperOrigin-RevId: 299955924\n\n1cc6f0a7bfb147e6f2ede911d9b01e7a9923b719\nbuild(google/maps/routes): generate api clients\n\nPiperOrigin-RevId: 299955905\n\n29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\nb6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\n" } }, { From 9e2ebbb1e6b817af3ffcda5f6d5a66bd857cd909 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 18 Mar 2020 13:02:39 -0700 Subject: [PATCH 330/488] docs: mention templates in contributing section of README (#391) --- packages/google-cloud-language/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 8e20206a63a..e45d0dcfc66 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -127,6 +127,12 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-language/blob/master/CONTRIBUTING.md). +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + ## License Apache Version 2.0 From 5f65b50936aa0e800ffd8a00ca1854e98deae739 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 23 Mar 2020 18:36:13 -0700 Subject: [PATCH 331/488] docs: document version support goals (#397) --- packages/google-cloud-language/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index e45d0dcfc66..b3ddc0a70d8 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -104,6 +104,27 @@ has instructions for running the samples. The [Natural Language Node.js Client API Reference][client-docs] documentation also contains samples. +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targetting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + ## Versioning This library follows [Semantic Versioning](http://semver.org/). From efaff4f7cf7f79878ab2e84631ba125c4e0d61a3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Mar 2020 01:12:53 -0700 Subject: [PATCH 332/488] chore: regenerate the code (#396) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-03-22 04:32:47,307 synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. 2020-03-22 04:32:47,359 synthtool > Ensuring dependencies. 2020-03-22 04:32:47,364 synthtool > Cloning googleapis. 2020-03-22 04:32:48,029 synthtool > Pulling Docker image: gapic-generator-typescript:latest latest: Pulling from gapic-images/gapic-generator-typescript Digest: sha256:3762b8bcba247ef4d020ffc7043e2881a20b5fab0ffd98d542f365d3f3a3829d Status: Image is up to date for gcr.io/gapic-images/gapic-generator-typescript:latest 2020-03-22 04:32:48,948 synthtool > Generating code for: google/cloud/language/v1. 2020-03-22 04:32:50,149 synthtool > Generated code into /tmpfs/tmp/tmpk5kvwr80. 2020-03-22 04:32:50,159 synthtool > Pulling Docker image: gapic-generator-typescript:latest latest: Pulling from gapic-images/gapic-generator-typescript Digest: sha256:3762b8bcba247ef4d020ffc7043e2881a20b5fab0ffd98d542f365d3f3a3829d Status: Image is up to date for gcr.io/gapic-images/gapic-generator-typescript:latest 2020-03-22 04:32:51,048 synthtool > Generating code for: google/cloud/language/v1beta2. 2020-03-22 04:32:52,270 synthtool > Generated code into /tmpfs/tmp/tmphfhudmmm. .eslintignore .eslintrc.yml .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .github/PULL_REQUEST_TEMPLATE.md .github/publish.yml .github/release-please.yml .github/workflows/ci.yaml .kokoro/common.cfg .kokoro/continuous/node10/common.cfg .kokoro/continuous/node10/docs.cfg .kokoro/continuous/node10/lint.cfg .kokoro/continuous/node10/samples-test.cfg .kokoro/continuous/node10/system-test.cfg .kokoro/continuous/node10/test.cfg .kokoro/continuous/node12/common.cfg .kokoro/continuous/node12/test.cfg .kokoro/continuous/node8/common.cfg .kokoro/continuous/node8/test.cfg .kokoro/docs.sh .kokoro/lint.sh .kokoro/presubmit/node10/common.cfg .kokoro/presubmit/node10/docs.cfg .kokoro/presubmit/node10/lint.cfg .kokoro/presubmit/node10/samples-test.cfg .kokoro/presubmit/node10/system-test.cfg .kokoro/presubmit/node10/test.cfg .kokoro/presubmit/node12/common.cfg .kokoro/presubmit/node12/test.cfg .kokoro/presubmit/node8/common.cfg .kokoro/presubmit/node8/test.cfg .kokoro/presubmit/windows/common.cfg .kokoro/presubmit/windows/test.cfg .kokoro/publish.sh .kokoro/release/docs.cfg .kokoro/release/docs.sh .kokoro/release/publish.cfg .kokoro/samples-test.sh .kokoro/system-test.sh .kokoro/test.bat .kokoro/test.sh .kokoro/trampoline.sh .mocharc.js .nycrc .prettierignore .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md codecov.yaml renovate.json samples/README.md npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > protobufjs@6.8.9 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs > node scripts/postinstall > @google-cloud/language@3.8.0 prepare /tmpfs/src/git/autosynth/working_repo > npm run compile npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > @google-cloud/language@3.8.0 compile /tmpfs/src/git/autosynth/working_repo > tsc -p . && cp -r protos build/ npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.1 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: abbrev@1.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/abbrev): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/abbrev' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.abbrev.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ansi-regex@2.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/ansi-regex): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/ansi-regex' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.ansi-regex.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: aproba@1.2.0 (node_modules/watchpack/node_modules/fsevents/node_modules/aproba): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/aproba' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.aproba.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: balanced-match@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/balanced-match): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/balanced-match' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.balanced-match.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: chownr@1.1.4 (node_modules/watchpack/node_modules/fsevents/node_modules/chownr): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/chownr' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.chownr.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: code-point-at@1.1.0 (node_modules/watchpack/node_modules/fsevents/node_modules/code-point-at): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/code-point-at' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.code-point-at.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: concat-map@0.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/concat-map): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/concat-map' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.concat-map.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: console-control-strings@1.1.0 (node_modules/watchpack/node_modules/fsevents/node_modules/console-control-strings): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/console-control-strings' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.console-control-strings.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: core-util-is@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/core-util-is): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/core-util-is' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.core-util-is.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: deep-extend@0.6.0 (node_modules/watchpack/node_modules/fsevents/node_modules/deep-extend): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/deep-extend' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.deep-extend.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: delegates@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/delegates): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/delegates' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.delegates.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: detect-libc@1.0.3 (node_modules/watchpack/node_modules/fsevents/node_modules/detect-libc): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/detect-libc' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.detect-libc.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs.realpath@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/fs.realpath): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/fs.realpath' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.fs.realpath.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: has-unicode@2.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/has-unicode): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/has-unicode' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.has-unicode.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: inherits@2.0.4 (node_modules/watchpack/node_modules/fsevents/node_modules/inherits): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/inherits' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.inherits.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ini@1.3.5 (node_modules/watchpack/node_modules/fsevents/node_modules/ini): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/ini' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.ini.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: isarray@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/isarray): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/isarray' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.isarray.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: minimist@1.2.5 (node_modules/watchpack/node_modules/fsevents/node_modules/minimist): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/minimist' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.minimist.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ms@2.1.2 (node_modules/watchpack/node_modules/fsevents/node_modules/ms): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/ms' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.ms.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: npm-normalize-package-bin@1.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/npm-normalize-package-bin): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/npm-normalize-package-bin' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.npm-normalize-package-bin.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: number-is-nan@1.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/number-is-nan): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/number-is-nan' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.number-is-nan.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: object-assign@4.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/object-assign): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/object-assign' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.object-assign.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-homedir@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/os-homedir): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/os-homedir' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.os-homedir.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-tmpdir@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/os-tmpdir): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/os-tmpdir' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.os-tmpdir.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: path-is-absolute@1.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/path-is-absolute): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/path-is-absolute' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.path-is-absolute.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: process-nextick-args@2.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/process-nextick-args): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/process-nextick-args' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.process-nextick-args.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safe-buffer@5.1.2 (node_modules/watchpack/node_modules/fsevents/node_modules/safe-buffer): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/safe-buffer' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.safe-buffer.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safer-buffer@2.1.2 (node_modules/watchpack/node_modules/fsevents/node_modules/safer-buffer): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/safer-buffer' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.safer-buffer.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sax@1.2.4 (node_modules/watchpack/node_modules/fsevents/node_modules/sax): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/sax' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.sax.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: semver@5.7.1 (node_modules/watchpack/node_modules/fsevents/node_modules/semver): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/semver' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.semver.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: set-blocking@2.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/set-blocking): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/set-blocking' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.set-blocking.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: signal-exit@3.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/signal-exit): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/signal-exit' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.signal-exit.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: strip-json-comments@2.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/strip-json-comments): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/strip-json-comments' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.strip-json-comments.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: util-deprecate@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/util-deprecate): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/util-deprecate' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.util-deprecate.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: wrappy@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/wrappy): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/wrappy' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.wrappy.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: yallist@3.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/yallist): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/yallist' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.yallist.DELETE' added 978 packages from 462 contributors and audited 6774 packages in 22.985s found 0 vulnerabilities npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > @google-cloud/language@3.8.0 fix /tmpfs/src/git/autosynth/working_repo > gts fix installing semver@^5.5.0 installing uglify-js@^3.3.25 installing espree@^3.5.4 installing escodegen@^1.9.1 2020-03-22 04:33:27,197 synthtool > Wrote metadata to synth.metadata. ```
--- packages/google-cloud-language/.jsdoc.js | 2 +- packages/google-cloud-language/src/v1/index.ts | 2 +- .../src/v1/language_service_client.ts | 12 +++++++++--- .../google-cloud-language/src/v1beta2/index.ts | 2 +- .../src/v1beta2/language_service_client.ts | 12 +++++++++--- packages/google-cloud-language/synth.metadata | 16 ++++++++-------- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../google-cloud-language/system-test/install.ts | 2 +- .../test/gapic-language_service-v1.ts | 2 +- .../test/gapic-language_service-v1beta2.ts | 2 +- packages/google-cloud-language/webpack.config.js | 2 +- 12 files changed, 35 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index 606ea06c511..a9e74d68ae0 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1/index.ts b/packages/google-cloud-language/src/v1/index.ts index d009018811b..d07c325e894 100644 --- a/packages/google-cloud-language/src/v1/index.ts +++ b/packages/google-cloud-language/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 47cfc5733fd..3adabac376d 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -38,7 +38,12 @@ const version = require('../../../package.json').version; * @memberof v1 */ export class LanguageServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; private _innerApiCalls: {[name: string]: Function}; private _terminated = false; private _opts: ClientOptions; @@ -201,7 +206,8 @@ export class LanguageServiceClient { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; diff --git a/packages/google-cloud-language/src/v1beta2/index.ts b/packages/google-cloud-language/src/v1beta2/index.ts index d009018811b..d07c325e894 100644 --- a/packages/google-cloud-language/src/v1beta2/index.ts +++ b/packages/google-cloud-language/src/v1beta2/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index ea09d01c34e..fd6b6244429 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -38,7 +38,12 @@ const version = require('../../../package.json').version; * @memberof v1beta2 */ export class LanguageServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; private _innerApiCalls: {[name: string]: Function}; private _terminated = false; private _opts: ClientOptions; @@ -201,7 +206,8 @@ export class LanguageServiceClient { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index fbf01a3e480..3c38695e671 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-03-12T11:29:13.125922Z", + "updateTime": "2020-03-22T11:33:27.196932Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "34a5450c591b6be3d6566f25ac31caa5211b2f3f", - "internalRef": "300474272", - "log": "34a5450c591b6be3d6566f25ac31caa5211b2f3f\nIncreases the default timeout from 20s to 30s for MetricService\n\nPiperOrigin-RevId: 300474272\n\n5d8bffe87cd01ba390c32f1714230e5a95d5991d\nfeat: use the latest gapic-generator in WORKSPACE for bazel build.\n\nPiperOrigin-RevId: 300461878\n\nd631c651e3bcfac5d371e8560c27648f7b3e2364\nUpdated the GAPIC configs to include parameters for Backups APIs.\n\nPiperOrigin-RevId: 300443402\n\n678afc7055c1adea9b7b54519f3bdb228013f918\nAdding Game Servers v1beta API.\n\nPiperOrigin-RevId: 300433218\n\n80d2bd2c652a5e213302041b0620aff423132589\nEnable proto annotation and gapic v2 for talent API.\n\nPiperOrigin-RevId: 300393997\n\n85e454be7a353f7fe1bf2b0affb753305785b872\ndocs(google/maps/roads): remove mention of nonexported api\n\nPiperOrigin-RevId: 300367734\n\nbf839ae632e0f263a729569e44be4b38b1c85f9c\nAdding protocol buffer annotations and updated config info for v1 and v2.\n\nPiperOrigin-RevId: 300276913\n\n309b899ca18a4c604bce63882a161d44854da549\nPublish `Backup` APIs and protos.\n\nPiperOrigin-RevId: 300246038\n\neced64c3f122421350b4aca68a28e89121d20db8\nadd PHP client libraries\n\nPiperOrigin-RevId: 300193634\n\n7727af0e39df1ae9ad715895c8576d7b65cf6c6d\nfeat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE.\n\nPiperOrigin-RevId: 300188410\n\n2a25aa351dd5b5fe14895266aff5824d90ce757b\nBreaking change: remove the ProjectOrTenant resource and its references.\n\nPiperOrigin-RevId: 300182152\n\na499dbb28546379415f51803505cfb6123477e71\nUpdate web risk v1 gapic config and BUILD file.\n\nPiperOrigin-RevId: 300152177\n\n52701da10fec2a5f9796e8d12518c0fe574488fe\nFix: apply appropriate namespace/package options for C#, PHP and Ruby.\n\nPiperOrigin-RevId: 300123508\n\n365c029b8cdb63f7751b92ab490f1976e616105c\nAdd CC targets to the kms protos.\n\nThese are needed by go/tink.\n\nPiperOrigin-RevId: 300038469\n\n4ba9aa8a4a1413b88dca5a8fa931824ee9c284e6\nExpose logo recognition API proto for GA.\n\nPiperOrigin-RevId: 299971671\n\n1c9fc2c9e03dadf15f16b1c4f570955bdcebe00e\nAdding ruby_package option to accessapproval.proto for the Ruby client libraries generation.\n\nPiperOrigin-RevId: 299955924\n\n1cc6f0a7bfb147e6f2ede911d9b01e7a9923b719\nbuild(google/maps/routes): generate api clients\n\nPiperOrigin-RevId: 299955905\n\n29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\nb6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\n" + "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", + "internalRef": "302154871", + "log": "0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n" } }, { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" } } ], diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js index d3c6a4d92b2..e05c05ecda1 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts index 1bf143d7437..349c04190b7 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/system-test/install.ts b/packages/google-cloud-language/system-test/install.ts index c9aa74ec221..c4d80e9c0c8 100644 --- a/packages/google-cloud-language/system-test/install.ts +++ b/packages/google-cloud-language/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/test/gapic-language_service-v1.ts b/packages/google-cloud-language/test/gapic-language_service-v1.ts index cdc0388c85a..605b722be34 100644 --- a/packages/google-cloud-language/test/gapic-language_service-v1.ts +++ b/packages/google-cloud-language/test/gapic-language_service-v1.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts b/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts index 79369b0aaab..5002c7d42ef 100644 --- a/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts +++ b/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/webpack.config.js b/packages/google-cloud-language/webpack.config.js index 490b5021129..ea86f1d01be 100644 --- a/packages/google-cloud-language/webpack.config.js +++ b/packages/google-cloud-language/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 5f7d845fe65b9febc45d754a346dd749ab4e13bf Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 31 Mar 2020 18:36:47 -0700 Subject: [PATCH 333/488] build: set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#402) --- packages/google-cloud-language/synth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index edb25dcb29a..ecd49e1940d 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -5,6 +5,9 @@ logging.basicConfig(level=logging.DEBUG) +AUTOSYNTH_MULTIPLE_COMMITS = True + + gapic = gcp.GAPICMicrogenerator() # tasks has two product names, and a poorly named artman yaml for version in ['v1', 'v1beta2']: From 4de103e688b3f3b58acdd8cc160dd39121807f4a Mon Sep 17 00:00:00 2001 From: Alex <7764119+AVaksman@users.noreply.github.com> Date: Thu, 2 Apr 2020 13:58:44 -0400 Subject: [PATCH 334/488] feat!: drop node8 support (#405) --- packages/google-cloud-language/.eslintrc.json | 3 + packages/google-cloud-language/.eslintrc.yml | 15 - packages/google-cloud-language/.prettierrc | 8 - packages/google-cloud-language/.prettierrc.js | 17 + packages/google-cloud-language/package.json | 10 +- .../src/v1/language_service_client.ts | 328 +++++---- .../src/v1beta2/language_service_client.ts | 364 +++++----- packages/google-cloud-language/synth.metadata | 20 +- .../system-test/fixtures/sample/src/index.js | 1 - .../system-test/fixtures/sample/src/index.ts | 2 +- .../language_service_smoke_test.js | 3 + .../test/gapic-language_service-v1.ts | 402 ----------- .../test/gapic-language_service-v1beta2.ts | 402 ----------- .../test/gapic_language_service_v1.ts | 677 ++++++++++++++++++ .../test/gapic_language_service_v1beta2.ts | 677 ++++++++++++++++++ .../google-cloud-language/webpack.config.js | 12 +- 16 files changed, 1787 insertions(+), 1154 deletions(-) create mode 100644 packages/google-cloud-language/.eslintrc.json delete mode 100644 packages/google-cloud-language/.eslintrc.yml delete mode 100644 packages/google-cloud-language/.prettierrc create mode 100644 packages/google-cloud-language/.prettierrc.js delete mode 100644 packages/google-cloud-language/test/gapic-language_service-v1.ts delete mode 100644 packages/google-cloud-language/test/gapic-language_service-v1beta2.ts create mode 100644 packages/google-cloud-language/test/gapic_language_service_v1.ts create mode 100644 packages/google-cloud-language/test/gapic_language_service_v1beta2.ts diff --git a/packages/google-cloud-language/.eslintrc.json b/packages/google-cloud-language/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-language/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-language/.eslintrc.yml b/packages/google-cloud-language/.eslintrc.yml deleted file mode 100644 index 73eeec27612..00000000000 --- a/packages/google-cloud-language/.eslintrc.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -extends: - - 'eslint:recommended' - - 'plugin:node/recommended' - - prettier -plugins: - - node - - prettier -rules: - prettier/prettier: error - block-scoped-var: error - eqeqeq: error - no-warning-comments: warn - no-var: error - prefer-const: error diff --git a/packages/google-cloud-language/.prettierrc b/packages/google-cloud-language/.prettierrc deleted file mode 100644 index df6eac07446..00000000000 --- a/packages/google-cloud-language/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ ---- -bracketSpacing: false -printWidth: 80 -semi: true -singleQuote: true -tabWidth: 2 -trailingComma: es5 -useTabs: false diff --git a/packages/google-cloud-language/.prettierrc.js b/packages/google-cloud-language/.prettierrc.js new file mode 100644 index 00000000000..08cba3775be --- /dev/null +++ b/packages/google-cloud-language/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 5e4f4b3a7fa..03ba6b22dd8 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc", "engines": { - "node": ">=8.10.0" + "node": ">=10" }, "repository": "googleapis/nodejs-language", "main": "build/src/index.js", @@ -45,18 +45,19 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^1.9.0" + "google-gax": "^2.0.1" }, "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", + "@types/sinon": "^7.5.2", "c8": "^7.0.0", "codecov": "^3.0.2", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.0", - "gts": "^1.0.0", + "gts": "2.0.0-alpha.9", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", @@ -65,8 +66,9 @@ "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", "prettier": "^1.11.1", + "sinon": "^9.0.1", "ts-loader": "^6.2.1", - "typescript": "^3.7.0", + "typescript": "^3.8.3", "webpack": "^4.41.2", "webpack-cli": "^3.3.10" } diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 3adabac376d..dac960769f0 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -17,16 +17,10 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import { - APICallback, - Callback, - CallOptions, - Descriptors, - ClientOptions, -} from 'google-gax'; +import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; -import * as protosTypes from '../../protos/protos'; +import * as protos from '../../protos/protos'; import * as gapicConfig from './language_service_client_config.json'; const version = require('../../../package.json').version; @@ -38,13 +32,6 @@ const version = require('../../../package.json').version; * @memberof v1 */ export class LanguageServiceClient { - private _descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - private _innerApiCalls: {[name: string]: Function}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -52,6 +39,13 @@ export class LanguageServiceClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; languageServiceStub?: Promise<{[name: string]: Function}>; /** @@ -143,7 +137,10 @@ export class LanguageServiceClient { 'protos.json' ); this._protos = this._gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath ); // Put together the default options sent with requests. @@ -157,7 +154,7 @@ export class LanguageServiceClient { // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. - this._innerApiCalls = {}; + this.innerApiCalls = {}; } /** @@ -184,7 +181,7 @@ export class LanguageServiceClient { ? (this._protos as protobuf.Root).lookupService( 'google.cloud.language.v1.LanguageService' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.language.v1.LanguageService, this._opts ) as Promise<{[method: string]: Function}>; @@ -199,9 +196,8 @@ export class LanguageServiceClient { 'classifyText', 'annotateText', ]; - for (const methodName of languageServiceStubMethods) { - const innerCallPromise = this.languageServiceStub.then( + const callPromise = this.languageServiceStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); @@ -215,20 +211,14 @@ export class LanguageServiceClient { ); const apiCall = this._gaxModule.createApiCall( - innerCallPromise, + callPromise, this._defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.stream[methodName] || - this._descriptors.longrunning[methodName] + this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); - this._innerApiCalls[methodName] = ( - argument: {}, - callOptions?: CallOptions, - callback?: APICallback - ) => { - return apiCall(argument, callOptions, callback); - }; + this.innerApiCalls[methodName] = apiCall; } return this.languageServiceStub; @@ -288,22 +278,34 @@ export class LanguageServiceClient { // -- Service calls -- // ------------------- analyzeSentiment( - request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest, + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, - protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, {} | undefined ] >; analyzeSentiment( - request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest, + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, - protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + analyzeSentiment( + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -322,24 +324,27 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ analyzeSentiment( - request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest, + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, - | protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeSentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, - protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1.IAnalyzeSentimentResponse, - protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, {} | undefined ] > | void { @@ -353,25 +358,37 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.analyzeSentiment(request, options, callback); + return this.innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( - request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest, + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, {} | undefined ] >; analyzeEntities( - request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest, + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + analyzeEntities( + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -392,24 +409,27 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ analyzeEntities( - request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest, + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, - | protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, {} | undefined ] > | void { @@ -423,29 +443,40 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.analyzeEntities(request, options, callback); + return this.innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( - request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, ( - | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest | undefined ), {} | undefined ] >; analyzeEntitySentiment( - request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + analyzeEntitySentiment( + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -465,26 +496,28 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ analyzeEntitySentiment( - request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, ( - | protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest | undefined ), {} | undefined @@ -500,29 +533,37 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.analyzeEntitySentiment( + return this.innerApiCalls.analyzeEntitySentiment( request, options, callback ); } analyzeSyntax( - request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest, + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, {} | undefined ] >; analyzeSyntax( - request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest, + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, + {} | null | undefined + > + ): void; + analyzeSyntax( + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -543,24 +584,25 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ analyzeSyntax( - request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest, + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, - | protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + | protos.google.cloud.language.v1.IAnalyzeSyntaxRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, {} | undefined ] > | void { @@ -574,25 +616,33 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.analyzeSyntax(request, options, callback); + return this.innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( - request: protosTypes.google.cloud.language.v1.IClassifyTextRequest, + request: protos.google.cloud.language.v1.IClassifyTextRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1.IClassifyTextResponse, - protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | undefined, {} | undefined ] >; classifyText( - request: protosTypes.google.cloud.language.v1.IClassifyTextRequest, + request: protos.google.cloud.language.v1.IClassifyTextRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1.IClassifyTextResponse, - protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, + {} | null | undefined + > + ): void; + classifyText( + request: protos.google.cloud.language.v1.IClassifyTextRequest, + callback: Callback< + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -609,23 +659,25 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ classifyText( - request: protosTypes.google.cloud.language.v1.IClassifyTextRequest, + request: protos.google.cloud.language.v1.IClassifyTextRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1.IClassifyTextResponse, - protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IClassifyTextResponse, + | protos.google.cloud.language.v1.IClassifyTextRequest + | null + | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1.IClassifyTextResponse, - protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1.IClassifyTextResponse, - protosTypes.google.cloud.language.v1.IClassifyTextRequest | undefined, + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | undefined, {} | undefined ] > | void { @@ -639,25 +691,33 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.classifyText(request, options, callback); + return this.innerApiCalls.classifyText(request, options, callback); } annotateText( - request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest, + request: protos.google.cloud.language.v1.IAnnotateTextRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1.IAnnotateTextResponse, - protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | undefined, {} | undefined ] >; annotateText( - request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest, + request: protos.google.cloud.language.v1.IAnnotateTextRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1.IAnnotateTextResponse, - protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, + {} | null | undefined + > + ): void; + annotateText( + request: protos.google.cloud.language.v1.IAnnotateTextRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -679,23 +739,25 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ annotateText( - request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest, + request: protos.google.cloud.language.v1.IAnnotateTextRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1.IAnnotateTextResponse, - protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IAnnotateTextResponse, + | protos.google.cloud.language.v1.IAnnotateTextRequest + | null + | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1.IAnnotateTextResponse, - protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, - {} | undefined + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1.IAnnotateTextResponse, - protosTypes.google.cloud.language.v1.IAnnotateTextRequest | undefined, + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | undefined, {} | undefined ] > | void { @@ -709,7 +771,7 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.annotateText(request, options, callback); + return this.innerApiCalls.annotateText(request, options, callback); } /** diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index fd6b6244429..7ca3bf028a6 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -17,16 +17,10 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import { - APICallback, - Callback, - CallOptions, - Descriptors, - ClientOptions, -} from 'google-gax'; +import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; -import * as protosTypes from '../../protos/protos'; +import * as protos from '../../protos/protos'; import * as gapicConfig from './language_service_client_config.json'; const version = require('../../../package.json').version; @@ -38,13 +32,6 @@ const version = require('../../../package.json').version; * @memberof v1beta2 */ export class LanguageServiceClient { - private _descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - private _innerApiCalls: {[name: string]: Function}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -52,6 +39,13 @@ export class LanguageServiceClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; languageServiceStub?: Promise<{[name: string]: Function}>; /** @@ -143,7 +137,10 @@ export class LanguageServiceClient { 'protos.json' ); this._protos = this._gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath ); // Put together the default options sent with requests. @@ -157,7 +154,7 @@ export class LanguageServiceClient { // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. - this._innerApiCalls = {}; + this.innerApiCalls = {}; } /** @@ -184,7 +181,7 @@ export class LanguageServiceClient { ? (this._protos as protobuf.Root).lookupService( 'google.cloud.language.v1beta2.LanguageService' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.language.v1beta2.LanguageService, this._opts ) as Promise<{[method: string]: Function}>; @@ -199,9 +196,8 @@ export class LanguageServiceClient { 'classifyText', 'annotateText', ]; - for (const methodName of languageServiceStubMethods) { - const innerCallPromise = this.languageServiceStub.then( + const callPromise = this.languageServiceStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); @@ -215,20 +211,14 @@ export class LanguageServiceClient { ); const apiCall = this._gaxModule.createApiCall( - innerCallPromise, + callPromise, this._defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.stream[methodName] || - this._descriptors.longrunning[methodName] + this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); - this._innerApiCalls[methodName] = ( - argument: {}, - callOptions?: CallOptions, - callback?: APICallback - ) => { - return apiCall(argument, callOptions, callback); - }; + this.innerApiCalls[methodName] = apiCall; } return this.languageServiceStub; @@ -288,26 +278,34 @@ export class LanguageServiceClient { // -- Service calls -- // ------------------- analyzeSentiment( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest | undefined, {} | undefined ] >; analyzeSentiment( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + analyzeSentiment( + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -327,28 +325,27 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ analyzeSentiment( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest | undefined, {} | undefined ] > | void { @@ -362,29 +359,37 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.analyzeSentiment(request, options, callback); + return this.innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest | undefined, {} | undefined ] >; analyzeEntities( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + analyzeEntities( + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -405,28 +410,27 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ analyzeEntities( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest | undefined, {} | undefined ] > | void { @@ -440,29 +444,40 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.analyzeEntities(request, options, callback); + return this.innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, ( - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest | undefined ), {} | undefined ] >; analyzeEntitySentiment( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + analyzeEntitySentiment( + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -482,26 +497,28 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ analyzeEntitySentiment( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, ( - | protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest | undefined ), {} | undefined @@ -517,33 +534,41 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.analyzeEntitySentiment( + return this.innerApiCalls.analyzeEntitySentiment( request, options, callback ); } analyzeSyntax( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest | undefined, {} | undefined ] >; analyzeSyntax( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + analyzeSyntax( + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -564,28 +589,27 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ analyzeSyntax( - request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest | undefined, {} | undefined ] > | void { @@ -599,29 +623,37 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.analyzeSyntax(request, options, callback); + return this.innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( - request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest, + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + protos.google.cloud.language.v1beta2.IClassifyTextRequest | undefined, {} | undefined ] >; classifyText( - request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest, + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, - | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + | protos.google.cloud.language.v1beta2.IClassifyTextRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + classifyText( + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + | protos.google.cloud.language.v1beta2.IClassifyTextRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -638,28 +670,27 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ classifyText( - request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest, + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, - | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + | protos.google.cloud.language.v1beta2.IClassifyTextRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, - | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + | protos.google.cloud.language.v1beta2.IClassifyTextRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IClassifyTextResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + protos.google.cloud.language.v1beta2.IClassifyTextRequest | undefined, {} | undefined ] > | void { @@ -673,29 +704,37 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.classifyText(request, options, callback); + return this.innerApiCalls.classifyText(request, options, callback); } annotateText( - request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest, + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + protos.google.cloud.language.v1beta2.IAnnotateTextRequest | undefined, {} | undefined ] >; annotateText( - request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest, + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, - | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protos.google.cloud.language.v1beta2.IAnnotateTextRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + annotateText( + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protos.google.cloud.language.v1beta2.IAnnotateTextRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -717,28 +756,27 @@ export class LanguageServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ annotateText( - request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest, + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, - | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protos.google.cloud.language.v1beta2.IAnnotateTextRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, - | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protos.google.cloud.language.v1beta2.IAnnotateTextRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.cloud.language.v1beta2.IAnnotateTextResponse, - ( - | protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest - | undefined - ), + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + protos.google.cloud.language.v1beta2.IAnnotateTextRequest | undefined, {} | undefined ] > | void { @@ -752,7 +790,7 @@ export class LanguageServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.annotateText(request, options, callback); + return this.innerApiCalls.annotateText(request, options, callback); } /** diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 3c38695e671..9efc07f8a8b 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,23 +1,5 @@ { - "updateTime": "2020-03-22T11:33:27.196932Z", - "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", - "internalRef": "302154871", - "log": "0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" - } - } - ], + "updateTime": "2020-03-31T19:47:14.953977Z", "destinations": [ { "client": { diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js index e05c05ecda1..a4274b479c3 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js @@ -16,7 +16,6 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** - /* eslint-disable node/no-missing-require, no-unused-vars */ const language = require('@google-cloud/language'); diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts index 349c04190b7..7f46f0abbfb 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts @@ -19,7 +19,7 @@ import {LanguageServiceClient} from '@google-cloud/language'; function main() { - const languageServiceClient = new LanguageServiceClient(); + new LanguageServiceClient(); } main(); diff --git a/packages/google-cloud-language/system-test/language_service_smoke_test.js b/packages/google-cloud-language/system-test/language_service_smoke_test.js index 7d34a4b3606..f66626632cf 100644 --- a/packages/google-cloud-language/system-test/language_service_smoke_test.js +++ b/packages/google-cloud-language/system-test/language_service_smoke_test.js @@ -14,8 +14,11 @@ 'use strict'; +const {describe, it} = require('mocha'); + describe('LanguageServiceSmokeTest', () => { it('successfully makes a call to the service', done => { + // eslint-disable-next-line node/no-missing-require const language = require('../src'); const client = new language.v1.LanguageServiceClient({ diff --git a/packages/google-cloud-language/test/gapic-language_service-v1.ts b/packages/google-cloud-language/test/gapic-language_service-v1.ts deleted file mode 100644 index 605b722be34..00000000000 --- a/packages/google-cloud-language/test/gapic-language_service-v1.ts +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright 2020 Google LLC -// -// 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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protosTypes from '../protos/protos'; -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -const languageserviceModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -class FakeError { - name: string; - message: string; - code: number; - constructor(n: number) { - this.name = 'fakeName'; - this.message = 'fake message'; - this.code = n; - } -} -const error = new FakeError(FAKE_STATUS_CODE); -export interface Callback { - (err: FakeError | null, response?: {} | null): void; -} - -export class Operation { - constructor() {} - promise() {} -} -function mockSimpleGrpcMethod( - expectedRequest: {}, - response: {} | null, - error: FakeError | null -) { - return (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} -describe('v1.LanguageServiceClient', () => { - it('has servicePath', () => { - const servicePath = - languageserviceModule.v1.LanguageServiceClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - languageserviceModule.v1.LanguageServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = languageserviceModule.v1.LanguageServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new languageserviceModule.v1.LanguageServiceClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.languageServiceStub, undefined); - await client.initialize(); - assert(client.languageServiceStub); - }); - it('has close method', () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('analyzeSentiment', () => { - it('invokes analyzeSentiment without error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.analyzeSentiment(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes analyzeSentiment with error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnalyzeSentimentRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( - request, - null, - error - ); - client.analyzeSentiment(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('analyzeEntities', () => { - it('invokes analyzeEntities without error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.analyzeEntities(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes analyzeEntities with error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitiesRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( - request, - null, - error - ); - client.analyzeEntities(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('analyzeEntitySentiment', () => { - it('invokes analyzeEntitySentiment without error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.analyzeEntitySentiment(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes analyzeEntitySentiment with error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnalyzeEntitySentimentRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( - request, - null, - error - ); - client.analyzeEntitySentiment(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('analyzeSyntax', () => { - it('invokes analyzeSyntax without error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.analyzeSyntax(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes analyzeSyntax with error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnalyzeSyntaxRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( - request, - null, - error - ); - client.analyzeSyntax(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('classifyText', () => { - it('invokes classifyText without error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IClassifyTextRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.classifyText = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.classifyText(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes classifyText with error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IClassifyTextRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.classifyText = mockSimpleGrpcMethod( - request, - null, - error - ); - client.classifyText(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('annotateText', () => { - it('invokes annotateText without error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.annotateText = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.annotateText(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes annotateText with error', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1.IAnnotateTextRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.annotateText = mockSimpleGrpcMethod( - request, - null, - error - ); - client.annotateText(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); diff --git a/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts b/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts deleted file mode 100644 index 5002c7d42ef..00000000000 --- a/packages/google-cloud-language/test/gapic-language_service-v1beta2.ts +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright 2020 Google LLC -// -// 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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protosTypes from '../protos/protos'; -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -const languageserviceModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -class FakeError { - name: string; - message: string; - code: number; - constructor(n: number) { - this.name = 'fakeName'; - this.message = 'fake message'; - this.code = n; - } -} -const error = new FakeError(FAKE_STATUS_CODE); -export interface Callback { - (err: FakeError | null, response?: {} | null): void; -} - -export class Operation { - constructor() {} - promise() {} -} -function mockSimpleGrpcMethod( - expectedRequest: {}, - response: {} | null, - error: FakeError | null -) { - return (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} -describe('v1beta2.LanguageServiceClient', () => { - it('has servicePath', () => { - const servicePath = - languageserviceModule.v1beta2.LanguageServiceClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - languageserviceModule.v1beta2.LanguageServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = languageserviceModule.v1beta2.LanguageServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.languageServiceStub, undefined); - await client.initialize(); - assert(client.languageServiceStub); - }); - it('has close method', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('analyzeSentiment', () => { - it('invokes analyzeSentiment without error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.analyzeSentiment(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes analyzeSentiment with error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSentimentRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeSentiment = mockSimpleGrpcMethod( - request, - null, - error - ); - client.analyzeSentiment(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('analyzeEntities', () => { - it('invokes analyzeEntities without error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.analyzeEntities(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes analyzeEntities with error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeEntities = mockSimpleGrpcMethod( - request, - null, - error - ); - client.analyzeEntities(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('analyzeEntitySentiment', () => { - it('invokes analyzeEntitySentiment without error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.analyzeEntitySentiment(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes analyzeEntitySentiment with error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeEntitySentiment = mockSimpleGrpcMethod( - request, - null, - error - ); - client.analyzeEntitySentiment(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('analyzeSyntax', () => { - it('invokes analyzeSyntax without error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.analyzeSyntax(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes analyzeSyntax with error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.analyzeSyntax = mockSimpleGrpcMethod( - request, - null, - error - ); - client.analyzeSyntax(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('classifyText', () => { - it('invokes classifyText without error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.classifyText = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.classifyText(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes classifyText with error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IClassifyTextRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.classifyText = mockSimpleGrpcMethod( - request, - null, - error - ); - client.classifyText(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('annotateText', () => { - it('invokes annotateText without error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.annotateText = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.annotateText(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes annotateText with error', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.cloud.language.v1beta2.IAnnotateTextRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.annotateText = mockSimpleGrpcMethod( - request, - null, - error - ); - client.annotateText(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts new file mode 100644 index 00000000000..e8d0c1e2cd7 --- /dev/null +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -0,0 +1,677 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as languageserviceModule from '../src'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +describe('v1.LanguageServiceClient', () => { + it('has servicePath', () => { + const servicePath = + languageserviceModule.v1.LanguageServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + languageserviceModule.v1.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = languageserviceModule.v1.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new languageserviceModule.v1.LanguageServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); + }); + + it('has close method', () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('analyzeSentiment', () => { + it('invokes analyzeSentiment without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentResponse() + ); + client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes analyzeSentiment without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentResponse() + ); + client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeSentiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnalyzeSentimentResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes analyzeSentiment with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSentiment = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.analyzeSentiment(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeEntities', () => { + it('invokes analyzeEntities without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() + ); + client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeEntities(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes analyzeEntities without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() + ); + client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeEntities( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnalyzeEntitiesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes analyzeEntities with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntities = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.analyzeEntities(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeEntitySentiment', () => { + it('invokes analyzeEntitySentiment without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() + ); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( + expectedResponse + ); + const [response] = await client.analyzeEntitySentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes analyzeEntitySentiment without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() + ); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeEntitySentiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes analyzeEntitySentiment with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.analyzeEntitySentiment(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeSyntax', () => { + it('invokes analyzeSyntax without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() + ); + client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSyntax(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes analyzeSyntax without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() + ); + client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeSyntax( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnalyzeSyntaxResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes analyzeSyntax with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSyntax = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.analyzeSyntax(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('classifyText', () => { + it('invokes classifyText without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextResponse() + ); + client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); + const [response] = await client.classifyText(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes classifyText without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextResponse() + ); + client.innerApiCalls.classifyText = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.classifyText( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IClassifyTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes classifyText with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.classifyText = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.classifyText(request); + }, expectedError); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('annotateText', () => { + it('invokes annotateText without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextResponse() + ); + client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); + const [response] = await client.annotateText(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes annotateText without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextResponse() + ); + client.innerApiCalls.annotateText = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.annotateText( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnnotateTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes annotateText with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.annotateText = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.annotateText(request); + }, expectedError); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); +}); diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts new file mode 100644 index 00000000000..3818651db69 --- /dev/null +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -0,0 +1,677 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as languageserviceModule from '../src'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +describe('v1beta2.LanguageServiceClient', () => { + it('has servicePath', () => { + const servicePath = + languageserviceModule.v1beta2.LanguageServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + languageserviceModule.v1beta2.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = languageserviceModule.v1beta2.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); + }); + + it('has close method', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('analyzeSentiment', () => { + it('invokes analyzeSentiment without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() + ); + client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes analyzeSentiment without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() + ); + client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeSentiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes analyzeSentiment with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSentiment = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.analyzeSentiment(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeEntities', () => { + it('invokes analyzeEntities without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() + ); + client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeEntities(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes analyzeEntities without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() + ); + client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeEntities( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes analyzeEntities with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntities = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.analyzeEntities(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeEntitySentiment', () => { + it('invokes analyzeEntitySentiment without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() + ); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( + expectedResponse + ); + const [response] = await client.analyzeEntitySentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes analyzeEntitySentiment without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() + ); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeEntitySentiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes analyzeEntitySentiment with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.analyzeEntitySentiment(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeSyntax', () => { + it('invokes analyzeSyntax without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() + ); + client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSyntax(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes analyzeSyntax without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() + ); + client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeSyntax( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes analyzeSyntax with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSyntax = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.analyzeSyntax(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('classifyText', () => { + it('invokes classifyText without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextResponse() + ); + client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); + const [response] = await client.classifyText(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes classifyText without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextResponse() + ); + client.innerApiCalls.classifyText = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.classifyText( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IClassifyTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes classifyText with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.classifyText = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.classifyText(request); + }, expectedError); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('annotateText', () => { + it('invokes annotateText without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextResponse() + ); + client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); + const [response] = await client.annotateText(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes annotateText without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextResponse() + ); + client.innerApiCalls.annotateText = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.annotateText( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnnotateTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes annotateText with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.annotateText = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.annotateText(request); + }, expectedError); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); +}); diff --git a/packages/google-cloud-language/webpack.config.js b/packages/google-cloud-language/webpack.config.js index ea86f1d01be..e92ce835266 100644 --- a/packages/google-cloud-language/webpack.config.js +++ b/packages/google-cloud-language/webpack.config.js @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/ + exclude: /node_modules/, }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]grpc/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader' + use: 'null-loader', }, ], }, From 469e3503eabdcf8fc936b88c4eb27d341be816c6 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 5 Apr 2020 12:48:34 -0700 Subject: [PATCH 335/488] chore: remove duplicate mocha config (#408) --- packages/google-cloud-language/.mocharc.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 packages/google-cloud-language/.mocharc.json diff --git a/packages/google-cloud-language/.mocharc.json b/packages/google-cloud-language/.mocharc.json deleted file mode 100644 index 670c5e2c24b..00000000000 --- a/packages/google-cloud-language/.mocharc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} From 74f3105a16a23018420e0b3ab7a696097963e2ba Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Apr 2020 20:56:40 +0200 Subject: [PATCH 336/488] chore(deps): update dependency gts to v2.0.0 (#411) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [gts](https://togithub.com/google/gts) | devDependencies | patch | [`2.0.0-alpha.9` -> `2.0.0`](https://renovatebot.com/diffs/npm/gts/2.0.0-alpha.9/2.0.0) | --- ### Release Notes
google/gts ### [`v2.0.0`](https://togithub.com/google/gts/blob/master/CHANGELOG.md#​200-httpswwwgithubcomgooglegtscomparev112v200-2020-04-02) [Compare Source](https://togithub.com/google/gts/compare/39a2705e51b4b6329a70f91f8293a2d7a363bf5d...v2.0.0) ##### ⚠ BREAKING CHANGES ⚠ This is a major rewrite of the tool. Based on community guidance, we've switched from using [tslint](https://palantir.github.io/tslint/) to [eslint](https://eslint.org/). _Please read all of the steps below to upgrade_. ##### Configuring `eslint` With the shift to `eslint`, `gts` now will format and lint JavaScript _as well_ as TypeScript. Upgrading will require a number of manual steps. To format JavaScript and TypeScript, you can run: $ npx gts fix To specify only TypeScript: $ npx gts fix '**/*.ts' ##### Delete `tslint.json` This file is no longer used, and can lead to confusion. ##### Create a `.eslintrc.json` Now that we're using eslint, you need to extend the eslint configuration baked into the module. Create a new file named `.eslintrc.json`, and paste the following: ```js { "extends": "./node_modules/gts" } ``` ##### Create a `.eslintignore` The `.eslintignore` file lets you ignore specific directories. This tool now lints and formats JavaScript, so it's _really_ important to ignore your build directory! Here is an example of a `.eslintignore` file: **/node_modules build/ ##### Rule changes The underlying linter was changed, so naturally there are going to be a variety of rule changes along the way. To see the full list, check out [.eslintrc.json](https://togithub.com/google/gts/blob/master/.eslintrc.json). ##### Require Node.js 10.x and up Node.js 8.x is now end of life - this module now requires Ndoe.js 10.x and up. ##### Features - add the eol-last rule ([#​425](https://www.github.com/google/gts/issues/425)) ([50ebd4d](https://www.github.com/google/gts/commit/50ebd4dbaf063615f4c025f567ca28076a734223)) - allow eslintrc to run over tsx files ([#​469](https://www.github.com/google/gts/issues/469)) ([a21db94](https://www.github.com/google/gts/commit/a21db94601def563952d677cb0980a12b6730f4c)) - disable global rule for checking TODO comments ([#​459](https://www.github.com/google/gts/issues/459)) ([96aa84a](https://www.github.com/google/gts/commit/96aa84a0a42181046daa248750cc8fef0c320619)) - override require-atomic-updates ([#​468](https://www.github.com/google/gts/issues/468)) ([8105c93](https://www.github.com/google/gts/commit/8105c9334ee5104b05f6b1b2f150e51419637262)) - prefer single quotes if possible ([#​475](https://www.github.com/google/gts/issues/475)) ([39a2705](https://www.github.com/google/gts/commit/39a2705e51b4b6329a70f91f8293a2d7a363bf5d)) - use eslint instead of tslint ([#​400](https://www.github.com/google/gts/issues/400)) ([b3096fb](https://www.github.com/google/gts/commit/b3096fbd5076d302d93c2307bf627e12c423e726)) ##### Bug Fixes - use .prettierrc.js ([#​437](https://www.github.com/google/gts/issues/437)) ([06efa84](https://www.github.com/google/gts/commit/06efa8444cdf1064b64f3e8d61ebd04f45d90b4c)) - **deps:** update dependency chalk to v4 ([#​477](https://www.github.com/google/gts/issues/477)) ([061d64e](https://www.github.com/google/gts/commit/061d64e29d37b93ce55228937cc100e05ddef352)) - **deps:** update dependency eslint-plugin-node to v11 ([#​426](https://www.github.com/google/gts/issues/426)) ([a394b7c](https://www.github.com/google/gts/commit/a394b7c1f80437f25017ca5c500b968ebb789ece)) - **deps:** update dependency execa to v4 ([#​427](https://www.github.com/google/gts/issues/427)) ([f42ef36](https://www.github.com/google/gts/commit/f42ef36709251553342e655e287e889df72ee3e3)) - **deps:** update dependency prettier to v2 ([#​464](https://www.github.com/google/gts/issues/464)) ([20ef43d](https://www.github.com/google/gts/commit/20ef43d566df17d3c93949ef7db3b72ee9123ca3)) - disable no-use-before-define ([#​431](https://www.github.com/google/gts/issues/431)) ([dea2c22](https://www.github.com/google/gts/commit/dea2c223d1d3a60a1786aa820eebb93be27016a7)) - **deps:** update dependency update-notifier to v4 ([#​403](https://www.github.com/google/gts/issues/403)) ([57393b7](https://www.github.com/google/gts/commit/57393b74c6cf299e8ae09311f0382226b8baa3e3)) - **deps:** upgrade to meow 6.x ([#​423](https://www.github.com/google/gts/issues/423)) ([8f93d00](https://www.github.com/google/gts/commit/8f93d0049337a832d9a22b6ae4e86fd41140ec56)) - align back to the google style guide ([#​440](https://www.github.com/google/gts/issues/440)) ([8bd78c4](https://www.github.com/google/gts/commit/8bd78c4c78526a72400f618a95a987d2a7c1a8db)) - disable empty-function check ([#​467](https://www.github.com/google/gts/issues/467)) ([6455d7a](https://www.github.com/google/gts/commit/6455d7a9d227320d3ffe1b00c9c739b846f339a8)) - drop support for node 8 ([#​422](https://www.github.com/google/gts/issues/422)) ([888c686](https://www.github.com/google/gts/commit/888c68692079065f38ce66ec84472f1f3311a050)) - emit .prettierrc.js with init ([#​462](https://www.github.com/google/gts/issues/462)) ([b114614](https://www.github.com/google/gts/commit/b114614d22ab5560d2d1dd5cb6695968cc80027b)) - enable trailing comma ([#​470](https://www.github.com/google/gts/issues/470)) ([6518f58](https://www.github.com/google/gts/commit/6518f5843d3093e3beb7d3371b56d9aecedf3924)) - include _.tsx and _.jsx in default fix command ([#​473](https://www.github.com/google/gts/issues/473)) ([0509780](https://www.github.com/google/gts/commit/050978005ad089d9b3b5d8895b25ea1175d75db2)) ##### [1.1.2](https://www.github.com/google/gts/compare/v1.1.1...v1.1.2) (2019-11-20) ##### Bug Fixes - **deps:** update to newest prettier (with support for optional chain) ([#​396](https://www.github.com/google/gts/issues/396)) ([ce8ad06](https://www.github.com/google/gts/commit/ce8ad06c8489c44a9e2ed5292382637b3ebb7601)) ##### [1.1.1](https://www.github.com/google/gts/compare/v1.1.0...v1.1.1) (2019-11-11) ##### Bug Fixes - **deps:** update dependency chalk to v3 ([#​389](https://www.github.com/google/gts/issues/389)) ([1ce0f45](https://www.github.com/google/gts/commit/1ce0f450677e143a27efc39def617d13c66503e8)) - **deps:** update dependency inquirer to v7 ([#​377](https://www.github.com/google/gts/issues/377)) ([bf2c349](https://www.github.com/google/gts/commit/bf2c349b2208ac63e551542599ac9cd27b461338)) - **deps:** update dependency rimraf to v3 ([#​374](https://www.github.com/google/gts/issues/374)) ([2058eaa](https://www.github.com/google/gts/commit/2058eaa682f4baae978b469fd708d1f866e7da74)) - **deps:** update dependency write-file-atomic to v3 ([#​353](https://www.github.com/google/gts/issues/353)) ([59e6aa8](https://www.github.com/google/gts/commit/59e6aa8580a2f8e9457d2d2b6fa9e18e86347592))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 03ba6b22dd8..88b07d849a0 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -57,7 +57,7 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.0", - "gts": "2.0.0-alpha.9", + "gts": "2.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", From 40b5ea1b35c999e19c5e92655854bbb4c441dbe8 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 10 Apr 2020 18:49:53 -0700 Subject: [PATCH 337/488] fix: remove eslint, update gax, fix generated protos, run the generator (#447) Run the latest version of the generator, update google-gax, update gts, and remove direct dependencies on eslint. --- packages/google-cloud-language/.jsdoc.js | 2 +- packages/google-cloud-language/.prettierrc.js | 2 +- packages/google-cloud-language/package.json | 12 ++++-------- .../cloud/language/v1/language_service.proto | 12 ++++++------ .../cloud/language/v1beta2/language_service.proto | 15 ++++++++------- packages/google-cloud-language/protos/protos.js | 2 +- packages/google-cloud-language/synth.metadata | 11 ++++++++++- packages/google-cloud-language/synth.py | 2 +- .../test/gapic_language_service_v1.ts | 12 ++++++------ .../test/gapic_language_service_v1beta2.ts | 12 ++++++------ 10 files changed, 44 insertions(+), 38 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index a9e74d68ae0..413c188891d 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2019 Google, LLC.', + copyright: 'Copyright 2020 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/language', diff --git a/packages/google-cloud-language/.prettierrc.js b/packages/google-cloud-language/.prettierrc.js index 08cba3775be..d1b95106f4c 100644 --- a/packages/google-cloud-language/.prettierrc.js +++ b/packages/google-cloud-language/.prettierrc.js @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 88b07d849a0..e76b000101d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -31,7 +31,7 @@ ], "scripts": { "docs": "jsdoc -c .jsdoc.js", - "lint": "gts fix && eslint --fix samples/*.js", + "lint": "gts fix", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", "system-test": "mocha build/system-test", "test": "c8 mocha build/test", @@ -42,10 +42,10 @@ "compile-protos": "compileProtos src", "predocs-test": "npm run docs", "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm install" }, "dependencies": { - "google-gax": "^2.0.1" + "google-gax": "^2.1.0" }, "devDependencies": { "@types/mocha": "^7.0.0", @@ -53,11 +53,7 @@ "@types/sinon": "^7.5.2", "c8": "^7.0.0", "codecov": "^3.0.2", - "eslint": "^6.0.0", - "eslint-config-prettier": "^6.0.0", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.0.0", - "gts": "2.0.0", + "gts": "^2.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index 41d92f344c7..e8e4fd8d005 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -137,11 +137,11 @@ message Document { // The language of the document (if not specified, the language is // automatically detected). Both ISO and BCP-47 language codes are // accepted.
- // [Language Support](/natural-language/docs/languages) - // lists currently supported languages for each API method. - // If the language (either specified by the caller or automatically detected) - // is not supported by the called API method, an `INVALID_ARGUMENT` error - // is returned. + // [Language + // Support](https://cloud.google.com/natural-language/docs/languages) lists + // currently supported languages for each API method. If the language (either + // specified by the caller or automatically detected) is not supported by the + // called API method, an `INVALID_ARGUMENT` error is returned. string language = 4; } @@ -954,7 +954,7 @@ message TextSpan { // Represents a category returned from the text classifier. message ClassificationCategory { // The name of the category representing the document, from the [predefined - // taxonomy](/natural-language/docs/categories). + // taxonomy](https://cloud.google.com/natural-language/docs/categories). string name = 1; // The classifier's confidence of the category. Number represents how certain diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto index 384cdf91923..afca1205cb9 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -138,11 +138,11 @@ message Document { // The language of the document (if not specified, the language is // automatically detected). Both ISO and BCP-47 language codes are // accepted.
- // [Language Support](/natural-language/docs/languages) - // lists currently supported languages for each API method. - // If the language (either specified by the caller or automatically detected) - // is not supported by the called API method, an `INVALID_ARGUMENT` error - // is returned. + // [Language + // Support](https://cloud.google.com/natural-language/docs/languages) lists + // currently supported languages for each API method. If the language (either + // specified by the caller or automatically detected) is not supported by the + // called API method, an `INVALID_ARGUMENT` error is returned. string language = 4; } @@ -961,7 +961,7 @@ message TextSpan { // Represents a category returned from the text classifier. message ClassificationCategory { // The name of the category representing the document, from the [predefined - // taxonomy](/natural-language/docs/categories). + // taxonomy](https://cloud.google.com/natural-language/docs/categories). string name = 1; // The classifier's confidence of the category. Number represents how certain @@ -1089,7 +1089,8 @@ message AnnotateTextRequest { // Classify the full document into categories. If this is true, // the API will use the default model which classifies into a - // [predefined taxonomy](/natural-language/docs/categories). + // [predefined + // taxonomy](https://cloud.google.com/natural-language/docs/categories). bool classify_text = 6; } diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index f41182c5b22..d083c20a387 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + var $root = $protobuf.roots._google_cloud_language_3_8_0_protos || ($protobuf.roots._google_cloud_language_3_8_0_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 9efc07f8a8b..c25e86cf054 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,5 +1,14 @@ { - "updateTime": "2020-03-31T19:47:14.953977Z", + "updateTime": "2020-04-11T00:27:32.512826Z", + "sources": [ + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" + } + } + ], "destinations": [ { "client": { diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index ecd49e1940d..9a2d6538d14 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -32,5 +32,5 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npm', 'run', 'lint']) subprocess.run(['npx', 'compileProtos', 'src']) diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index e8d0c1e2cd7..c9b4dda10af 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -212,7 +212,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeSentiment(request); }, expectedError); assert( @@ -302,7 +302,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeEntities(request); }, expectedError); assert( @@ -394,7 +394,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeEntitySentiment(request); }, expectedError); assert( @@ -484,7 +484,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeSyntax(request); }, expectedError); assert( @@ -574,7 +574,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.classifyText(request); }, expectedError); assert( @@ -664,7 +664,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.annotateText(request); }, expectedError); assert( diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 3818651db69..94377b9223e 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -212,7 +212,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeSentiment(request); }, expectedError); assert( @@ -302,7 +302,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeEntities(request); }, expectedError); assert( @@ -394,7 +394,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeEntitySentiment(request); }, expectedError); assert( @@ -484,7 +484,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.analyzeSyntax(request); }, expectedError); assert( @@ -574,7 +574,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.classifyText(request); }, expectedError); assert( @@ -664,7 +664,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.annotateText(request); }, expectedError); assert( From d7506c076ce39e07cf00a5a6f07f2ceb3d573711 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sat, 11 Apr 2020 19:14:59 -0700 Subject: [PATCH 338/488] build: remove unused codecov config (#448) --- packages/google-cloud-language/codecov.yaml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 packages/google-cloud-language/codecov.yaml diff --git a/packages/google-cloud-language/codecov.yaml b/packages/google-cloud-language/codecov.yaml deleted file mode 100644 index 5724ea9478d..00000000000 --- a/packages/google-cloud-language/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com From 2e4b76dc9772a8e4e8b7e4e78caa1329ee82e806 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Apr 2020 19:13:33 +0200 Subject: [PATCH 339/488] chore(deps): update dependency @google-cloud/automl to v2 (#409) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 54604d849e2..c90121116ef 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 60000" }, "dependencies": { - "@google-cloud/automl": "^1.0.0", + "@google-cloud/automl": "^2.0.0", "mathjs": "^6.0.0", "@google-cloud/language": "^3.8.0", "@google-cloud/storage": "^4.0.0", From e568329cba4a945e671b498c7f379f972a372bda Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Apr 2020 19:20:23 +0200 Subject: [PATCH 340/488] chore(deps): update dependency @types/sinon to v9 (#407) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.5.2` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/7.5.2/9.0.0) | --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index e76b000101d..f80c7fa7560 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", - "@types/sinon": "^7.5.2", + "@types/sinon": "^9.0.0", "c8": "^7.0.0", "codecov": "^3.0.2", "gts": "^2.0.0", From 46597b8e8913f0f4e3a940f235367457cd6c6124 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2020 14:45:50 -0700 Subject: [PATCH 341/488] chore: release 4.0.0 (#406) --- packages/google-cloud-language/CHANGELOG.md | 17 +++++++++++++++++ packages/google-cloud-language/package.json | 2 +- .../google-cloud-language/samples/package.json | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 1d1cbd5c5c3..ea64296281a 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,23 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [4.0.0](https://www.github.com/googleapis/nodejs-language/compare/v3.8.0...v4.0.0) (2020-04-13) + + +### ⚠ BREAKING CHANGES + +* drop node8 support (#405) + +### Features + +* deferred client initialization ([#384](https://www.github.com/googleapis/nodejs-language/issues/384)) ([b329a1c](https://www.github.com/googleapis/nodejs-language/commit/b329a1cb7c78902fc7855ef6a3a880cde2c1c83e)) +* drop node8 support ([#405](https://www.github.com/googleapis/nodejs-language/issues/405)) ([520811c](https://www.github.com/googleapis/nodejs-language/commit/520811cd008551366dfbda0912aba29bbf5a82e4)) + + +### Bug Fixes + +* remove eslint, update gax, fix generated protos, run the generator ([#447](https://www.github.com/googleapis/nodejs-language/issues/447)) ([5ed5344](https://www.github.com/googleapis/nodejs-language/commit/5ed53445f168d6d406dea1207d75541efd795086)) + ## [3.8.0](https://www.github.com/googleapis/nodejs-language/compare/v3.7.2...v3.8.0) (2020-02-28) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f80c7fa7560..bdd4a8aca15 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "3.8.0", + "version": "4.0.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index c90121116ef..08539637b5a 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^6.0.0", - "@google-cloud/language": "^3.8.0", + "@google-cloud/language": "^4.0.0", "@google-cloud/storage": "^4.0.0", "yargs": "^15.0.0" }, From 3779af4be0ddaeb14bf2df8935b33b0a17969811 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 15:32:45 -0700 Subject: [PATCH 342/488] chore: update lint ignore files (#449) --- packages/google-cloud-language/.eslintignore | 3 ++- packages/google-cloud-language/.prettierignore | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/.eslintignore b/packages/google-cloud-language/.eslintignore index 09b31fe735a..9340ad9b86d 100644 --- a/packages/google-cloud-language/.eslintignore +++ b/packages/google-cloud-language/.eslintignore @@ -1,5 +1,6 @@ **/node_modules -src/**/doc/* +**/coverage +test/fixtures build/ docs/ protos/ diff --git a/packages/google-cloud-language/.prettierignore b/packages/google-cloud-language/.prettierignore index f6fac98b0a8..9340ad9b86d 100644 --- a/packages/google-cloud-language/.prettierignore +++ b/packages/google-cloud-language/.prettierignore @@ -1,3 +1,6 @@ -node_modules/* -samples/node_modules/* -src/**/doc/* +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ From 0a6c038651945ad8044cc3f0b92ea31f9e1feefa Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 19:29:49 -0700 Subject: [PATCH 343/488] chore: remove tslint.json (#450) --- packages/google-cloud-language/tslint.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 packages/google-cloud-language/tslint.json diff --git a/packages/google-cloud-language/tslint.json b/packages/google-cloud-language/tslint.json deleted file mode 100644 index 617dc975bae..00000000000 --- a/packages/google-cloud-language/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "gts/tslint.json" -} From ac8e38539fca4979907e9040c14466c708804d62 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 14 Apr 2020 09:54:43 -0700 Subject: [PATCH 344/488] chore: remove unused dev packages (#452) --- packages/google-cloud-language/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index bdd4a8aca15..f4e3483636c 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -61,7 +61,6 @@ "mocha": "^7.0.0", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", - "prettier": "^1.11.1", "sinon": "^9.0.1", "ts-loader": "^6.2.1", "typescript": "^3.8.3", From 652b31ab1175b6be2f3b9e159f65270e8d6b75e4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 17:32:25 +0200 Subject: [PATCH 345/488] chore(deps): update dependency ts-loader to v7 (#453) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | devDependencies | major | [`^6.2.1` -> `^7.0.0`](https://renovatebot.com/diffs/npm/ts-loader/6.2.2/7.0.0) | --- ### Release Notes
TypeStrong/ts-loader ### [`v7.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v700) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v6.2.2...v7.0.0) - [Project reference support enhancements](https://togithub.com/TypeStrong/ts-loader/pull/1076) - thanks [@​sheetalkamat](https://togithub.com/sheetalkamat)! - Following the end of life of Node 8, `ts-loader` no longer supports Node 8 **BREAKING CHANGE**
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f4e3483636c..599c625ca83 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -62,7 +62,7 @@ "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", - "ts-loader": "^6.2.1", + "ts-loader": "^7.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", "webpack-cli": "^3.3.10" From 876430abbbb15f43eb709a636031998f2762f757 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 18:34:15 +0200 Subject: [PATCH 346/488] chore(deps): update dependency null-loader to v4 (#454) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [null-loader](https://togithub.com/webpack-contrib/null-loader) | devDependencies | major | [`^3.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/null-loader/3.0.0/4.0.0) | --- ### Release Notes
webpack-contrib/null-loader ### [`v4.0.0`](https://togithub.com/webpack-contrib/null-loader/blob/master/CHANGELOG.md#​400-httpsgithubcomwebpack-contribnull-loadercomparev300v400-2020-04-15) [Compare Source](https://togithub.com/webpack-contrib/null-loader/compare/v3.0.0...v4.0.0) ##### Bug Fixes - support `webpack@5` ##### ⚠ BREAKING CHANGES - minimum required Nodejs version is `10.13`
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 599c625ca83..a3ed0556dbd 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -59,7 +59,7 @@ "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", "mocha": "^7.0.0", - "null-loader": "^3.0.0", + "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", "ts-loader": "^7.0.0", From 97de49d2fb4c1f0bbbd77017ccef704c54a98bef Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 15 Apr 2020 10:34:08 -0700 Subject: [PATCH 347/488] chore: run fix instead of lint in synthfile (#455) --- packages/google-cloud-language/synth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index 9a2d6538d14..15033a47b16 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -12,7 +12,7 @@ # tasks has two product names, and a poorly named artman yaml for version in ['v1', 'v1beta2']: library = gapic.typescript_library( - 'language', + 'language', generator_args={ "grpc-service-config": f"google/cloud/language/{version}/language_grpc_service_config.json", "package-name":f"@google-cloud/language" @@ -32,5 +32,5 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'lint']) +subprocess.run(['npm', 'run', 'fix']) subprocess.run(['npx', 'compileProtos', 'src']) From 3b290382e49e361c3cad63843560994dbbf66d9d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 20 Apr 2020 15:16:14 -0700 Subject: [PATCH 348/488] chore: linting (#456) --- .../google-cloud-language/protos/protos.js | 2 +- .../src/v1/language_service_client.ts | 773 +++++-------- .../src/v1beta2/language_service_client.ts | 793 +++++-------- packages/google-cloud-language/synth.metadata | 18 +- .../system-test/fixtures/sample/src/index.js | 1 + .../system-test/install.ts | 28 +- .../test/gapic_language_service_v1.ts | 1029 +++++++---------- .../test/gapic_language_service_v1beta2.ts | 1029 +++++++---------- .../google-cloud-language/webpack.config.js | 12 +- 9 files changed, 1502 insertions(+), 2183 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index d083c20a387..0c67f1c08c4 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_language_3_8_0_protos || ($protobuf.roots._google_cloud_language_3_8_0_protos = {}); + var $root = $protobuf.roots._google_cloud_language_4_0_0_protos || ($protobuf.roots._google_cloud_language_4_0_0_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index dac960769f0..a3c89f69df9 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -39,12 +39,7 @@ export class LanguageServiceClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; + descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}}; innerApiCalls: {[name: string]: Function}; languageServiceStub?: Promise<{[name: string]: Function}>; @@ -77,12 +72,10 @@ export class LanguageServiceClient { constructor(opts?: ClientOptions) { // Ensure that options include the service address and port. const staticMembers = this.constructor as typeof LanguageServiceClient; - const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; + const servicePath = opts && opts.servicePath ? + opts.servicePath : + ((opts && opts.apiEndpoint) ? opts.apiEndpoint : + staticMembers.servicePath); const port = opts && opts.port ? opts.port : staticMembers.port; if (!opts) { @@ -92,8 +85,8 @@ export class LanguageServiceClient { opts.port = opts.port || port; opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { + const isBrowser = (typeof window !== 'undefined'); + if (isBrowser){ opts.fallback = true; } // If we are in browser, we are already using fallback because of the @@ -110,10 +103,13 @@ export class LanguageServiceClient { this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; if (typeof process !== 'undefined' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { @@ -129,27 +125,18 @@ export class LanguageServiceClient { // For Node.js, pass the path to JSON proto file. // For browsers, pass the JSON content. - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); + const nodejsProtoPath = path.join(__dirname, '..', '..', 'protos', 'protos.json'); this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath + opts.fallback ? + // eslint-disable-next-line @typescript-eslint/no-var-requires + require("../../protos/protos.json") : + nodejsProtoPath ); // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.language.v1.LanguageService', - gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, - {'x-goog-api-client': clientHeader.join(' ')} - ); + 'google.cloud.language.v1.LanguageService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -177,25 +164,16 @@ export class LanguageServiceClient { // Put together the "service stub" for // google.cloud.language.v1.LanguageService. this.languageServiceStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.language.v1.LanguageService' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.language.v1.LanguageService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.language.v1.LanguageService, - this._opts - ) as Promise<{[method: string]: Function}>; + this._opts) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides // and create an API call method for each. - const languageServiceStubMethods = [ - 'analyzeSentiment', - 'analyzeEntities', - 'analyzeEntitySentiment', - 'analyzeSyntax', - 'classifyText', - 'annotateText', - ]; + const languageServiceStubMethods = + ['analyzeSentiment', 'analyzeEntities', 'analyzeEntitySentiment', 'analyzeSyntax', 'classifyText', 'annotateText']; for (const methodName of languageServiceStubMethods) { const callPromise = this.languageServiceStub.then( stub => (...args: Array<{}>) => { @@ -205,17 +183,16 @@ export class LanguageServiceClient { const func = stub[methodName]; return func.apply(stub, args); }, - (err: Error | null | undefined) => () => { + (err: Error|null|undefined) => () => { throw err; - } - ); + }); const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); this.innerApiCalls[methodName] = apiCall; @@ -253,7 +230,7 @@ export class LanguageServiceClient { static get scopes() { return [ 'https://www.googleapis.com/auth/cloud-language', - 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform' ]; } @@ -264,9 +241,8 @@ export class LanguageServiceClient { * @param {function(Error, string)} callback - the callback to * be called with the current project Id. */ - getProjectId( - callback?: Callback - ): Promise | void { + getProjectId(callback?: Callback): + Promise|void { if (callback) { this.auth.getProjectId(callback); return; @@ -278,82 +254,61 @@ export class LanguageServiceClient { // -- Service calls -- // ------------------- analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1.IAnalyzeSentimentRequest|undefined, {}|undefined + ]>; analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - | protos.google.cloud.language.v1.IAnalyzeSentimentRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1.IAnalyzeSentimentRequest|null|undefined, + {}|null|undefined>): void; analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - | protos.google.cloud.language.v1.IAnalyzeSentimentRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate sentence offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1.IAnalyzeSentimentRequest|null|undefined, + {}|null|undefined>): void; +/** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate sentence offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1.IAnalyzeSentimentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - | protos.google.cloud.language.v1.IAnalyzeSentimentRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - | protos.google.cloud.language.v1.IAnalyzeSentimentRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1.IAnalyzeSentimentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1.IAnalyzeSentimentRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -361,84 +316,63 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|undefined, {}|undefined + ]>; analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|null|undefined, + {}|null|undefined>): void; analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|null|undefined, + {}|null|undefined>): void; +/** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -446,172 +380,126 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - ( - | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest - | undefined - ), - {} | undefined - ] - >; + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|undefined, {}|undefined + ]>; analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|null|undefined, + {}|null|undefined>): void; analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|null|undefined, + {}|null|undefined>): void; +/** + * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - ( - | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest - | undefined - ), - {} | undefined - ] - > | void { + protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; this.initialize(); - return this.innerApiCalls.analyzeEntitySentiment( - request, - options, - callback - ); + return this.innerApiCalls.analyzeEntitySentiment(request, options, callback); } analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|undefined, {}|undefined + ]>; analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|null|undefined, + {}|null|undefined>): void; analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|null|undefined, + {}|null|undefined>): void; +/** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - | protos.google.cloud.language.v1.IAnalyzeSyntaxRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -619,74 +507,59 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1.IClassifyTextRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest|undefined, {}|undefined + ]>; classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1.IClassifyTextRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest|null|undefined, + {}|null|undefined>): void; classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, - callback: Callback< - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Classifies a document into categories. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IClassifyTextRequest, + callback: Callback< + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest|null|undefined, + {}|null|undefined>): void; +/** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1.IClassifyTextRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1.IClassifyTextResponse, - | protos.google.cloud.language.v1.IClassifyTextRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1.IClassifyTextRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -694,79 +567,64 @@ export class LanguageServiceClient { return this.innerApiCalls.classifyText(request, options, callback); } annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1.IAnnotateTextRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest|undefined, {}|undefined + ]>; annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1.IAnnotateTextRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest|null|undefined, + {}|null|undefined>): void; annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * A convenience method that provides all the features that analyzeSentiment, - * analyzeEntities, and analyzeSyntax provide in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.AnnotateTextRequest.Features} request.features - * The enabled features. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnnotateTextRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest|null|undefined, + {}|null|undefined>): void; +/** + * A convenience method that provides all the features that analyzeSentiment, + * analyzeEntities, and analyzeSyntax provide in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.AnnotateTextRequest.Features} request.features + * The enabled features. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1.IAnnotateTextRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1.IAnnotateTextResponse, - | protos.google.cloud.language.v1.IAnnotateTextRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1.IAnnotateTextRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -774,6 +632,7 @@ export class LanguageServiceClient { return this.innerApiCalls.annotateText(request, options, callback); } + /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 7ca3bf028a6..0243ebcf890 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -39,12 +39,7 @@ export class LanguageServiceClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; + descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}}; innerApiCalls: {[name: string]: Function}; languageServiceStub?: Promise<{[name: string]: Function}>; @@ -77,12 +72,10 @@ export class LanguageServiceClient { constructor(opts?: ClientOptions) { // Ensure that options include the service address and port. const staticMembers = this.constructor as typeof LanguageServiceClient; - const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; + const servicePath = opts && opts.servicePath ? + opts.servicePath : + ((opts && opts.apiEndpoint) ? opts.apiEndpoint : + staticMembers.servicePath); const port = opts && opts.port ? opts.port : staticMembers.port; if (!opts) { @@ -92,8 +85,8 @@ export class LanguageServiceClient { opts.port = opts.port || port; opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { + const isBrowser = (typeof window !== 'undefined'); + if (isBrowser){ opts.fallback = true; } // If we are in browser, we are already using fallback because of the @@ -110,10 +103,13 @@ export class LanguageServiceClient { this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; if (typeof process !== 'undefined' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { @@ -129,27 +125,18 @@ export class LanguageServiceClient { // For Node.js, pass the path to JSON proto file. // For browsers, pass the JSON content. - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); + const nodejsProtoPath = path.join(__dirname, '..', '..', 'protos', 'protos.json'); this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath + opts.fallback ? + // eslint-disable-next-line @typescript-eslint/no-var-requires + require("../../protos/protos.json") : + nodejsProtoPath ); // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.language.v1beta2.LanguageService', - gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, - {'x-goog-api-client': clientHeader.join(' ')} - ); + 'google.cloud.language.v1beta2.LanguageService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -177,25 +164,16 @@ export class LanguageServiceClient { // Put together the "service stub" for // google.cloud.language.v1beta2.LanguageService. this.languageServiceStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.language.v1beta2.LanguageService' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.language.v1beta2.LanguageService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.language.v1beta2.LanguageService, - this._opts - ) as Promise<{[method: string]: Function}>; + this._opts) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides // and create an API call method for each. - const languageServiceStubMethods = [ - 'analyzeSentiment', - 'analyzeEntities', - 'analyzeEntitySentiment', - 'analyzeSyntax', - 'classifyText', - 'annotateText', - ]; + const languageServiceStubMethods = + ['analyzeSentiment', 'analyzeEntities', 'analyzeEntitySentiment', 'analyzeSyntax', 'classifyText', 'annotateText']; for (const methodName of languageServiceStubMethods) { const callPromise = this.languageServiceStub.then( stub => (...args: Array<{}>) => { @@ -205,17 +183,16 @@ export class LanguageServiceClient { const func = stub[methodName]; return func.apply(stub, args); }, - (err: Error | null | undefined) => () => { + (err: Error|null|undefined) => () => { throw err; - } - ); + }); const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); this.innerApiCalls[methodName] = apiCall; @@ -253,7 +230,7 @@ export class LanguageServiceClient { static get scopes() { return [ 'https://www.googleapis.com/auth/cloud-language', - 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform' ]; } @@ -264,9 +241,8 @@ export class LanguageServiceClient { * @param {function(Error, string)} callback - the callback to * be called with the current project Id. */ - getProjectId( - callback?: Callback - ): Promise | void { + getProjectId(callback?: Callback): + Promise|void { if (callback) { this.auth.getProjectId(callback); return; @@ -278,83 +254,62 @@ export class LanguageServiceClient { // -- Service calls -- // ------------------- analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|undefined, {}|undefined + ]>; analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|null|undefined, + {}|null|undefined>): void; analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|null|undefined, + {}|null|undefined>): void; +/** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -362,84 +317,63 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|undefined, {}|undefined + ]>; analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|null|undefined, + {}|null|undefined>): void; analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|null|undefined, + {}|null|undefined>): void; +/** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -447,178 +381,126 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - ( - | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest - | undefined - ), - {} | undefined - ] - >; + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|undefined, {}|undefined + ]>; analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|null|undefined, + {}|null|undefined>): void; analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Finds entities, similar to {@link google.cloud.language.v1beta2.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|null|undefined, + {}|null|undefined>): void; +/** + * Finds entities, similar to {@link google.cloud.language.v1beta2.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - ( - | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest - | undefined - ), - {} | undefined - ] - > | void { + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; this.initialize(); - return this.innerApiCalls.analyzeEntitySentiment( - request, - options, - callback - ); + return this.innerApiCalls.analyzeEntitySentiment(request, options, callback); } analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|undefined, {}|undefined + ]>; analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|null|undefined, + {}|null|undefined>): void; analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part-of-speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|null|undefined, + {}|null|undefined>): void; +/** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part-of-speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -626,80 +508,59 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - protos.google.cloud.language.v1beta2.IClassifyTextRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + protos.google.cloud.language.v1beta2.IClassifyTextRequest|undefined, {}|undefined + ]>; classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - | protos.google.cloud.language.v1beta2.IClassifyTextRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + protos.google.cloud.language.v1beta2.IClassifyTextRequest|null|undefined, + {}|null|undefined>): void; classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - | protos.google.cloud.language.v1beta2.IClassifyTextRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Classifies a document into categories. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + protos.google.cloud.language.v1beta2.IClassifyTextRequest|null|undefined, + {}|null|undefined>): void; +/** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1beta2.IClassifyTextResponse, - | protos.google.cloud.language.v1beta2.IClassifyTextRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - | protos.google.cloud.language.v1beta2.IClassifyTextRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - protos.google.cloud.language.v1beta2.IClassifyTextRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1beta2.IClassifyTextRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + protos.google.cloud.language.v1beta2.IClassifyTextRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + protos.google.cloud.language.v1beta2.IClassifyTextRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -707,85 +568,64 @@ export class LanguageServiceClient { return this.innerApiCalls.classifyText(request, options, callback); } annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - protos.google.cloud.language.v1beta2.IAnnotateTextRequest | undefined, - {} | undefined - ] - >; + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + options?: gax.CallOptions): + Promise<[ + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + protos.google.cloud.language.v1beta2.IAnnotateTextRequest|undefined, {}|undefined + ]>; annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - | protos.google.cloud.language.v1beta2.IAnnotateTextRequest - | null - | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + protos.google.cloud.language.v1beta2.IAnnotateTextRequest|null|undefined, + {}|null|undefined>): void; annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - | protos.google.cloud.language.v1beta2.IAnnotateTextRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * A convenience method that provides all syntax, sentiment, entity, and - * classification features in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.AnnotateTextRequest.Features} request.features - * Required. The enabled features. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + protos.google.cloud.language.v1beta2.IAnnotateTextRequest|null|undefined, + {}|null|undefined>): void; +/** + * A convenience method that provides all syntax, sentiment, entity, and + * classification features in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.AnnotateTextRequest.Features} request.features + * Required. The enabled features. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + optionsOrCallback?: gax.CallOptions|Callback< protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - | protos.google.cloud.language.v1beta2.IAnnotateTextRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - | protos.google.cloud.language.v1beta2.IAnnotateTextRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - protos.google.cloud.language.v1beta2.IAnnotateTextRequest | undefined, - {} | undefined - ] - > | void { + protos.google.cloud.language.v1beta2.IAnnotateTextRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + protos.google.cloud.language.v1beta2.IAnnotateTextRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + protos.google.cloud.language.v1beta2.IAnnotateTextRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -793,6 +633,7 @@ export class LanguageServiceClient { return this.innerApiCalls.annotateText(request, options, callback); } + /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index c25e86cf054..bae0a1d8bdc 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -1,11 +1,25 @@ { - "updateTime": "2020-04-11T00:27:32.512826Z", "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/nodejs-language.git", + "sha": "e11e643289693bd582f379fc3b9015680811da38" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "cdf13efacdea0649e940452f9c5d320b93735974", + "internalRef": "306783437" + } + }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" + "sha": "52638600f387deb98efb5f9c85fec39e82aa9052" } } ], diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js index a4274b479c3..e05c05ecda1 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** + /* eslint-disable node/no-missing-require, no-unused-vars */ const language = require('@google-cloud/language'); diff --git a/packages/google-cloud-language/system-test/install.ts b/packages/google-cloud-language/system-test/install.ts index c4d80e9c0c8..5e4ed636481 100644 --- a/packages/google-cloud-language/system-test/install.ts +++ b/packages/google-cloud-language/system-test/install.ts @@ -16,36 +16,34 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; +import { packNTest } from 'pack-n-play'; +import { readFileSync } from 'fs'; +import { describe, it } from 'mocha'; describe('typescript consumer tests', () => { + it('should have correct type signature for typescript users', async function() { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), // path to your module. sample: { description: 'typescript based user can use the type definitions', - ts: readFileSync( - './system-test/fixtures/sample/src/index.ts' - ).toString(), - }, + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } }; - await packNTest(options); // will throw upon error. + await packNTest(options); // will throw upon error. }); it('should have correct type signature for javascript users', async function() { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), // path to your module. sample: { description: 'typescript based user can use the type definitions', - ts: readFileSync( - './system-test/fixtures/sample/src/index.js' - ).toString(), - }, + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } }; - await packNTest(options); // will throw upon error. + await packNTest(options); // will throw upon error. }); + }); diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index c9b4dda10af..fed52aa338e 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -20,658 +20,461 @@ import * as protos from '../protos/protos'; import * as assert from 'assert'; import * as sinon from 'sinon'; import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; +import { describe, it } from 'mocha'; import * as languageserviceModule from '../src'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); - return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject - ) as T; + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; } function stubSimpleCall(response?: ResponseType, error?: Error) { - return error - ? sinon.stub().rejects(error) - : sinon.stub().resolves([response]); + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); } -function stubSimpleCallWithCallback( - response?: ResponseType, - error?: Error -) { - return error - ? sinon.stub().callsArgWith(2, error) - : sinon.stub().callsArgWith(2, null, response); +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); } describe('v1.LanguageServiceClient', () => { - it('has servicePath', () => { - const servicePath = - languageserviceModule.v1.LanguageServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - languageserviceModule.v1.LanguageServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = languageserviceModule.v1.LanguageServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new languageserviceModule.v1.LanguageServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - fallback: true, + it('has servicePath', () => { + const servicePath = languageserviceModule.v1.LanguageServiceClient.servicePath; + assert(servicePath); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.languageServiceStub, undefined); - await client.initialize(); - assert(client.languageServiceStub); - }); - - it('has close method', () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - - describe('analyzeSentiment', () => { - it('invokes analyzeSentiment without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSentimentRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSentimentResponse() - ); - client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeSentiment(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('has apiEndpoint', () => { + const apiEndpoint = languageserviceModule.v1.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); }); - it('invokes analyzeSentiment without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSentimentRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSentimentResponse() - ); - client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.analyzeSentiment( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1.IAnalyzeSentimentResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('has port', () => { + const port = languageserviceModule.v1.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - it('invokes analyzeSentiment with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSentimentRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeSentiment = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.analyzeSentiment(request); - }, expectedError); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('analyzeEntities', () => { - it('invokes analyzeEntities without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() - ); - client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeEntities(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('should create a client with no option', () => { + const client = new languageserviceModule.v1.LanguageServiceClient(); + assert(client); }); - it('invokes analyzeEntities without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() - ); - client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.analyzeEntities( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1.IAnalyzeEntitiesResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('should create a client with gRPC fallback', () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + fallback: true, + }); + assert(client); }); - it('invokes analyzeEntities with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeEntities = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.analyzeEntities(request); - }, expectedError); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('analyzeEntitySentiment', () => { - it('invokes analyzeEntitySentiment without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() - ); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( - expectedResponse - ); - const [response] = await client.analyzeEntitySentiment(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); }); - it('invokes analyzeEntitySentiment without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() - ); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.analyzeEntitySentiment( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('has close method', () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.close(); }); - it('invokes analyzeEntitySentiment with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.analyzeEntitySentiment(request); - }, expectedError); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('analyzeSyntax', () => { - it('invokes analyzeSyntax without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() - ); - client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeSyntax(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - it('invokes analyzeSyntax without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() - ); - client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.analyzeSyntax( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1.IAnalyzeSyntaxResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - it('invokes analyzeSyntax with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeSyntax = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.analyzeSyntax(request); - }, expectedError); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('classifyText', () => { - it('invokes classifyText without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.ClassifyTextRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.ClassifyTextResponse() - ); - client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); - const [response] = await client.classifyText(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + describe('analyzeSentiment', () => { + it('invokes analyzeSentiment without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentResponse()); + client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes analyzeSentiment without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentResponse()); + client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.analyzeSentiment( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1.IAnalyzeSentimentResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes analyzeSentiment with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSentiment = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.analyzeSentiment(request); }, expectedError); + assert((client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes classifyText without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.ClassifyTextRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.ClassifyTextResponse() - ); - client.innerApiCalls.classifyText = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.classifyText( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1.IClassifyTextResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + describe('analyzeEntities', () => { + it('invokes analyzeEntities without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesResponse()); + client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeEntities(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes analyzeEntities without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesResponse()); + client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.analyzeEntities( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1.IAnalyzeEntitiesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes analyzeEntities with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntities = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.analyzeEntities(request); }, expectedError); + assert((client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes classifyText with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.ClassifyTextRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.classifyText = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.classifyText(request); - }, expectedError); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + describe('analyzeEntitySentiment', () => { + it('invokes analyzeEntitySentiment without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse()); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeEntitySentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes analyzeEntitySentiment without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse()); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.analyzeEntitySentiment( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes analyzeEntitySentiment with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.analyzeEntitySentiment(request); }, expectedError); + assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - }); - - describe('annotateText', () => { - it('invokes annotateText without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnnotateTextRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnnotateTextResponse() - ); - client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); - const [response] = await client.annotateText(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + + describe('analyzeSyntax', () => { + it('invokes analyzeSyntax without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxResponse()); + client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSyntax(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes analyzeSyntax without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxResponse()); + client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.analyzeSyntax( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1.IAnalyzeSyntaxResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes analyzeSyntax with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSyntax = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.analyzeSyntax(request); }, expectedError); + assert((client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes annotateText without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnnotateTextRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1.AnnotateTextResponse() - ); - client.innerApiCalls.annotateText = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.annotateText( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1.IAnnotateTextResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + describe('classifyText', () => { + it('invokes classifyText without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextResponse()); + client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); + const [response] = await client.classifyText(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.classifyText as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes classifyText without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextResponse()); + client.innerApiCalls.classifyText = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.classifyText( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1.IClassifyTextResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.classifyText as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes classifyText with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.classifyText = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.classifyText(request); }, expectedError); + assert((client.innerApiCalls.classifyText as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes annotateText with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1.AnnotateTextRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.annotateText = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.annotateText(request); - }, expectedError); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + describe('annotateText', () => { + it('invokes annotateText without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextResponse()); + client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); + const [response] = await client.annotateText(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.annotateText as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes annotateText without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextResponse()); + client.innerApiCalls.annotateText = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.annotateText( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1.IAnnotateTextResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.annotateText as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes annotateText with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.annotateText = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.annotateText(request); }, expectedError); + assert((client.innerApiCalls.annotateText as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - }); }); diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 94377b9223e..d66070bb18b 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -20,658 +20,461 @@ import * as protos from '../protos/protos'; import * as assert from 'assert'; import * as sinon from 'sinon'; import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; +import { describe, it } from 'mocha'; import * as languageserviceModule from '../src'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); - return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject - ) as T; + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; } function stubSimpleCall(response?: ResponseType, error?: Error) { - return error - ? sinon.stub().rejects(error) - : sinon.stub().resolves([response]); + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); } -function stubSimpleCallWithCallback( - response?: ResponseType, - error?: Error -) { - return error - ? sinon.stub().callsArgWith(2, error) - : sinon.stub().callsArgWith(2, null, response); +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); } describe('v1beta2.LanguageServiceClient', () => { - it('has servicePath', () => { - const servicePath = - languageserviceModule.v1beta2.LanguageServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - languageserviceModule.v1beta2.LanguageServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = languageserviceModule.v1beta2.LanguageServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - fallback: true, + it('has servicePath', () => { + const servicePath = languageserviceModule.v1beta2.LanguageServiceClient.servicePath; + assert(servicePath); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.languageServiceStub, undefined); - await client.initialize(); - assert(client.languageServiceStub); - }); - - it('has close method', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - - describe('analyzeSentiment', () => { - it('invokes analyzeSentiment without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() - ); - client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeSentiment(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('has apiEndpoint', () => { + const apiEndpoint = languageserviceModule.v1beta2.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); }); - it('invokes analyzeSentiment without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() - ); - client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.analyzeSentiment( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('has port', () => { + const port = languageserviceModule.v1beta2.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - it('invokes analyzeSentiment with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeSentiment = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.analyzeSentiment(request); - }, expectedError); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('analyzeEntities', () => { - it('invokes analyzeEntities without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() - ); - client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeEntities(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('should create a client with no option', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient(); + assert(client); }); - it('invokes analyzeEntities without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() - ); - client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.analyzeEntities( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('should create a client with gRPC fallback', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + fallback: true, + }); + assert(client); }); - it('invokes analyzeEntities with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeEntities = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.analyzeEntities(request); - }, expectedError); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('analyzeEntitySentiment', () => { - it('invokes analyzeEntitySentiment without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() - ); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( - expectedResponse - ); - const [response] = await client.analyzeEntitySentiment(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); }); - it('invokes analyzeEntitySentiment without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() - ); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.analyzeEntitySentiment( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('has close method', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.close(); }); - it('invokes analyzeEntitySentiment with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.analyzeEntitySentiment(request); - }, expectedError); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('analyzeSyntax', () => { - it('invokes analyzeSyntax without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() - ); - client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeSyntax(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - it('invokes analyzeSyntax without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() - ); - client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.analyzeSyntax( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - it('invokes analyzeSyntax with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeSyntax = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.analyzeSyntax(request); - }, expectedError); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('classifyText', () => { - it('invokes classifyText without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.ClassifyTextRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.ClassifyTextResponse() - ); - client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); - const [response] = await client.classifyText(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + describe('analyzeSentiment', () => { + it('invokes analyzeSentiment without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse()); + client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes analyzeSentiment without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse()); + client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.analyzeSentiment( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes analyzeSentiment with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSentiment = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.analyzeSentiment(request); }, expectedError); + assert((client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes classifyText without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.ClassifyTextRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.ClassifyTextResponse() - ); - client.innerApiCalls.classifyText = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.classifyText( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1beta2.IClassifyTextResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + describe('analyzeEntities', () => { + it('invokes analyzeEntities without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse()); + client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeEntities(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes analyzeEntities without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse()); + client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.analyzeEntities( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes analyzeEntities with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntities = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.analyzeEntities(request); }, expectedError); + assert((client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes classifyText with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.ClassifyTextRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.classifyText = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.classifyText(request); - }, expectedError); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + describe('analyzeEntitySentiment', () => { + it('invokes analyzeEntitySentiment without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse()); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeEntitySentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes analyzeEntitySentiment without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse()); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.analyzeEntitySentiment( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes analyzeEntitySentiment with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.analyzeEntitySentiment(request); }, expectedError); + assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - }); - - describe('annotateText', () => { - it('invokes annotateText without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnnotateTextRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnnotateTextResponse() - ); - client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); - const [response] = await client.annotateText(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + + describe('analyzeSyntax', () => { + it('invokes analyzeSyntax without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse()); + client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSyntax(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes analyzeSyntax without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse()); + client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.analyzeSyntax( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes analyzeSyntax with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSyntax = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.analyzeSyntax(request); }, expectedError); + assert((client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes annotateText without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnnotateTextRequest() - ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnnotateTextResponse() - ); - client.innerApiCalls.annotateText = stubSimpleCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.annotateText( - request, - ( - err?: Error | null, - result?: protos.google.cloud.language.v1beta2.IAnnotateTextResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + describe('classifyText', () => { + it('invokes classifyText without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextResponse()); + client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); + const [response] = await client.classifyText(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.classifyText as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes classifyText without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextResponse()); + client.innerApiCalls.classifyText = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.classifyText( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IClassifyTextResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.classifyText as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes classifyText with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.classifyText = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.classifyText(request); }, expectedError); + assert((client.innerApiCalls.classifyText as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes annotateText with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.language.v1beta2.AnnotateTextRequest() - ); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.annotateText = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.annotateText(request); - }, expectedError); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + describe('annotateText', () => { + it('invokes annotateText without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextResponse()); + client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); + const [response] = await client.annotateText(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.annotateText as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes annotateText without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextRequest()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextResponse()); + client.innerApiCalls.annotateText = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.annotateText( + request, + (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnnotateTextResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.annotateText as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes annotateText with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextRequest()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.annotateText = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => { await client.annotateText(request); }, expectedError); + assert((client.innerApiCalls.annotateText as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - }); }); diff --git a/packages/google-cloud-language/webpack.config.js b/packages/google-cloud-language/webpack.config.js index e92ce835266..ea86f1d01be 100644 --- a/packages/google-cloud-language/webpack.config.js +++ b/packages/google-cloud-language/webpack.config.js @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/, + exclude: /node_modules/ }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader', + use: 'null-loader' }, { test: /node_modules[\\/]grpc/, - use: 'null-loader', + use: 'null-loader' }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader', + use: 'null-loader' }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader', + use: 'null-loader' }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader', + use: 'null-loader' }, ], }, From 41f96cac956af40ce30d749f5edd5321b62f3c23 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 Apr 2020 20:32:48 -0700 Subject: [PATCH 349/488] build: adopt changes to generator formatting (#457) --- .../google-cloud-language/protos/protos.js | 536 ++++----- .../src/v1/language_service_client.ts | 773 ++++++++----- .../src/v1beta2/language_service_client.ts | 793 ++++++++----- packages/google-cloud-language/synth.metadata | 8 +- .../system-test/fixtures/sample/src/index.js | 1 - .../system-test/install.ts | 32 +- .../test/gapic_language_service_v1.ts | 1029 ++++++++++------- .../test/gapic_language_service_v1beta2.ts | 1029 ++++++++++------- .../google-cloud-language/webpack.config.js | 12 +- 9 files changed, 2454 insertions(+), 1759 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 0c67f1c08c4..222a0e18860 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -396,13 +396,13 @@ Document.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); - if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) + if (message.gcsContentUri != null && Object.hasOwnProperty.call(message, "gcsContentUri")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsContentUri); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.language); return writer; }; @@ -596,7 +596,7 @@ /** * Type enum. * @name google.cloud.language.v1.Document.Type - * @enum {string} + * @enum {number} * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value * @property {number} PLAIN_TEXT=1 PLAIN_TEXT value * @property {number} HTML=2 HTML value @@ -677,9 +677,9 @@ Sentence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && Object.hasOwnProperty.call(message, "text")) $root.google.cloud.language.v1.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) $root.google.cloud.language.v1.Sentiment.encode(message.sentiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -935,19 +935,19 @@ Entity.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.metadata != null && message.hasOwnProperty("metadata")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.salience != null && message.hasOwnProperty("salience")) + if (message.salience != null && Object.hasOwnProperty.call(message, "salience")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.salience); if (message.mentions != null && message.mentions.length) for (var i = 0; i < message.mentions.length; ++i) $root.google.cloud.language.v1.EntityMention.encode(message.mentions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) $root.google.cloud.language.v1.Sentiment.encode(message.sentiment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -1247,7 +1247,7 @@ /** * Type enum. * @name google.cloud.language.v1.Entity.Type - * @enum {string} + * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} PERSON=1 PERSON value * @property {number} LOCATION=2 LOCATION value @@ -1286,7 +1286,7 @@ /** * EncodingType enum. * @name google.cloud.language.v1.EncodingType - * @enum {string} + * @enum {number} * @property {number} NONE=0 NONE value * @property {number} UTF8=1 UTF8 value * @property {number} UTF16=2 UTF16 value @@ -1384,13 +1384,13 @@ Token.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && Object.hasOwnProperty.call(message, "text")) $root.google.cloud.language.v1.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) + if (message.partOfSpeech != null && Object.hasOwnProperty.call(message, "partOfSpeech")) $root.google.cloud.language.v1.PartOfSpeech.encode(message.partOfSpeech, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) + if (message.dependencyEdge != null && Object.hasOwnProperty.call(message, "dependencyEdge")) $root.google.cloud.language.v1.DependencyEdge.encode(message.dependencyEdge, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.lemma != null && message.hasOwnProperty("lemma")) + if (message.lemma != null && Object.hasOwnProperty.call(message, "lemma")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.lemma); return writer; }; @@ -1635,9 +1635,9 @@ Sentiment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.magnitude != null && message.hasOwnProperty("magnitude")) + if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.magnitude); - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.score); return writer; }; @@ -1935,29 +1935,29 @@ PartOfSpeech.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tag != null && message.hasOwnProperty("tag")) + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tag); - if (message.aspect != null && message.hasOwnProperty("aspect")) + if (message.aspect != null && Object.hasOwnProperty.call(message, "aspect")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.aspect); - if (message["case"] != null && message.hasOwnProperty("case")) + if (message["case"] != null && Object.hasOwnProperty.call(message, "case")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message["case"]); - if (message.form != null && message.hasOwnProperty("form")) + if (message.form != null && Object.hasOwnProperty.call(message, "form")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.form); - if (message.gender != null && message.hasOwnProperty("gender")) + if (message.gender != null && Object.hasOwnProperty.call(message, "gender")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.gender); - if (message.mood != null && message.hasOwnProperty("mood")) + if (message.mood != null && Object.hasOwnProperty.call(message, "mood")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mood); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.number); - if (message.person != null && message.hasOwnProperty("person")) + if (message.person != null && Object.hasOwnProperty.call(message, "person")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.person); - if (message.proper != null && message.hasOwnProperty("proper")) + if (message.proper != null && Object.hasOwnProperty.call(message, "proper")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.proper); - if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + if (message.reciprocity != null && Object.hasOwnProperty.call(message, "reciprocity")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.reciprocity); - if (message.tense != null && message.hasOwnProperty("tense")) + if (message.tense != null && Object.hasOwnProperty.call(message, "tense")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.tense); - if (message.voice != null && message.hasOwnProperty("voice")) + if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.voice); return writer; }; @@ -2656,7 +2656,7 @@ /** * Tag enum. * @name google.cloud.language.v1.PartOfSpeech.Tag - * @enum {string} + * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} ADJ=1 ADJ value * @property {number} ADP=2 ADP value @@ -2694,7 +2694,7 @@ /** * Aspect enum. * @name google.cloud.language.v1.PartOfSpeech.Aspect - * @enum {string} + * @enum {number} * @property {number} ASPECT_UNKNOWN=0 ASPECT_UNKNOWN value * @property {number} PERFECTIVE=1 PERFECTIVE value * @property {number} IMPERFECTIVE=2 IMPERFECTIVE value @@ -2712,7 +2712,7 @@ /** * Case enum. * @name google.cloud.language.v1.PartOfSpeech.Case - * @enum {string} + * @enum {number} * @property {number} CASE_UNKNOWN=0 CASE_UNKNOWN value * @property {number} ACCUSATIVE=1 ACCUSATIVE value * @property {number} ADVERBIAL=2 ADVERBIAL value @@ -2752,7 +2752,7 @@ /** * Form enum. * @name google.cloud.language.v1.PartOfSpeech.Form - * @enum {string} + * @enum {number} * @property {number} FORM_UNKNOWN=0 FORM_UNKNOWN value * @property {number} ADNOMIAL=1 ADNOMIAL value * @property {number} AUXILIARY=2 AUXILIARY value @@ -2786,7 +2786,7 @@ /** * Gender enum. * @name google.cloud.language.v1.PartOfSpeech.Gender - * @enum {string} + * @enum {number} * @property {number} GENDER_UNKNOWN=0 GENDER_UNKNOWN value * @property {number} FEMININE=1 FEMININE value * @property {number} MASCULINE=2 MASCULINE value @@ -2804,7 +2804,7 @@ /** * Mood enum. * @name google.cloud.language.v1.PartOfSpeech.Mood - * @enum {string} + * @enum {number} * @property {number} MOOD_UNKNOWN=0 MOOD_UNKNOWN value * @property {number} CONDITIONAL_MOOD=1 CONDITIONAL_MOOD value * @property {number} IMPERATIVE=2 IMPERATIVE value @@ -2828,7 +2828,7 @@ /** * Number enum. * @name google.cloud.language.v1.PartOfSpeech.Number - * @enum {string} + * @enum {number} * @property {number} NUMBER_UNKNOWN=0 NUMBER_UNKNOWN value * @property {number} SINGULAR=1 SINGULAR value * @property {number} PLURAL=2 PLURAL value @@ -2846,7 +2846,7 @@ /** * Person enum. * @name google.cloud.language.v1.PartOfSpeech.Person - * @enum {string} + * @enum {number} * @property {number} PERSON_UNKNOWN=0 PERSON_UNKNOWN value * @property {number} FIRST=1 FIRST value * @property {number} SECOND=2 SECOND value @@ -2866,7 +2866,7 @@ /** * Proper enum. * @name google.cloud.language.v1.PartOfSpeech.Proper - * @enum {string} + * @enum {number} * @property {number} PROPER_UNKNOWN=0 PROPER_UNKNOWN value * @property {number} PROPER=1 PROPER value * @property {number} NOT_PROPER=2 NOT_PROPER value @@ -2882,7 +2882,7 @@ /** * Reciprocity enum. * @name google.cloud.language.v1.PartOfSpeech.Reciprocity - * @enum {string} + * @enum {number} * @property {number} RECIPROCITY_UNKNOWN=0 RECIPROCITY_UNKNOWN value * @property {number} RECIPROCAL=1 RECIPROCAL value * @property {number} NON_RECIPROCAL=2 NON_RECIPROCAL value @@ -2898,7 +2898,7 @@ /** * Tense enum. * @name google.cloud.language.v1.PartOfSpeech.Tense - * @enum {string} + * @enum {number} * @property {number} TENSE_UNKNOWN=0 TENSE_UNKNOWN value * @property {number} CONDITIONAL_TENSE=1 CONDITIONAL_TENSE value * @property {number} FUTURE=2 FUTURE value @@ -2922,7 +2922,7 @@ /** * Voice enum. * @name google.cloud.language.v1.PartOfSpeech.Voice - * @enum {string} + * @enum {number} * @property {number} VOICE_UNKNOWN=0 VOICE_UNKNOWN value * @property {number} ACTIVE=1 ACTIVE value * @property {number} CAUSATIVE=2 CAUSATIVE value @@ -3005,9 +3005,9 @@ DependencyEdge.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + if (message.headTokenIndex != null && Object.hasOwnProperty.call(message, "headTokenIndex")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headTokenIndex); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.label); return writer; }; @@ -3568,7 +3568,7 @@ /** * Label enum. * @name google.cloud.language.v1.DependencyEdge.Label - * @enum {string} + * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} ABBREV=1 ABBREV value * @property {number} ACOMP=2 ACOMP value @@ -3818,11 +3818,11 @@ EntityMention.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && Object.hasOwnProperty.call(message, "text")) $root.google.cloud.language.v1.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) $root.google.cloud.language.v1.Sentiment.encode(message.sentiment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -4004,7 +4004,7 @@ /** * Type enum. * @name google.cloud.language.v1.EntityMention.Type - * @enum {string} + * @enum {number} * @property {number} TYPE_UNKNOWN=0 TYPE_UNKNOWN value * @property {number} PROPER=1 PROPER value * @property {number} COMMON=2 COMMON value @@ -4085,9 +4085,9 @@ TextSpan.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + if (message.beginOffset != null && Object.hasOwnProperty.call(message, "beginOffset")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.beginOffset); return writer; }; @@ -4295,9 +4295,9 @@ ClassificationCategory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); return writer; }; @@ -4505,9 +4505,9 @@ AnalyzeSentimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); return writer; }; @@ -4753,9 +4753,9 @@ AnalyzeSentimentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + if (message.documentSentiment != null && Object.hasOwnProperty.call(message, "documentSentiment")) $root.google.cloud.language.v1.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); if (message.sentences != null && message.sentences.length) for (var i = 0; i < message.sentences.length; ++i) @@ -5002,9 +5002,9 @@ AnalyzeEntitySentimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); return writer; }; @@ -5244,7 +5244,7 @@ if (message.entities != null && message.entities.length) for (var i = 0; i < message.entities.length; ++i) $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); return writer; }; @@ -5471,9 +5471,9 @@ AnalyzeEntitiesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); return writer; }; @@ -5713,7 +5713,7 @@ if (message.entities != null && message.entities.length) for (var i = 0; i < message.entities.length; ++i) $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); return writer; }; @@ -5940,9 +5940,9 @@ AnalyzeSyntaxRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); return writer; }; @@ -6195,7 +6195,7 @@ if (message.tokens != null && message.tokens.length) for (var i = 0; i < message.tokens.length; ++i) $root.google.cloud.language.v1.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.language); return writer; }; @@ -6444,7 +6444,7 @@ ClassifyTextRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -6862,11 +6862,11 @@ AnnotateTextRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.cloud.language.v1.AnnotateTextRequest.Features.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encodingType); return writer; }; @@ -7142,15 +7142,15 @@ Features.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + if (message.extractSyntax != null && Object.hasOwnProperty.call(message, "extractSyntax")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.extractSyntax); - if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + if (message.extractEntities != null && Object.hasOwnProperty.call(message, "extractEntities")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.extractEntities); - if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + if (message.extractDocumentSentiment != null && Object.hasOwnProperty.call(message, "extractDocumentSentiment")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.extractDocumentSentiment); - if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + if (message.extractEntitySentiment != null && Object.hasOwnProperty.call(message, "extractEntitySentiment")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.extractEntitySentiment); - if (message.classifyText != null && message.hasOwnProperty("classifyText")) + if (message.classifyText != null && Object.hasOwnProperty.call(message, "classifyText")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.classifyText); return writer; }; @@ -7443,9 +7443,9 @@ if (message.entities != null && message.entities.length) for (var i = 0; i < message.entities.length; ++i) $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + if (message.documentSentiment != null && Object.hasOwnProperty.call(message, "documentSentiment")) $root.google.cloud.language.v1.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.language); if (message.categories != null && message.categories.length) for (var i = 0; i < message.categories.length; ++i) @@ -8060,13 +8060,13 @@ Document.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); - if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) + if (message.gcsContentUri != null && Object.hasOwnProperty.call(message, "gcsContentUri")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsContentUri); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.language); return writer; }; @@ -8260,7 +8260,7 @@ /** * Type enum. * @name google.cloud.language.v1beta2.Document.Type - * @enum {string} + * @enum {number} * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value * @property {number} PLAIN_TEXT=1 PLAIN_TEXT value * @property {number} HTML=2 HTML value @@ -8341,9 +8341,9 @@ Sentence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && Object.hasOwnProperty.call(message, "text")) $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -8599,19 +8599,19 @@ Entity.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.metadata != null && message.hasOwnProperty("metadata")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.salience != null && message.hasOwnProperty("salience")) + if (message.salience != null && Object.hasOwnProperty.call(message, "salience")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.salience); if (message.mentions != null && message.mentions.length) for (var i = 0; i < message.mentions.length; ++i) $root.google.cloud.language.v1beta2.EntityMention.encode(message.mentions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -8911,7 +8911,7 @@ /** * Type enum. * @name google.cloud.language.v1beta2.Entity.Type - * @enum {string} + * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} PERSON=1 PERSON value * @property {number} LOCATION=2 LOCATION value @@ -9030,13 +9030,13 @@ Token.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && Object.hasOwnProperty.call(message, "text")) $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) + if (message.partOfSpeech != null && Object.hasOwnProperty.call(message, "partOfSpeech")) $root.google.cloud.language.v1beta2.PartOfSpeech.encode(message.partOfSpeech, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) + if (message.dependencyEdge != null && Object.hasOwnProperty.call(message, "dependencyEdge")) $root.google.cloud.language.v1beta2.DependencyEdge.encode(message.dependencyEdge, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.lemma != null && message.hasOwnProperty("lemma")) + if (message.lemma != null && Object.hasOwnProperty.call(message, "lemma")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.lemma); return writer; }; @@ -9219,7 +9219,7 @@ /** * EncodingType enum. * @name google.cloud.language.v1beta2.EncodingType - * @enum {string} + * @enum {number} * @property {number} NONE=0 NONE value * @property {number} UTF8=1 UTF8 value * @property {number} UTF16=2 UTF16 value @@ -9299,9 +9299,9 @@ Sentiment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.magnitude != null && message.hasOwnProperty("magnitude")) + if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.magnitude); - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.score); return writer; }; @@ -9599,29 +9599,29 @@ PartOfSpeech.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tag != null && message.hasOwnProperty("tag")) + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tag); - if (message.aspect != null && message.hasOwnProperty("aspect")) + if (message.aspect != null && Object.hasOwnProperty.call(message, "aspect")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.aspect); - if (message["case"] != null && message.hasOwnProperty("case")) + if (message["case"] != null && Object.hasOwnProperty.call(message, "case")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message["case"]); - if (message.form != null && message.hasOwnProperty("form")) + if (message.form != null && Object.hasOwnProperty.call(message, "form")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.form); - if (message.gender != null && message.hasOwnProperty("gender")) + if (message.gender != null && Object.hasOwnProperty.call(message, "gender")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.gender); - if (message.mood != null && message.hasOwnProperty("mood")) + if (message.mood != null && Object.hasOwnProperty.call(message, "mood")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mood); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.number); - if (message.person != null && message.hasOwnProperty("person")) + if (message.person != null && Object.hasOwnProperty.call(message, "person")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.person); - if (message.proper != null && message.hasOwnProperty("proper")) + if (message.proper != null && Object.hasOwnProperty.call(message, "proper")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.proper); - if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + if (message.reciprocity != null && Object.hasOwnProperty.call(message, "reciprocity")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.reciprocity); - if (message.tense != null && message.hasOwnProperty("tense")) + if (message.tense != null && Object.hasOwnProperty.call(message, "tense")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.tense); - if (message.voice != null && message.hasOwnProperty("voice")) + if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.voice); return writer; }; @@ -10320,7 +10320,7 @@ /** * Tag enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Tag - * @enum {string} + * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} ADJ=1 ADJ value * @property {number} ADP=2 ADP value @@ -10358,7 +10358,7 @@ /** * Aspect enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Aspect - * @enum {string} + * @enum {number} * @property {number} ASPECT_UNKNOWN=0 ASPECT_UNKNOWN value * @property {number} PERFECTIVE=1 PERFECTIVE value * @property {number} IMPERFECTIVE=2 IMPERFECTIVE value @@ -10376,7 +10376,7 @@ /** * Case enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Case - * @enum {string} + * @enum {number} * @property {number} CASE_UNKNOWN=0 CASE_UNKNOWN value * @property {number} ACCUSATIVE=1 ACCUSATIVE value * @property {number} ADVERBIAL=2 ADVERBIAL value @@ -10416,7 +10416,7 @@ /** * Form enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Form - * @enum {string} + * @enum {number} * @property {number} FORM_UNKNOWN=0 FORM_UNKNOWN value * @property {number} ADNOMIAL=1 ADNOMIAL value * @property {number} AUXILIARY=2 AUXILIARY value @@ -10450,7 +10450,7 @@ /** * Gender enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Gender - * @enum {string} + * @enum {number} * @property {number} GENDER_UNKNOWN=0 GENDER_UNKNOWN value * @property {number} FEMININE=1 FEMININE value * @property {number} MASCULINE=2 MASCULINE value @@ -10468,7 +10468,7 @@ /** * Mood enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Mood - * @enum {string} + * @enum {number} * @property {number} MOOD_UNKNOWN=0 MOOD_UNKNOWN value * @property {number} CONDITIONAL_MOOD=1 CONDITIONAL_MOOD value * @property {number} IMPERATIVE=2 IMPERATIVE value @@ -10492,7 +10492,7 @@ /** * Number enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Number - * @enum {string} + * @enum {number} * @property {number} NUMBER_UNKNOWN=0 NUMBER_UNKNOWN value * @property {number} SINGULAR=1 SINGULAR value * @property {number} PLURAL=2 PLURAL value @@ -10510,7 +10510,7 @@ /** * Person enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Person - * @enum {string} + * @enum {number} * @property {number} PERSON_UNKNOWN=0 PERSON_UNKNOWN value * @property {number} FIRST=1 FIRST value * @property {number} SECOND=2 SECOND value @@ -10530,7 +10530,7 @@ /** * Proper enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Proper - * @enum {string} + * @enum {number} * @property {number} PROPER_UNKNOWN=0 PROPER_UNKNOWN value * @property {number} PROPER=1 PROPER value * @property {number} NOT_PROPER=2 NOT_PROPER value @@ -10546,7 +10546,7 @@ /** * Reciprocity enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Reciprocity - * @enum {string} + * @enum {number} * @property {number} RECIPROCITY_UNKNOWN=0 RECIPROCITY_UNKNOWN value * @property {number} RECIPROCAL=1 RECIPROCAL value * @property {number} NON_RECIPROCAL=2 NON_RECIPROCAL value @@ -10562,7 +10562,7 @@ /** * Tense enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Tense - * @enum {string} + * @enum {number} * @property {number} TENSE_UNKNOWN=0 TENSE_UNKNOWN value * @property {number} CONDITIONAL_TENSE=1 CONDITIONAL_TENSE value * @property {number} FUTURE=2 FUTURE value @@ -10586,7 +10586,7 @@ /** * Voice enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Voice - * @enum {string} + * @enum {number} * @property {number} VOICE_UNKNOWN=0 VOICE_UNKNOWN value * @property {number} ACTIVE=1 ACTIVE value * @property {number} CAUSATIVE=2 CAUSATIVE value @@ -10669,9 +10669,9 @@ DependencyEdge.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + if (message.headTokenIndex != null && Object.hasOwnProperty.call(message, "headTokenIndex")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headTokenIndex); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.label); return writer; }; @@ -11232,7 +11232,7 @@ /** * Label enum. * @name google.cloud.language.v1beta2.DependencyEdge.Label - * @enum {string} + * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} ABBREV=1 ABBREV value * @property {number} ACOMP=2 ACOMP value @@ -11482,11 +11482,11 @@ EntityMention.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && Object.hasOwnProperty.call(message, "text")) $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -11668,7 +11668,7 @@ /** * Type enum. * @name google.cloud.language.v1beta2.EntityMention.Type - * @enum {string} + * @enum {number} * @property {number} TYPE_UNKNOWN=0 TYPE_UNKNOWN value * @property {number} PROPER=1 PROPER value * @property {number} COMMON=2 COMMON value @@ -11749,9 +11749,9 @@ TextSpan.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + if (message.beginOffset != null && Object.hasOwnProperty.call(message, "beginOffset")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.beginOffset); return writer; }; @@ -11959,9 +11959,9 @@ ClassificationCategory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); return writer; }; @@ -12169,9 +12169,9 @@ AnalyzeSentimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); return writer; }; @@ -12417,9 +12417,9 @@ AnalyzeSentimentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + if (message.documentSentiment != null && Object.hasOwnProperty.call(message, "documentSentiment")) $root.google.cloud.language.v1beta2.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); if (message.sentences != null && message.sentences.length) for (var i = 0; i < message.sentences.length; ++i) @@ -12666,9 +12666,9 @@ AnalyzeEntitySentimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); return writer; }; @@ -12908,7 +12908,7 @@ if (message.entities != null && message.entities.length) for (var i = 0; i < message.entities.length; ++i) $root.google.cloud.language.v1beta2.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); return writer; }; @@ -13135,9 +13135,9 @@ AnalyzeEntitiesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); return writer; }; @@ -13377,7 +13377,7 @@ if (message.entities != null && message.entities.length) for (var i = 0; i < message.entities.length; ++i) $root.google.cloud.language.v1beta2.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); return writer; }; @@ -13604,9 +13604,9 @@ AnalyzeSyntaxRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); return writer; }; @@ -13859,7 +13859,7 @@ if (message.tokens != null && message.tokens.length) for (var i = 0; i < message.tokens.length; ++i) $root.google.cloud.language.v1beta2.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.language); return writer; }; @@ -14108,7 +14108,7 @@ ClassifyTextRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -14526,11 +14526,11 @@ AnnotateTextRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && message.hasOwnProperty("document")) + if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.features != null && message.hasOwnProperty("features")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encodingType); return writer; }; @@ -14806,15 +14806,15 @@ Features.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + if (message.extractSyntax != null && Object.hasOwnProperty.call(message, "extractSyntax")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.extractSyntax); - if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + if (message.extractEntities != null && Object.hasOwnProperty.call(message, "extractEntities")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.extractEntities); - if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + if (message.extractDocumentSentiment != null && Object.hasOwnProperty.call(message, "extractDocumentSentiment")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.extractDocumentSentiment); - if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + if (message.extractEntitySentiment != null && Object.hasOwnProperty.call(message, "extractEntitySentiment")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.extractEntitySentiment); - if (message.classifyText != null && message.hasOwnProperty("classifyText")) + if (message.classifyText != null && Object.hasOwnProperty.call(message, "classifyText")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.classifyText); return writer; }; @@ -15107,9 +15107,9 @@ if (message.entities != null && message.entities.length) for (var i = 0; i < message.entities.length; ++i) $root.google.cloud.language.v1beta2.Entity.encode(message.entities[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + if (message.documentSentiment != null && Object.hasOwnProperty.call(message, "documentSentiment")) $root.google.cloud.language.v1beta2.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.language); if (message.categories != null && message.categories.length) for (var i = 0; i < message.categories.length; ++i) @@ -15469,7 +15469,7 @@ if (message.rules != null && message.rules.length) for (var i = 0; i < message.rules.length; ++i) $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; @@ -15783,26 +15783,26 @@ HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) + if (message.get != null && Object.hasOwnProperty.call(message, "get")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) + if (message.put != null && Object.hasOwnProperty.call(message, "put")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) + if (message.post != null && Object.hasOwnProperty.call(message, "post")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.additionalBindings != null && message.additionalBindings.length) for (var i = 0; i < message.additionalBindings.length; ++i) $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; @@ -16159,9 +16159,9 @@ CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; @@ -16307,7 +16307,7 @@ /** * FieldBehavior enum. * @name google.api.FieldBehavior - * @enum {string} + * @enum {number} * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value * @property {number} OPTIONAL=1 OPTIONAL value * @property {number} REQUIRED=2 REQUIRED value @@ -16708,9 +16708,9 @@ FileDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); if (message.dependency != null && message.dependency.length) for (var i = 0; i < message.dependency.length; ++i) @@ -16727,9 +16727,9 @@ if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.publicDependency != null && message.publicDependency.length) for (var i = 0; i < message.publicDependency.length; ++i) @@ -16737,7 +16737,7 @@ if (message.weakDependency != null && message.weakDependency.length) for (var i = 0; i < message.weakDependency.length; ++i) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); return writer; }; @@ -17275,7 +17275,7 @@ DescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) @@ -17292,7 +17292,7 @@ if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.oneofDecl != null && message.oneofDecl.length) for (var i = 0; i < message.oneofDecl.length; ++i) @@ -17757,11 +17757,11 @@ ExtensionRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -17985,9 +17985,9 @@ ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -18478,25 +18478,25 @@ FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); return writer; }; @@ -18843,7 +18843,7 @@ /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type - * @enum {string} + * @enum {number} * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value * @property {number} TYPE_INT64=3 TYPE_INT64 value @@ -18889,7 +18889,7 @@ /** * Label enum. * @name google.protobuf.FieldDescriptorProto.Label - * @enum {string} + * @enum {number} * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value @@ -18970,9 +18970,9 @@ OneofDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -19215,12 +19215,12 @@ EnumDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.reservedRange != null && message.reservedRange.length) for (var i = 0; i < message.reservedRange.length; ++i) @@ -19523,9 +19523,9 @@ EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -19745,11 +19745,11 @@ EnumValueDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -19983,12 +19983,12 @@ ServiceDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -20268,17 +20268,17 @@ MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); return writer; }; @@ -20707,45 +20707,45 @@ FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -21138,7 +21138,7 @@ /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode - * @enum {string} + * @enum {number} * @property {number} SPEED=1 SPEED value * @property {number} CODE_SIZE=2 CODE_SIZE value * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value @@ -21247,13 +21247,13 @@ MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -21573,17 +21573,17 @@ FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && message.hasOwnProperty("weak")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -21912,7 +21912,7 @@ /** * CType enum. * @name google.protobuf.FieldOptions.CType - * @enum {string} + * @enum {number} * @property {number} STRING=0 STRING value * @property {number} CORD=1 CORD value * @property {number} STRING_PIECE=2 STRING_PIECE value @@ -21928,7 +21928,7 @@ /** * JSType enum. * @name google.protobuf.FieldOptions.JSType - * @enum {string} + * @enum {number} * @property {number} JS_NORMAL=0 JS_NORMAL value * @property {number} JS_STRING=1 JS_STRING value * @property {number} JS_NUMBER=2 JS_NUMBER value @@ -22227,9 +22227,9 @@ EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -22472,7 +22472,7 @@ EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -22721,14 +22721,14 @@ ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; @@ -23007,9 +23007,9 @@ MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -23017,7 +23017,7 @@ if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; @@ -23251,7 +23251,7 @@ /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {string} + * @enum {number} * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value * @property {number} IDEMPOTENT=2 IDEMPOTENT value @@ -23381,17 +23381,17 @@ if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; @@ -24168,9 +24168,9 @@ writer.int32(message.span[i]); writer.ldelim(); } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) for (var i = 0; i < message.leadingDetachedComments.length; ++i) @@ -24701,11 +24701,11 @@ writer.int32(message.path[i]); writer.ldelim(); } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; @@ -24958,9 +24958,9 @@ Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index a3c89f69df9..dac960769f0 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -39,7 +39,12 @@ export class LanguageServiceClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; - descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}}; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; innerApiCalls: {[name: string]: Function}; languageServiceStub?: Promise<{[name: string]: Function}>; @@ -72,10 +77,12 @@ export class LanguageServiceClient { constructor(opts?: ClientOptions) { // Ensure that options include the service address and port. const staticMembers = this.constructor as typeof LanguageServiceClient; - const servicePath = opts && opts.servicePath ? - opts.servicePath : - ((opts && opts.apiEndpoint) ? opts.apiEndpoint : - staticMembers.servicePath); + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; const port = opts && opts.port ? opts.port : staticMembers.port; if (!opts) { @@ -85,8 +92,8 @@ export class LanguageServiceClient { opts.port = opts.port || port; opts.clientConfig = opts.clientConfig || {}; - const isBrowser = (typeof window !== 'undefined'); - if (isBrowser){ + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { opts.fallback = true; } // If we are in browser, we are already using fallback because of the @@ -103,13 +110,10 @@ export class LanguageServiceClient { this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { @@ -125,18 +129,27 @@ export class LanguageServiceClient { // For Node.js, pass the path to JSON proto file. // For browsers, pass the JSON content. - const nodejsProtoPath = path.join(__dirname, '..', '..', 'protos', 'protos.json'); + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); this._protos = this._gaxGrpc.loadProto( - opts.fallback ? - // eslint-disable-next-line @typescript-eslint/no-var-requires - require("../../protos/protos.json") : - nodejsProtoPath + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath ); // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.language.v1.LanguageService', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + 'google.cloud.language.v1.LanguageService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -164,16 +177,25 @@ export class LanguageServiceClient { // Put together the "service stub" for // google.cloud.language.v1.LanguageService. this.languageServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.language.v1.LanguageService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.language.v1.LanguageService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.language.v1.LanguageService, - this._opts) as Promise<{[method: string]: Function}>; + this._opts + ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides // and create an API call method for each. - const languageServiceStubMethods = - ['analyzeSentiment', 'analyzeEntities', 'analyzeEntitySentiment', 'analyzeSyntax', 'classifyText', 'annotateText']; + const languageServiceStubMethods = [ + 'analyzeSentiment', + 'analyzeEntities', + 'analyzeEntitySentiment', + 'analyzeSyntax', + 'classifyText', + 'annotateText', + ]; for (const methodName of languageServiceStubMethods) { const callPromise = this.languageServiceStub.then( stub => (...args: Array<{}>) => { @@ -183,16 +205,17 @@ export class LanguageServiceClient { const func = stub[methodName]; return func.apply(stub, args); }, - (err: Error|null|undefined) => () => { + (err: Error | null | undefined) => () => { throw err; - }); + } + ); const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); this.innerApiCalls[methodName] = apiCall; @@ -230,7 +253,7 @@ export class LanguageServiceClient { static get scopes() { return [ 'https://www.googleapis.com/auth/cloud-language', - 'https://www.googleapis.com/auth/cloud-platform' + 'https://www.googleapis.com/auth/cloud-platform', ]; } @@ -241,8 +264,9 @@ export class LanguageServiceClient { * @param {function(Error, string)} callback - the callback to * be called with the current project Id. */ - getProjectId(callback?: Callback): - Promise|void { + getProjectId( + callback?: Callback + ): Promise | void { if (callback) { this.auth.getProjectId(callback); return; @@ -254,61 +278,82 @@ export class LanguageServiceClient { // -- Service calls -- // ------------------- analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1.IAnalyzeSentimentRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, + {} | undefined + ] + >; analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1.IAnalyzeSentimentRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1.IAnalyzeSentimentRequest|null|undefined, - {}|null|undefined>): void; -/** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate sentence offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate sentence offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1.IAnalyzeSentimentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1.IAnalyzeSentimentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1.IAnalyzeSentimentRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -316,63 +361,84 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, + {} | undefined + ] + >; analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined + > + ): void; analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|null|undefined, - {}|null|undefined>): void; -/** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1.IAnalyzeEntitiesRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -380,126 +446,172 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + ( + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | undefined + ), + {} | undefined + ] + >; analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|null|undefined, - {}|null|undefined>): void; -/** - * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, + ( + | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest + | undefined + ), + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; this.initialize(); - return this.innerApiCalls.analyzeEntitySentiment(request, options, callback); + return this.innerApiCalls.analyzeEntitySentiment( + request, + options, + callback + ); } analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, + {} | undefined + ] + >; analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, + {} | null | undefined + > + ): void; analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|null|undefined, - {}|null|undefined>): void; -/** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1.IAnalyzeSyntaxRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1.IAnalyzeSyntaxRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -507,59 +619,74 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1.IClassifyTextRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | undefined, + {} | undefined + ] + >; classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1.IClassifyTextRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, + {} | null | undefined + > + ): void; classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, - callback: Callback< - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest|null|undefined, - {}|null|undefined>): void; -/** - * Classifies a document into categories. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IClassifyTextRequest, + callback: Callback< + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1.IClassifyTextRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1.IClassifyTextResponse, - protos.google.cloud.language.v1.IClassifyTextRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1.IClassifyTextRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1.IClassifyTextResponse, + protos.google.cloud.language.v1.IClassifyTextRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -567,64 +694,79 @@ export class LanguageServiceClient { return this.innerApiCalls.classifyText(request, options, callback); } annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1.IAnnotateTextRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | undefined, + {} | undefined + ] + >; annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1.IAnnotateTextRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, + {} | null | undefined + > + ): void; annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, - callback: Callback< - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest|null|undefined, - {}|null|undefined>): void; -/** - * A convenience method that provides all the features that analyzeSentiment, - * analyzeEntities, and analyzeSyntax provide in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.AnnotateTextRequest.Features} request.features - * The enabled features. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1.IAnnotateTextRequest, + callback: Callback< + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * A convenience method that provides all the features that analyzeSentiment, + * analyzeEntities, and analyzeSyntax provide in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.AnnotateTextRequest.Features} request.features + * The enabled features. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1.IAnnotateTextRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1.IAnnotateTextResponse, - protos.google.cloud.language.v1.IAnnotateTextRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1.IAnnotateTextRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1.IAnnotateTextResponse, + protos.google.cloud.language.v1.IAnnotateTextRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -632,7 +774,6 @@ export class LanguageServiceClient { return this.innerApiCalls.annotateText(request, options, callback); } - /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 0243ebcf890..7ca3bf028a6 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -39,7 +39,12 @@ export class LanguageServiceClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; - descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}}; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; innerApiCalls: {[name: string]: Function}; languageServiceStub?: Promise<{[name: string]: Function}>; @@ -72,10 +77,12 @@ export class LanguageServiceClient { constructor(opts?: ClientOptions) { // Ensure that options include the service address and port. const staticMembers = this.constructor as typeof LanguageServiceClient; - const servicePath = opts && opts.servicePath ? - opts.servicePath : - ((opts && opts.apiEndpoint) ? opts.apiEndpoint : - staticMembers.servicePath); + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; const port = opts && opts.port ? opts.port : staticMembers.port; if (!opts) { @@ -85,8 +92,8 @@ export class LanguageServiceClient { opts.port = opts.port || port; opts.clientConfig = opts.clientConfig || {}; - const isBrowser = (typeof window !== 'undefined'); - if (isBrowser){ + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { opts.fallback = true; } // If we are in browser, we are already using fallback because of the @@ -103,13 +110,10 @@ export class LanguageServiceClient { this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { @@ -125,18 +129,27 @@ export class LanguageServiceClient { // For Node.js, pass the path to JSON proto file. // For browsers, pass the JSON content. - const nodejsProtoPath = path.join(__dirname, '..', '..', 'protos', 'protos.json'); + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); this._protos = this._gaxGrpc.loadProto( - opts.fallback ? - // eslint-disable-next-line @typescript-eslint/no-var-requires - require("../../protos/protos.json") : - nodejsProtoPath + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath ); // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.language.v1beta2.LanguageService', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + 'google.cloud.language.v1beta2.LanguageService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -164,16 +177,25 @@ export class LanguageServiceClient { // Put together the "service stub" for // google.cloud.language.v1beta2.LanguageService. this.languageServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.language.v1beta2.LanguageService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.language.v1beta2.LanguageService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.language.v1beta2.LanguageService, - this._opts) as Promise<{[method: string]: Function}>; + this._opts + ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides // and create an API call method for each. - const languageServiceStubMethods = - ['analyzeSentiment', 'analyzeEntities', 'analyzeEntitySentiment', 'analyzeSyntax', 'classifyText', 'annotateText']; + const languageServiceStubMethods = [ + 'analyzeSentiment', + 'analyzeEntities', + 'analyzeEntitySentiment', + 'analyzeSyntax', + 'classifyText', + 'annotateText', + ]; for (const methodName of languageServiceStubMethods) { const callPromise = this.languageServiceStub.then( stub => (...args: Array<{}>) => { @@ -183,16 +205,17 @@ export class LanguageServiceClient { const func = stub[methodName]; return func.apply(stub, args); }, - (err: Error|null|undefined) => () => { + (err: Error | null | undefined) => () => { throw err; - }); + } + ); const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); this.innerApiCalls[methodName] = apiCall; @@ -230,7 +253,7 @@ export class LanguageServiceClient { static get scopes() { return [ 'https://www.googleapis.com/auth/cloud-language', - 'https://www.googleapis.com/auth/cloud-platform' + 'https://www.googleapis.com/auth/cloud-platform', ]; } @@ -241,8 +264,9 @@ export class LanguageServiceClient { * @param {function(Error, string)} callback - the callback to * be called with the current project Id. */ - getProjectId(callback?: Callback): - Promise|void { + getProjectId( + callback?: Callback + ): Promise | void { if (callback) { this.auth.getProjectId(callback); return; @@ -254,62 +278,83 @@ export class LanguageServiceClient { // -- Service calls -- // ------------------- analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest | undefined, + {} | undefined + ] + >; analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|null|undefined, - {}|null|undefined>): void; -/** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -317,63 +362,84 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest | undefined, + {} | undefined + ] + >; analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined + > + ): void; analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|null|undefined, - {}|null|undefined>): void; -/** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, + protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -381,126 +447,178 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + ( + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | undefined + ), + {} | undefined + ] + >; analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|null|undefined, - {}|null|undefined>): void; -/** - * Finds entities, similar to {@link google.cloud.language.v1beta2.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Finds entities, similar to {@link google.cloud.language.v1beta2.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, - protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, + ( + | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest + | undefined + ), + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; this.initialize(); - return this.innerApiCalls.analyzeEntitySentiment(request, options, callback); + return this.innerApiCalls.analyzeEntitySentiment( + request, + options, + callback + ); } analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest | undefined, + {} | undefined + ] + >; analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | null + | undefined, + {} | null | undefined + > + ): void; analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|null|undefined, - {}|null|undefined>): void; -/** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part-of-speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part-of-speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, - protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, + protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -508,59 +626,80 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - protos.google.cloud.language.v1beta2.IClassifyTextRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + protos.google.cloud.language.v1beta2.IClassifyTextRequest | undefined, + {} | undefined + ] + >; classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - protos.google.cloud.language.v1beta2.IClassifyTextRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + | protos.google.cloud.language.v1beta2.IClassifyTextRequest + | null + | undefined, + {} | null | undefined + > + ): void; classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - protos.google.cloud.language.v1beta2.IClassifyTextRequest|null|undefined, - {}|null|undefined>): void; -/** - * Classifies a document into categories. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + | protos.google.cloud.language.v1beta2.IClassifyTextRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1beta2.IClassifyTextResponse, - protos.google.cloud.language.v1beta2.IClassifyTextRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - protos.google.cloud.language.v1beta2.IClassifyTextRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1beta2.IClassifyTextResponse, - protos.google.cloud.language.v1beta2.IClassifyTextRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1beta2.IClassifyTextRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + | protos.google.cloud.language.v1beta2.IClassifyTextRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1beta2.IClassifyTextResponse, + protos.google.cloud.language.v1beta2.IClassifyTextRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -568,64 +707,85 @@ export class LanguageServiceClient { return this.innerApiCalls.classifyText(request, options, callback); } annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - options?: gax.CallOptions): - Promise<[ - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - protos.google.cloud.language.v1beta2.IAnnotateTextRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + protos.google.cloud.language.v1beta2.IAnnotateTextRequest | undefined, + {} | undefined + ] + >; annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - options: gax.CallOptions, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - protos.google.cloud.language.v1beta2.IAnnotateTextRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protos.google.cloud.language.v1beta2.IAnnotateTextRequest + | null + | undefined, + {} | null | undefined + > + ): void; annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - callback: Callback< - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - protos.google.cloud.language.v1beta2.IAnnotateTextRequest|null|undefined, - {}|null|undefined>): void; -/** - * A convenience method that provides all syntax, sentiment, entity, and - * classification features in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.AnnotateTextRequest.Features} request.features - * Required. The enabled features. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + callback: Callback< + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protos.google.cloud.language.v1beta2.IAnnotateTextRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * A convenience method that provides all syntax, sentiment, entity, and + * classification features in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.AnnotateTextRequest.Features} request.features + * Required. The enabled features. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - protos.google.cloud.language.v1beta2.IAnnotateTextRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - protos.google.cloud.language.v1beta2.IAnnotateTextRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.language.v1beta2.IAnnotateTextResponse, - protos.google.cloud.language.v1beta2.IAnnotateTextRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.language.v1beta2.IAnnotateTextRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + | protos.google.cloud.language.v1beta2.IAnnotateTextRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.language.v1beta2.IAnnotateTextResponse, + protos.google.cloud.language.v1beta2.IAnnotateTextRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; @@ -633,7 +793,6 @@ export class LanguageServiceClient { return this.innerApiCalls.annotateText(request, options, callback); } - /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index bae0a1d8bdc..e7871fabb5c 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "e11e643289693bd582f379fc3b9015680811da38" + "sha": "69fd6680792b36c2fd73e096b4cb4ac284107b51" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cdf13efacdea0649e940452f9c5d320b93735974", - "internalRef": "306783437" + "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", + "internalRef": "307114445" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "52638600f387deb98efb5f9c85fec39e82aa9052" + "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" } } ], diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js index e05c05ecda1..a4274b479c3 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js @@ -16,7 +16,6 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** - /* eslint-disable node/no-missing-require, no-unused-vars */ const language = require('@google-cloud/language'); diff --git a/packages/google-cloud-language/system-test/install.ts b/packages/google-cloud-language/system-test/install.ts index 5e4ed636481..4c1ba3eb79a 100644 --- a/packages/google-cloud-language/system-test/install.ts +++ b/packages/google-cloud-language/system-test/install.ts @@ -16,34 +16,36 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import { packNTest } from 'pack-n-play'; -import { readFileSync } from 'fs'; -import { describe, it } from 'mocha'; +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; describe('typescript consumer tests', () => { - - it('should have correct type signature for typescript users', async function() { + it('should have correct type signature for typescript users', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), // path to your module. sample: { description: 'typescript based user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); // will throw upon error. }); - it('should have correct type signature for javascript users', async function() { + it('should have correct type signature for javascript users', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), // path to your module. sample: { description: 'typescript based user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); // will throw upon error. }); - }); diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index fed52aa338e..c9b4dda10af 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -20,461 +20,658 @@ import * as protos from '../protos/protos'; import * as assert from 'assert'; import * as sinon from 'sinon'; import {SinonStub} from 'sinon'; -import { describe, it } from 'mocha'; +import {describe, it} from 'mocha'; import * as languageserviceModule from '../src'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; } function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); } -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); } describe('v1.LanguageServiceClient', () => { - it('has servicePath', () => { - const servicePath = languageserviceModule.v1.LanguageServiceClient.servicePath; - assert(servicePath); + it('has servicePath', () => { + const servicePath = + languageserviceModule.v1.LanguageServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + languageserviceModule.v1.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = languageserviceModule.v1.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new languageserviceModule.v1.LanguageServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + fallback: true, }); + assert(client); + }); - it('has apiEndpoint', () => { - const apiEndpoint = languageserviceModule.v1.LanguageServiceClient.apiEndpoint; - assert(apiEndpoint); + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); - - it('has port', () => { - const port = languageserviceModule.v1.LanguageServiceClient.port; - assert(port); - assert(typeof port === 'number'); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); + }); + + it('has close method', () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('analyzeSentiment', () => { + it('invokes analyzeSentiment without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentResponse() + ); + client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - it('should create a client with no option', () => { - const client = new languageserviceModule.v1.LanguageServiceClient(); - assert(client); + it('invokes analyzeSentiment without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentResponse() + ); + client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeSentiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnalyzeSentimentResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - it('should create a client with gRPC fallback', () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - fallback: true, - }); - assert(client); + it('invokes analyzeSentiment with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSentiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.analyzeSentiment(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeEntities', () => { + it('invokes analyzeEntities without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() + ); + client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeEntities(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - it('has initialize method and supports deferred initialization', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.languageServiceStub, undefined); - await client.initialize(); - assert(client.languageServiceStub); + it('invokes analyzeEntities without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() + ); + client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeEntities( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnalyzeEntitiesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - it('has close method', () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.close(); + it('invokes analyzeEntities with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntities = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.analyzeEntities(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeEntitySentiment', () => { + it('invokes analyzeEntitySentiment without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() + ); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( + expectedResponse + ); + const [response] = await client.analyzeEntitySentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + it('invokes analyzeEntitySentiment without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() + ); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeEntitySentiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error|null, projectId?: string|null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); + it('invokes analyzeEntitySentiment with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.analyzeEntitySentiment(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeSyntax', () => { + it('invokes analyzeSyntax without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() + ); + client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSyntax(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('analyzeSentiment', () => { - it('invokes analyzeSentiment without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentResponse()); - client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeSentiment(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes analyzeSentiment without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentResponse()); - client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.analyzeSentiment( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1.IAnalyzeSentimentResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes analyzeSentiment with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSentimentRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeSentiment = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.analyzeSentiment(request); }, expectedError); - assert((client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes analyzeSyntax without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() + ); + client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeSyntax( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnalyzeSyntaxResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('analyzeEntities', () => { - it('invokes analyzeEntities without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesResponse()); - client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeEntities(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes analyzeEntities without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesResponse()); - client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.analyzeEntities( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1.IAnalyzeEntitiesResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes analyzeEntities with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitiesRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeEntities = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.analyzeEntities(request); }, expectedError); - assert((client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes analyzeSyntax with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSyntax = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.analyzeSyntax(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('classifyText', () => { + it('invokes classifyText without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextResponse() + ); + client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); + const [response] = await client.classifyText(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('analyzeEntitySentiment', () => { - it('invokes analyzeEntitySentiment without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse()); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeEntitySentiment(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes analyzeEntitySentiment without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse()); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.analyzeEntitySentiment( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes analyzeEntitySentiment with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.analyzeEntitySentiment(request); }, expectedError); - assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes classifyText without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextResponse() + ); + client.innerApiCalls.classifyText = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.classifyText( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IClassifyTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('analyzeSyntax', () => { - it('invokes analyzeSyntax without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxResponse()); - client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeSyntax(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes analyzeSyntax without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxResponse()); - client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.analyzeSyntax( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1.IAnalyzeSyntaxResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes analyzeSyntax with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnalyzeSyntaxRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeSyntax = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.analyzeSyntax(request); }, expectedError); - assert((client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes classifyText with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.classifyText = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.classifyText(request); + }, expectedError); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('annotateText', () => { + it('invokes annotateText without error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextResponse() + ); + client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); + const [response] = await client.annotateText(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('classifyText', () => { - it('invokes classifyText without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextResponse()); - client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); - const [response] = await client.classifyText(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.classifyText as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes classifyText without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextResponse()); - client.innerApiCalls.classifyText = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.classifyText( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1.IClassifyTextResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.classifyText as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes classifyText with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.ClassifyTextRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.classifyText = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.classifyText(request); }, expectedError); - assert((client.innerApiCalls.classifyText as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes annotateText without error using callback', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextResponse() + ); + client.innerApiCalls.annotateText = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.annotateText( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1.IAnnotateTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('annotateText', () => { - it('invokes annotateText without error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextResponse()); - client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); - const [response] = await client.annotateText(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.annotateText as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes annotateText without error using callback', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextResponse()); - client.innerApiCalls.annotateText = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.annotateText( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1.IAnnotateTextResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.annotateText as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes annotateText with error', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1.AnnotateTextRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.annotateText = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.annotateText(request); }, expectedError); - assert((client.innerApiCalls.annotateText as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes annotateText with error', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.annotateText = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.annotateText(request); + }, expectedError); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); + }); }); diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index d66070bb18b..94377b9223e 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -20,461 +20,658 @@ import * as protos from '../protos/protos'; import * as assert from 'assert'; import * as sinon from 'sinon'; import {SinonStub} from 'sinon'; -import { describe, it } from 'mocha'; +import {describe, it} from 'mocha'; import * as languageserviceModule from '../src'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; } function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); } -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); } describe('v1beta2.LanguageServiceClient', () => { - it('has servicePath', () => { - const servicePath = languageserviceModule.v1beta2.LanguageServiceClient.servicePath; - assert(servicePath); + it('has servicePath', () => { + const servicePath = + languageserviceModule.v1beta2.LanguageServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + languageserviceModule.v1beta2.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = languageserviceModule.v1beta2.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + fallback: true, }); + assert(client); + }); - it('has apiEndpoint', () => { - const apiEndpoint = languageserviceModule.v1beta2.LanguageServiceClient.apiEndpoint; - assert(apiEndpoint); + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); - - it('has port', () => { - const port = languageserviceModule.v1beta2.LanguageServiceClient.port; - assert(port); - assert(typeof port === 'number'); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); + }); + + it('has close method', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('analyzeSentiment', () => { + it('invokes analyzeSentiment without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() + ); + client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - it('should create a client with no option', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient(); - assert(client); + it('invokes analyzeSentiment without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() + ); + client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeSentiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - it('should create a client with gRPC fallback', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - fallback: true, - }); - assert(client); + it('invokes analyzeSentiment with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSentiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.analyzeSentiment(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeSentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeEntities', () => { + it('invokes analyzeEntities without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() + ); + client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeEntities(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - it('has initialize method and supports deferred initialization', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.languageServiceStub, undefined); - await client.initialize(); - assert(client.languageServiceStub); + it('invokes analyzeEntities without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() + ); + client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeEntities( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - it('has close method', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.close(); + it('invokes analyzeEntities with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntities = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.analyzeEntities(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeEntitySentiment', () => { + it('invokes analyzeEntitySentiment without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() + ); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( + expectedResponse + ); + const [response] = await client.analyzeEntitySentiment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + it('invokes analyzeEntitySentiment without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() + ); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeEntitySentiment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error|null, projectId?: string|null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); + it('invokes analyzeEntitySentiment with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.analyzeEntitySentiment(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeEntitySentiment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('analyzeSyntax', () => { + it('invokes analyzeSyntax without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() + ); + client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); + const [response] = await client.analyzeSyntax(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('analyzeSentiment', () => { - it('invokes analyzeSentiment without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse()); - client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeSentiment(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes analyzeSentiment without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse()); - client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.analyzeSentiment( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes analyzeSentiment with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeSentiment = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.analyzeSentiment(request); }, expectedError); - assert((client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes analyzeSyntax without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() + ); + client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.analyzeSyntax( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('analyzeEntities', () => { - it('invokes analyzeEntities without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse()); - client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeEntities(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes analyzeEntities without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse()); - client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.analyzeEntities( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes analyzeEntities with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeEntities = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.analyzeEntities(request); }, expectedError); - assert((client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes analyzeSyntax with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.analyzeSyntax = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.analyzeSyntax(request); + }, expectedError); + assert( + (client.innerApiCalls.analyzeSyntax as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('classifyText', () => { + it('invokes classifyText without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextResponse() + ); + client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); + const [response] = await client.classifyText(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('analyzeEntitySentiment', () => { - it('invokes analyzeEntitySentiment without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse()); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeEntitySentiment(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes analyzeEntitySentiment without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse()); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.analyzeEntitySentiment( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes analyzeEntitySentiment with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.analyzeEntitySentiment(request); }, expectedError); - assert((client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes classifyText without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextResponse() + ); + client.innerApiCalls.classifyText = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.classifyText( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IClassifyTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('analyzeSyntax', () => { - it('invokes analyzeSyntax without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse()); - client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); - const [response] = await client.analyzeSyntax(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes analyzeSyntax without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse()); - client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.analyzeSyntax( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes analyzeSyntax with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.analyzeSyntax = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.analyzeSyntax(request); }, expectedError); - assert((client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes classifyText with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.classifyText = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.classifyText(request); + }, expectedError); + assert( + (client.innerApiCalls.classifyText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('annotateText', () => { + it('invokes annotateText without error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextResponse() + ); + client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); + const [response] = await client.annotateText(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - describe('classifyText', () => { - it('invokes classifyText without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextResponse()); - client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); - const [response] = await client.classifyText(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.classifyText as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes classifyText without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextResponse()); - client.innerApiCalls.classifyText = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.classifyText( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IClassifyTextResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.classifyText as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes classifyText with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.ClassifyTextRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.classifyText = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.classifyText(request); }, expectedError); - assert((client.innerApiCalls.classifyText as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes annotateText without error using callback', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextResponse() + ); + client.innerApiCalls.annotateText = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.annotateText( + request, + ( + err?: Error | null, + result?: protos.google.cloud.language.v1beta2.IAnnotateTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); }); - describe('annotateText', () => { - it('invokes annotateText without error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextResponse()); - client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); - const [response] = await client.annotateText(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.annotateText as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes annotateText without error using callback', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextRequest()); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextResponse()); - client.innerApiCalls.annotateText = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.annotateText( - request, - (err?: Error|null, result?: protos.google.cloud.language.v1beta2.IAnnotateTextResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.annotateText as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes annotateText with error', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.language.v1beta2.AnnotateTextRequest()); - const expectedOptions = {}; - const expectedError = new Error('expected'); - client.innerApiCalls.annotateText = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { await client.annotateText(request); }, expectedError); - assert((client.innerApiCalls.annotateText as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); + it('invokes annotateText with error', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.annotateText = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.annotateText(request); + }, expectedError); + assert( + (client.innerApiCalls.annotateText as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); + }); }); diff --git a/packages/google-cloud-language/webpack.config.js b/packages/google-cloud-language/webpack.config.js index ea86f1d01be..e92ce835266 100644 --- a/packages/google-cloud-language/webpack.config.js +++ b/packages/google-cloud-language/webpack.config.js @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/ + exclude: /node_modules/, }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]grpc/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader' + use: 'null-loader', }, ], }, From 31038a4d44bad8c9506b8bfe0a9209d11109ad3f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 May 2020 06:54:36 +0200 Subject: [PATCH 350/488] chore(deps): update dependency uuid to v8 (#460) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [uuid](https://togithub.com/uuidjs/uuid) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/uuid/7.0.3/8.0.0) | --- ### Release Notes
uuidjs/uuid ### [`v8.0.0`](https://togithub.com/uuidjs/uuid/blob/master/CHANGELOG.md#​800-httpsgithubcomuuidjsuuidcomparev703v800-2020-04-29) [Compare Source](https://togithub.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) ##### ⚠ BREAKING CHANGES - For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. ```diff -import uuid from 'uuid'; -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' ``` - Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. Instead use the named exports that this module exports. For ECMAScript Modules (ESM): ```diff -import uuidv4 from 'uuid/v4'; +import { v4 as uuidv4 } from 'uuid'; uuidv4(); ``` For CommonJS: ```diff -const uuidv4 = require('uuid/v4'); +const { v4: uuidv4 } = require('uuid'); uuidv4(); ``` ##### Features - native Node.js ES Modules (wrapper approach) ([#​423](https://togithub.com/uuidjs/uuid/issues/423)) ([2d9f590](https://togithub.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#​245](https://togithub.com/uuidjs/uuid/issues/245) [#​419](https://togithub.com/uuidjs/uuid/issues/419) [#​342](https://togithub.com/uuidjs/uuid/issues/342) - remove deep requires ([#​426](https://togithub.com/uuidjs/uuid/issues/426)) ([daf72b8](https://togithub.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) ##### Bug Fixes - add CommonJS syntax example to README quickstart section ([#​417](https://togithub.com/uuidjs/uuid/issues/417)) ([e0ec840](https://togithub.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) ##### [7.0.3](https://togithub.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) ##### Bug Fixes - make deep require deprecation warning work in browsers ([#​409](https://togithub.com/uuidjs/uuid/issues/409)) ([4b71107](https://togithub.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#​408](https://togithub.com/uuidjs/uuid/issues/408) ##### [7.0.2](https://togithub.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) ##### Bug Fixes - make access to msCrypto consistent ([#​393](https://togithub.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://togithub.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) - simplify link in deprecation warning ([#​391](https://togithub.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://togithub.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) - update links to match content in readme ([#​386](https://togithub.com/uuidjs/uuid/issues/386)) ([44f2f86](https://togithub.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) ##### [7.0.1](https://togithub.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) ##### Bug Fixes - clean up esm builds for node and browser ([#​383](https://togithub.com/uuidjs/uuid/issues/383)) ([59e6a49](https://togithub.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) - provide browser versions independent from module system ([#​380](https://togithub.com/uuidjs/uuid/issues/380)) ([4344a22](https://togithub.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#​378](https://togithub.com/uuidjs/uuid/issues/378)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-language). --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 08539637b5a..a1db170ec16 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -24,6 +24,6 @@ "devDependencies": { "chai": "^4.2.0", "mocha": "^7.0.0", - "uuid": "^7.0.0" + "uuid": "^8.0.0" } } From 9bde1d3a634b2838d2b72745969cb9574fa96fbf Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 5 May 2020 17:27:05 -0700 Subject: [PATCH 351/488] chore: update npm scripts and synth.py (#458) Update npm scripts: add clean, prelint, prefix; make sure that lint and fix are set properly. Use post-process feature of synthtool. --- packages/google-cloud-language/package.json | 5 +++-- packages/google-cloud-language/synth.py | 7 ++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index a3ed0556dbd..3f63cabb33e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -31,7 +31,7 @@ ], "scripts": { "docs": "jsdoc -c .jsdoc.js", - "lint": "gts fix", + "lint": "gts check", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", "system-test": "mocha build/system-test", "test": "c8 mocha build/test", @@ -42,7 +42,8 @@ "compile-protos": "compileProtos src", "predocs-test": "npm run docs", "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install" + "prelint": "cd samples; npm link ../; npm install", + "precompile": "gts clean" }, "dependencies": { "google-gax": "^2.1.0" diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index 15033a47b16..6ec607fda94 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -1,7 +1,7 @@ import synthtool as s import synthtool.gcp as gcp +import synthtool.languages.node as node import logging -import subprocess logging.basicConfig(level=logging.DEBUG) @@ -30,7 +30,4 @@ templates = common_templates.node_library(source_location='build/src') s.copy(templates) -# Node.js specific cleanup -subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) -subprocess.run(['npx', 'compileProtos', 'src']) +node.postprocess_gapic_library() From 58d5758e07fe967b88a228b6b80a66d7f8b2d3f4 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 5 May 2020 18:35:07 -0700 Subject: [PATCH 352/488] fix: regenerate unit tests (#461) --- packages/google-cloud-language/synth.metadata | 14 +++------- .../test/gapic_language_service_v1.ts | 27 +++++++------------ .../test/gapic_language_service_v1beta2.ts | 27 +++++++------------ 3 files changed, 21 insertions(+), 47 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index e7871fabb5c..b2d7c132976 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "69fd6680792b36c2fd73e096b4cb4ac284107b51" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", - "internalRef": "307114445" + "remote": "git@github.com:googleapis/nodejs-language.git", + "sha": "51a2004bb353d2222a9783a0a9908cd86f200f9e" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" + "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" } } ], diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index c9b4dda10af..7707da7bb6f 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -212,9 +212,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.analyzeSentiment(request); - }, expectedError); + await assert.rejects(client.analyzeSentiment(request), expectedError); assert( (client.innerApiCalls.analyzeSentiment as SinonStub) .getCall(0) @@ -302,9 +300,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.analyzeEntities(request); - }, expectedError); + await assert.rejects(client.analyzeEntities(request), expectedError); assert( (client.innerApiCalls.analyzeEntities as SinonStub) .getCall(0) @@ -394,9 +390,10 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.analyzeEntitySentiment(request); - }, expectedError); + await assert.rejects( + client.analyzeEntitySentiment(request), + expectedError + ); assert( (client.innerApiCalls.analyzeEntitySentiment as SinonStub) .getCall(0) @@ -484,9 +481,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.analyzeSyntax(request); - }, expectedError); + await assert.rejects(client.analyzeSyntax(request), expectedError); assert( (client.innerApiCalls.analyzeSyntax as SinonStub) .getCall(0) @@ -574,9 +569,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.classifyText(request); - }, expectedError); + await assert.rejects(client.classifyText(request), expectedError); assert( (client.innerApiCalls.classifyText as SinonStub) .getCall(0) @@ -664,9 +657,7 @@ describe('v1.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.annotateText(request); - }, expectedError); + await assert.rejects(client.annotateText(request), expectedError); assert( (client.innerApiCalls.annotateText as SinonStub) .getCall(0) diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 94377b9223e..5b60359ddb0 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -212,9 +212,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.analyzeSentiment(request); - }, expectedError); + await assert.rejects(client.analyzeSentiment(request), expectedError); assert( (client.innerApiCalls.analyzeSentiment as SinonStub) .getCall(0) @@ -302,9 +300,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.analyzeEntities(request); - }, expectedError); + await assert.rejects(client.analyzeEntities(request), expectedError); assert( (client.innerApiCalls.analyzeEntities as SinonStub) .getCall(0) @@ -394,9 +390,10 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.analyzeEntitySentiment(request); - }, expectedError); + await assert.rejects( + client.analyzeEntitySentiment(request), + expectedError + ); assert( (client.innerApiCalls.analyzeEntitySentiment as SinonStub) .getCall(0) @@ -484,9 +481,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.analyzeSyntax(request); - }, expectedError); + await assert.rejects(client.analyzeSyntax(request), expectedError); assert( (client.innerApiCalls.analyzeSyntax as SinonStub) .getCall(0) @@ -574,9 +569,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.classifyText(request); - }, expectedError); + await assert.rejects(client.classifyText(request), expectedError); assert( (client.innerApiCalls.classifyText as SinonStub) .getCall(0) @@ -664,9 +657,7 @@ describe('v1beta2.LanguageServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.annotateText(request); - }, expectedError); + await assert.rejects(client.annotateText(request), expectedError); assert( (client.innerApiCalls.annotateText as SinonStub) .getCall(0) From 28eb2e7a01b15c762ffbd70e152ada95a222c95c Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Wed, 6 May 2020 16:37:54 -0700 Subject: [PATCH 353/488] fix: synth.py clean up for multiple version (#463) --- packages/google-cloud-language/src/index.ts | 11 +++++------ packages/google-cloud-language/synth.metadata | 12 ++++++++++-- packages/google-cloud-language/synth.py | 12 +++++++----- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/packages/google-cloud-language/src/index.ts b/packages/google-cloud-language/src/index.ts index 99569d71493..eedcf282434 100644 --- a/packages/google-cloud-language/src/index.ts +++ b/packages/google-cloud-language/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,17 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** -import * as v1beta2 from './v1beta2'; import * as v1 from './v1'; +import * as v1beta2 from './v1beta2'; const LanguageServiceClient = v1.LanguageServiceClient; + export {v1, v1beta2, LanguageServiceClient}; -// For compatibility with JavaScript libraries we need to provide this default export: -// tslint:disable-next-line no-default-export export default {v1, v1beta2, LanguageServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index b2d7c132976..2aed1b22ad8 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,14 +4,22 @@ "git": { "name": ".", "remote": "git@github.com:googleapis/nodejs-language.git", - "sha": "51a2004bb353d2222a9783a0a9908cd86f200f9e" + "sha": "84b62fdebba9b81746d0bceb993ff0e967c9ce5e" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "6dfd72d028a0d0a43764e060f7b15e004385c3a1", + "internalRef": "310168181" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" + "sha": "756bc4dfc24e8bc4c5dd4116daa41a0440ebf5a0" } } ], diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index 6ec607fda94..488f984b760 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -9,25 +9,27 @@ gapic = gcp.GAPICMicrogenerator() +versions = ['v1', 'v1beta2'] # tasks has two product names, and a poorly named artman yaml -for version in ['v1', 'v1beta2']: +for version in versions: library = gapic.typescript_library( 'language', generator_args={ "grpc-service-config": f"google/cloud/language/{version}/language_grpc_service_config.json", - "package-name":f"@google-cloud/language" - }, + "package-name": f"@google-cloud/language" + }, proto_path=f'/google/cloud/language/{version}', version=version) # skip index, protos, package.json, and README.md s.copy( library, - excludes=['package.json', 'README.md', 'src/index.ts']) + excludes=['package.json', 'README.md']) # Update common templates common_templates = gcp.CommonTemplates() -templates = common_templates.node_library(source_location='build/src') +templates = common_templates.node_library( + source_location='build/src', versions=versions, default_version='v1') s.copy(templates) node.postprocess_gapic_library() From 9daed17821dd9712304151edaf22b0bb1e25ec61 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 May 2020 11:27:25 -0700 Subject: [PATCH 354/488] build: do not fail builds on codecov errors (#528) (#465) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2f68300a-9812-4342-86c6-33ab267ece4f/targets Source-Link: https://github.com/googleapis/synthtool/commit/be74d3e532faa47eb59f1a0eaebde0860d1d8ab4 --- packages/google-cloud-language/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 2aed1b22ad8..b23c41d349d 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-language.git", - "sha": "84b62fdebba9b81746d0bceb993ff0e967c9ce5e" + "remote": "https://github.com/googleapis/nodejs-language.git", + "sha": "b63d9fc53a0287c5d4c4c626d91b520bd0b28cd4" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "756bc4dfc24e8bc4c5dd4116daa41a0440ebf5a0" + "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" } } ], From bc4dd2629930d57d0ee890e15239594783f5f4c3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 15 May 2020 20:04:21 +0200 Subject: [PATCH 355/488] fix(deps): update dependency @google-cloud/storage to v5 (#466) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@google-cloud/storage](https://togithub.com/googleapis/nodejs-storage) | dependencies | major | [`^4.0.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/@google-cloud%2fstorage/4.7.0/5.0.0) | --- ### Release Notes
googleapis/nodejs-storage ### [`v5.0.0`](https://togithub.com/googleapis/nodejs-storage/blob/master/CHANGELOG.md#​500-httpswwwgithubcomgoogleapisnodejs-storagecomparev470v500-2020-05-13) [Compare Source](https://togithub.com/googleapis/nodejs-storage/compare/v4.7.0...v5.0.0) ##### ⚠ BREAKING CHANGES - automatically detect contentType if not provided ([#​1190](https://togithub.com/googleapis/nodejs-storage/issues/1190)) - drop keepAcl parameter in file copy ([#​1166](https://togithub.com/googleapis/nodejs-storage/issues/1166)) - drop support for node.js 8.x ##### Features - automatically detect contentType if not provided ([#​1190](https://www.github.com/googleapis/nodejs-storage/issues/1190)) ([b31ba4a](https://www.github.com/googleapis/nodejs-storage/commit/b31ba4a11399b57538ddf0d6ca2e10b2aa3fbc3a)) - enable bytes read tracking ([#​1074](https://www.github.com/googleapis/nodejs-storage/issues/1074)) ([0776a04](https://www.github.com/googleapis/nodejs-storage/commit/0776a044f3b2149b485e114369e952688df75645)) ##### Bug Fixes - **bucket:** Only disable resumable uploads for bucket.upload (fixes [#​1133](https://www.github.com/googleapis/nodejs-storage/issues/1133)) ([#​1135](https://www.github.com/googleapis/nodejs-storage/issues/1135)) ([2c20148](https://www.github.com/googleapis/nodejs-storage/commit/2c201486b7b2d3146846ac96c877a904c4a674b0)), closes [/github.com/googleapis/nodejs-storage/pull/1135#issuecomment-620070038](https://www.github.com/googleapis//github.com/googleapis/nodejs-storage/pull/1135/issues/issuecomment-620070038) - add whitespace to generateV4SignedPolicy ([#​1136](https://www.github.com/googleapis/nodejs-storage/issues/1136)) ([dcee78b](https://www.github.com/googleapis/nodejs-storage/commit/dcee78b98da23b02fe7d2f13a9270546bc07bba8)) - apache license URL ([#​468](https://www.github.com/googleapis/nodejs-storage/issues/468)) ([#​1151](https://www.github.com/googleapis/nodejs-storage/issues/1151)) ([e8116d3](https://www.github.com/googleapis/nodejs-storage/commit/e8116d3c6fa7412858692e67745b514eef78850e)) - Point to team in correct org ([#​1185](https://www.github.com/googleapis/nodejs-storage/issues/1185)) ([0bb1909](https://www.github.com/googleapis/nodejs-storage/commit/0bb19098013acf71cc3842f78ff333a8e356331a)) - **deps:** update dependency [@​google-cloud/common](https://togithub.com/google-cloud/common) to v3 ([#​1134](https://www.github.com/googleapis/nodejs-storage/issues/1134)) ([774ac5c](https://www.github.com/googleapis/nodejs-storage/commit/774ac5c75f02238418cc8ed7242297ea573ca9cb)) - **deps:** update dependency [@​google-cloud/paginator](https://togithub.com/google-cloud/paginator) to v3 ([#​1131](https://www.github.com/googleapis/nodejs-storage/issues/1131)) ([c1614d9](https://www.github.com/googleapis/nodejs-storage/commit/c1614d98e3047db379e09299b1014e80d73ed52f)) - **deps:** update dependency [@​google-cloud/promisify](https://togithub.com/google-cloud/promisify) to v2 ([#​1127](https://www.github.com/googleapis/nodejs-storage/issues/1127)) ([06624a5](https://www.github.com/googleapis/nodejs-storage/commit/06624a534cd1fdbc38455eee8d89f9f60ba75758)) - **deps:** update dependency uuid to v8 ([#​1170](https://www.github.com/googleapis/nodejs-storage/issues/1170)) ([6a98d64](https://www.github.com/googleapis/nodejs-storage/commit/6a98d64831baf1ca1ec2f03ecc4914745cba1c86)) - **deps:** update gcs-resumable-upload, remove gitnpm usage ([#​1186](https://www.github.com/googleapis/nodejs-storage/issues/1186)) ([c78c9cd](https://www.github.com/googleapis/nodejs-storage/commit/c78c9cde49dccb2fcd4ce10e4e9f8299d65f6838)) - **v4-policy:** encode special characters ([#​1169](https://www.github.com/googleapis/nodejs-storage/issues/1169)) ([6e48539](https://www.github.com/googleapis/nodejs-storage/commit/6e48539d76ca27e6f4c6cf2ac0872970f7391fed)) - sync to [googleapis/conformance-tests@`fa559a1`](https://togithub.com/googleapis/conformance-tests/commit/fa559a1) ([#​1167](https://www.github.com/googleapis/nodejs-storage/issues/1167)) ([5500446](https://www.github.com/googleapis/nodejs-storage/commit/550044619d2f17a1977c83bce5df915c6dc9578c)), closes [#​1168](https://www.github.com/googleapis/nodejs-storage/issues/1168) ##### Miscellaneous Chores - drop keepAcl parameter in file copy ([#​1166](https://www.github.com/googleapis/nodejs-storage/issues/1166)) ([5a4044a](https://www.github.com/googleapis/nodejs-storage/commit/5a4044a8ba13f248fc4f791248f797eb0f1f3c16)) ##### Build System - drop support for node.js 8.x ([b80c025](https://www.github.com/googleapis/nodejs-storage/commit/b80c025f106052fd25554c64314b3b3520e829b5))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-language). --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index a1db170ec16..75f56ffd085 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -18,7 +18,7 @@ "@google-cloud/automl": "^2.0.0", "mathjs": "^6.0.0", "@google-cloud/language": "^4.0.0", - "@google-cloud/storage": "^4.0.0", + "@google-cloud/storage": "^5.0.0", "yargs": "^15.0.0" }, "devDependencies": { From 9aaccf7a3010f2a5ba459d07d68f14d464a82fbf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 26 May 2020 17:58:51 -0700 Subject: [PATCH 356/488] docs: remove retired samples from README --- packages/google-cloud-language/README.md | 3 -- .../google-cloud-language/samples/README.md | 54 ------------------- packages/google-cloud-language/synth.metadata | 2 +- 3 files changed, 1 insertion(+), 58 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index b3ddc0a70d8..7a16d81bdd4 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -93,9 +93,6 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | | Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) | -| Automl Natural Language Dataset | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageDataset.js,samples/README.md) | -| Automl Natural Language Model | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageModel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageModel.js,samples/README.md) | -| Automl Natural Language Predict | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguagePredict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguagePredict.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Set Endpoint | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/setEndpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) | diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index ee75bba7647..53f347d5a98 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -15,9 +15,6 @@ analysis, and syntax analysis. This API is part of the larger Cloud Machine Lear * [Before you begin](#before-you-begin) * [Samples](#samples) * [Analyze v1](#analyze-v1) - * [Automl Natural Language Dataset](#automl-natural-language-dataset) - * [Automl Natural Language Model](#automl-natural-language-model) - * [Automl Natural Language Predict](#automl-natural-language-predict) * [Quickstart](#quickstart) * [Set Endpoint](#set-endpoint) @@ -53,57 +50,6 @@ __Usage:__ -### Automl Natural Language Dataset - -View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageDataset.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageDataset.js,samples/README.md) - -__Usage:__ - - -`node samples/automlNaturalLanguageDataset.js` - - ------ - - - - -### Automl Natural Language Model - -View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageModel.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageModel.js,samples/README.md) - -__Usage:__ - - -`node samples/automlNaturalLanguageModel.js` - - ------ - - - - -### Automl Natural Language Predict - -View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguagePredict.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguagePredict.js,samples/README.md) - -__Usage:__ - - -`node samples/automlNaturalLanguagePredict.js` - - ------ - - - - ### Quickstart View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/quickstart.js). diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index b23c41d349d..f47db0a847c 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "b63d9fc53a0287c5d4c4c626d91b520bd0b28cd4" + "sha": "c095bf13502de5cf4fb71a4fd2b53bb0fbb918f6" } }, { From e32dc9e3d6b28a59955b73cfb14e187f8cfadcea Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 May 2020 03:03:57 +0200 Subject: [PATCH 357/488] fix(deps): update dependency mathjs to v7 (#464) Co-authored-by: Benjamin E. Coe --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 75f56ffd085..15567d7b6cd 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/automl": "^2.0.0", - "mathjs": "^6.0.0", + "mathjs": "^7.0.0", "@google-cloud/language": "^4.0.0", "@google-cloud/storage": "^5.0.0", "yargs": "^15.0.0" From db7cb1b564a7d295f3d8782d2b28a5e19bb71596 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Jun 2020 17:39:24 -0700 Subject: [PATCH 358/488] build: update protos.js (#468) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/041f5df7-f5d3-4b2a-9ede-0752bf41c185/targets --- .../google-cloud-language/protos/protos.d.ts | 6 +++++ .../google-cloud-language/protos/protos.js | 26 +++++++++++++++++-- .../google-cloud-language/protos/protos.json | 6 ++++- packages/google-cloud-language/synth.metadata | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index 01fd3732f2b..b6e85a6d5a9 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -6696,6 +6696,9 @@ export namespace google { /** FieldDescriptorProto options */ options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } /** Represents a FieldDescriptorProto. */ @@ -6737,6 +6740,9 @@ export namespace google { /** FieldDescriptorProto options. */ public options?: (google.protobuf.IFieldOptions|null); + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + /** * Creates a new FieldDescriptorProto instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 222a0e18860..5c75f54d386 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -18357,6 +18357,7 @@ * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex * @property {string|null} [jsonName] FieldDescriptorProto jsonName * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional */ /** @@ -18454,6 +18455,14 @@ */ FieldDescriptorProto.prototype.options = null; + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + /** * Creates a new FieldDescriptorProto instance using the specified properties. * @function create @@ -18498,6 +18507,8 @@ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); return writer; }; @@ -18562,6 +18573,9 @@ case 8: message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); break; + case 17: + message.proto3Optional = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -18656,6 +18670,9 @@ if (error) return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; @@ -18778,6 +18795,8 @@ throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); return message; }; @@ -18805,6 +18824,7 @@ object.options = null; object.oneofIndex = 0; object.jsonName = ""; + object.proto3Optional = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -18826,6 +18846,8 @@ object.oneofIndex = message.oneofIndex; if (message.jsonName != null && message.hasOwnProperty("jsonName")) object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; return object; }; @@ -20617,7 +20639,7 @@ * @memberof google.protobuf.FileOptions * @instance */ - FileOptions.prototype.ccEnableArenas = false; + FileOptions.prototype.ccEnableArenas = true; /** * FileOptions objcClassPrefix. @@ -21066,7 +21088,7 @@ object.javaGenerateEqualsAndHash = false; object.deprecated = false; object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; + object.ccEnableArenas = true; object.objcClassPrefix = ""; object.csharpNamespace = ""; object.swiftPrefix = ""; diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index f38753e06c7..b07582f4343 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -1894,6 +1894,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -2129,7 +2133,7 @@ "type": "bool", "id": 31, "options": { - "default": false + "default": true } }, "objcClassPrefix": { diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index f47db0a847c..61c3563269c 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "c095bf13502de5cf4fb71a4fd2b53bb0fbb918f6" + "sha": "0d706b2080a6e8a4026e425e7c4b7e5e1968e359" } }, { From 7954a3a1fc0820800a4d7db8e82fc08e42dc6cce Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2020 10:34:59 -0700 Subject: [PATCH 359/488] chore: release 4.0.1 (#462) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-language/CHANGELOG.md | 10 ++++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index ea64296281a..ec922916233 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,16 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.0.1](https://www.github.com/googleapis/nodejs-language/compare/v4.0.0...v4.0.1) (2020-06-04) + + +### Bug Fixes + +* regenerate unit tests ([#461](https://www.github.com/googleapis/nodejs-language/issues/461)) ([84b62fd](https://www.github.com/googleapis/nodejs-language/commit/84b62fdebba9b81746d0bceb993ff0e967c9ce5e)) +* synth.py clean up for multiple version ([#463](https://www.github.com/googleapis/nodejs-language/issues/463)) ([b63d9fc](https://www.github.com/googleapis/nodejs-language/commit/b63d9fc53a0287c5d4c4c626d91b520bd0b28cd4)) +* **deps:** update dependency @google-cloud/storage to v5 ([#466](https://www.github.com/googleapis/nodejs-language/issues/466)) ([552a560](https://www.github.com/googleapis/nodejs-language/commit/552a5603738ac73b6d6018272efa5697ad01aa10)) +* **deps:** update dependency mathjs to v7 ([#464](https://www.github.com/googleapis/nodejs-language/issues/464)) ([0d706b2](https://www.github.com/googleapis/nodejs-language/commit/0d706b2080a6e8a4026e425e7c4b7e5e1968e359)) + ## [4.0.0](https://www.github.com/googleapis/nodejs-language/compare/v3.8.0...v4.0.0) (2020-04-13) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 3f63cabb33e..f725e4a76aa 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.0.0", + "version": "4.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 15567d7b6cd..e60e2f9e798 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^7.0.0", - "@google-cloud/language": "^4.0.0", + "@google-cloud/language": "^4.0.1", "@google-cloud/storage": "^5.0.0", "yargs": "^15.0.0" }, From ca0e5164e9b090d024849560cb5f0a1c9e1ed0d8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 9 Jun 2020 17:41:14 -0700 Subject: [PATCH 360/488] feat: move ts target to es2018 from es2016 (#471) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9b55eba7-85ee-48d5-a737-8b677439db4d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/1c92077459db3dc50741e878f98b08c6261181e0 --- packages/google-cloud-language/protos/protos.js | 2 +- .../src/v1/language_service_client.ts | 7 +++++++ .../src/v1beta2/language_service_client.ts | 7 +++++++ packages/google-cloud-language/synth.metadata | 4 ++-- packages/google-cloud-language/tsconfig.json | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 5c75f54d386..ee33fb8961a 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_language_4_0_0_protos || ($protobuf.roots._google_cloud_language_4_0_0_protos = {}); + var $root = $protobuf.roots._google_cloud_language_protos || ($protobuf.roots._google_cloud_language_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index dac960769f0..c3de97c2cef 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -90,6 +90,13 @@ export class LanguageServiceClient { } opts.servicePath = opts.servicePath || servicePath; opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; const isBrowser = typeof window !== 'undefined'; diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 7ca3bf028a6..b9ca03a8df4 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -90,6 +90,13 @@ export class LanguageServiceClient { } opts.servicePath = opts.servicePath || servicePath; opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; const isBrowser = typeof window !== 'undefined'; diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 61c3563269c..f70b39b374e 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "0d706b2080a6e8a4026e425e7c4b7e5e1968e359" + "sha": "d0496133d43f079d6d03c5757bec05c6385ed730" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" + "sha": "1c92077459db3dc50741e878f98b08c6261181e0" } } ], diff --git a/packages/google-cloud-language/tsconfig.json b/packages/google-cloud-language/tsconfig.json index 613d35597b5..c78f1c884ef 100644 --- a/packages/google-cloud-language/tsconfig.json +++ b/packages/google-cloud-language/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2016", + "es2018", "dom" ] }, From e21aa35764135b88e163bec0e8646b3c5beb2dd9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Jun 2020 17:46:34 +0200 Subject: [PATCH 361/488] chore(deps): update dependency mocha to v8 (#473) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [mocha](https://mochajs.org/) ([source](https://togithub.com/mochajs/mocha)) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/mocha/7.2.0/8.0.1) | --- ### Release Notes
mochajs/mocha ### [`v8.0.1`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​801--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v8.0.0...v8.0.1) The obligatory patch after a major. #### :bug: Fixes - [#​4328](https://togithub.com/mochajs/mocha/issues/4328): Fix `--parallel` when combined with `--watch` ([**@​boneskull**](https://togithub.com/boneskull)) ### [`v8.0.0`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​800--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v7.2.0...v8.0.0) In this major release, Mocha adds the ability to _run tests in parallel_. Better late than never! Please note the **breaking changes** detailed below. Let's welcome [**@​giltayar**](https://togithub.com/giltayar) and [**@​nicojs**](https://togithub.com/nicojs) to the maintenance team! #### :boom: Breaking Changes - [#​4164](https://togithub.com/mochajs/mocha/issues/4164): **Mocha v8.0.0 now requires Node.js v10.0.0 or newer.** Mocha no longer supports the Node.js v8.x line ("Carbon"), which entered End-of-Life at the end of 2019 ([**@​UlisesGascon**](https://togithub.com/UlisesGascon)) - [#​4175](https://togithub.com/mochajs/mocha/issues/4175): Having been deprecated with a warning since v7.0.0, **`mocha.opts` is no longer supported** ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND:** Replace `mocha.opts` with a [configuration file](https://mochajs.org/#configuring-mocha-nodejs). - [#​4260](https://togithub.com/mochajs/mocha/issues/4260): Remove `enableTimeout()` (`this.enableTimeout()`) from the context object ([**@​craigtaub**](https://togithub.com/craigtaub)) :sparkles: **WORKAROUND:** Replace usage of `this.enableTimeout(false)` in your tests with `this.timeout(0)`. - [#​4315](https://togithub.com/mochajs/mocha/issues/4315): The `spec` option no longer supports a comma-delimited list of files ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND**: Use an array instead (e.g., `"spec": "foo.js,bar.js"` becomes `"spec": ["foo.js", "bar.js"]`). - [#​4309](https://togithub.com/mochajs/mocha/issues/4309): Drop support for Node.js v13.x line, which is now End-of-Life ([**@​juergba**](https://togithub.com/juergba)) - [#​4282](https://togithub.com/mochajs/mocha/issues/4282): `--forbid-only` will throw an error even if exclusive tests are avoided via `--grep` or other means ([**@​arvidOtt**](https://togithub.com/arvidOtt)) - [#​4223](https://togithub.com/mochajs/mocha/issues/4223): The context object's `skip()` (`this.skip()`) in a "before all" (`before()`) hook will no longer execute subsequent sibling hooks, in addition to hooks in child suites ([**@​juergba**](https://togithub.com/juergba)) - [#​4178](https://togithub.com/mochajs/mocha/issues/4178): Remove previously soft-deprecated APIs ([**@​wnghdcjfe**](https://togithub.com/wnghdcjfe)): - `Mocha.prototype.ignoreLeaks()` - `Mocha.prototype.useColors()` - `Mocha.prototype.useInlineDiffs()` - `Mocha.prototype.hideDiff()` #### :tada: Enhancements - [#​4245](https://togithub.com/mochajs/mocha/issues/4245): Add ability to run tests in parallel for Node.js (see [docs](https://mochajs.org/#parallel-tests)) ([**@​boneskull**](https://togithub.com/boneskull)) :exclamation: See also [#​4244](https://togithub.com/mochajs/mocha/issues/4244); [Root Hook Plugins (docs)](https://mochajs.org/#root-hook-plugins) -- _root hooks must be defined via Root Hook Plugins to work in parallel mode_ - [#​4304](https://togithub.com/mochajs/mocha/issues/4304): `--require` now works with ES modules ([**@​JacobLey**](https://togithub.com/JacobLey)) - [#​4299](https://togithub.com/mochajs/mocha/issues/4299): In some circumstances, Mocha can run ES modules under Node.js v10 -- _use at your own risk!_ ([**@​giltayar**](https://togithub.com/giltayar)) #### :book: Documentation - [#​4246](https://togithub.com/mochajs/mocha/issues/4246): Add documentation for parallel mode and Root Hook plugins ([**@​boneskull**](https://togithub.com/boneskull)) #### :bug: Fixes (All bug fixes in Mocha v8.0.0 are also breaking changes, and are listed above)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f725e4a76aa..f824fb6a7b4 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -59,7 +59,7 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^7.0.0", + "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index e60e2f9e798..0e69863f9c9 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "chai": "^4.2.0", - "mocha": "^7.0.0", + "mocha": "^8.0.0", "uuid": "^8.0.0" } } From c8b4d68417a1168c6db3076ec6d047759e4a1258 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 11 Jun 2020 14:55:27 -0700 Subject: [PATCH 362/488] chore(nodejs_templates): add script logging to node_library populate-secrets.sh (#474) --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index f70b39b374e..5df3f9e003b 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "d0496133d43f079d6d03c5757bec05c6385ed730" + "sha": "df4d71c7a3c6a4b02fb48ee5cfed76f795a446ea" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1c92077459db3dc50741e878f98b08c6261181e0" + "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" } } ], From 34b9fe21ba2a2bb2500cfefa7134b0f36772e53a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 13 Jun 2020 16:28:48 -0700 Subject: [PATCH 363/488] fix: ensure gax is usable from electron (#475) --- .../src/v1/language_service_client.ts | 13 +++++-------- .../src/v1beta2/language_service_client.ts | 13 +++++-------- packages/google-cloud-language/synth.metadata | 2 +- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index c3de97c2cef..8fc543092e7 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -99,14 +99,11 @@ export class LanguageServiceClient { // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { - opts.fallback = true; - } - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the LanguageServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index b9ca03a8df4..6a236f3bf80 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -99,14 +99,11 @@ export class LanguageServiceClient { // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { - opts.fallback = true; - } - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the LanguageServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 5df3f9e003b..dfa00fd3718 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "df4d71c7a3c6a4b02fb48ee5cfed76f795a446ea" + "sha": "3c67c269d13636e9e645e4fdca50d312202abcfd" } }, { From 0536e5cef80beeb72e8aeb61f4dc84257f880558 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2020 10:20:10 -0700 Subject: [PATCH 364/488] chore: release 4.1.0 (#472) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-language/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index ec922916233..736fa6696df 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [4.1.0](https://www.github.com/googleapis/nodejs-language/compare/v4.0.1...v4.1.0) (2020-06-13) + + +### Features + +* move ts target to es2018 from es2016 ([#471](https://www.github.com/googleapis/nodejs-language/issues/471)) ([df4d71c](https://www.github.com/googleapis/nodejs-language/commit/df4d71c7a3c6a4b02fb48ee5cfed76f795a446ea)) + + +### Bug Fixes + +* ensure gax is usable from electron ([#475](https://www.github.com/googleapis/nodejs-language/issues/475)) ([6fb93c9](https://www.github.com/googleapis/nodejs-language/commit/6fb93c9158aefc2be3541c6cb753621960314daf)) + ### [4.0.1](https://www.github.com/googleapis/nodejs-language/compare/v4.0.0...v4.0.1) (2020-06-04) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f824fb6a7b4..90926195832 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.0.1", + "version": "4.1.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 0e69863f9c9..a43faa0087d 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^7.0.0", - "@google-cloud/language": "^4.0.1", + "@google-cloud/language": "^4.1.0", "@google-cloud/storage": "^5.0.0", "yargs": "^15.0.0" }, From c6b65bdd94dce4e0532b8eeaf84598a6bdc1a202 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 18 Jun 2020 07:49:10 -0700 Subject: [PATCH 365/488] chore: update node issue template (#476) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/37f383f8-7560-459e-b66c-def10ff830cb/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/b10590a4a1568548dd13cfcea9aa11d40898144b --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index dfa00fd3718..a188b7cad37 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "3c67c269d13636e9e645e4fdca50d312202abcfd" + "sha": "ec8af51419d1c0ccaa6e73cdee4bbcb4379b0d42" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" + "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" } } ], From ed959088e0866194524785db5ce8e8c036e16a95 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 24 Jun 2020 13:27:10 -0700 Subject: [PATCH 366/488] build: use bazel for library generation (#477) * build: use bazel for library generation * chore: trigger CI --- packages/google-cloud-language/synth.metadata | 18 +++++++++--------- packages/google-cloud-language/synth.py | 15 ++++----------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index a188b7cad37..9fd4b0d54ff 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "ec8af51419d1c0ccaa6e73cdee4bbcb4379b0d42" + "remote": "git@github.com:googleapis/nodejs-language.git", + "sha": "2361fd3f01eac2216a7c2d98e026a70286ce0731" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6dfd72d028a0d0a43764e060f7b15e004385c3a1", - "internalRef": "310168181" + "sha": "a60b165895ad1f100d7014c74b7df512f9377fdb", + "internalRef": "318104666" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" + "sha": "ce68c0e70d36c93ffcde96e9908fb4d94aa4f2e4" } } ], @@ -29,8 +29,8 @@ "source": "googleapis", "apiName": "language", "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } }, { @@ -38,8 +38,8 @@ "source": "googleapis", "apiName": "language", "apiVersion": "v1beta2", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } } ] diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py index 488f984b760..b073188cd26 100644 --- a/packages/google-cloud-language/synth.py +++ b/packages/google-cloud-language/synth.py @@ -8,20 +8,13 @@ AUTOSYNTH_MULTIPLE_COMMITS = True -gapic = gcp.GAPICMicrogenerator() +gapic = gcp.GAPICBazel() versions = ['v1', 'v1beta2'] -# tasks has two product names, and a poorly named artman yaml for version in versions: - library = gapic.typescript_library( + library = gapic.node_library( 'language', - generator_args={ - "grpc-service-config": f"google/cloud/language/{version}/language_grpc_service_config.json", - "package-name": f"@google-cloud/language" - }, - proto_path=f'/google/cloud/language/{version}', - version=version) - - # skip index, protos, package.json, and README.md + version, + ) s.copy( library, excludes=['package.json', 'README.md']) From 567276ad04466543f439adbe588841c1650b936a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 27 Jun 2020 17:46:13 -0700 Subject: [PATCH 367/488] build: add config .gitattributes (#478) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2a81bca4-7abd-4108-ac1f-21340f858709/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/dc9caca650c77b7039e2bbc3339ffb34ae78e5b7 --- packages/google-cloud-language/.gitattributes | 3 +++ packages/google-cloud-language/synth.metadata | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-language/.gitattributes diff --git a/packages/google-cloud-language/.gitattributes b/packages/google-cloud-language/.gitattributes new file mode 100644 index 00000000000..2e63216ae9c --- /dev/null +++ b/packages/google-cloud-language/.gitattributes @@ -0,0 +1,3 @@ +*.ts text eol=lf +*.js test eol=lf +protos/* linguist-generated diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 9fd4b0d54ff..ab6f20a445b 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-language.git", - "sha": "2361fd3f01eac2216a7c2d98e026a70286ce0731" + "remote": "https://github.com/googleapis/nodejs-language.git", + "sha": "4801fbee027850b11ff7efdd68a05c7703f028ce" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ce68c0e70d36c93ffcde96e9908fb4d94aa4f2e4" + "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" } } ], From de7b7a60442f8f11b27263fffaa7937bcd0bfdeb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Jul 2020 19:54:44 -0700 Subject: [PATCH 368/488] typeo (#481) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/cc99acfa-05b8-434b-9500-2f6faf2eaa02/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b --- packages/google-cloud-language/.gitattributes | 2 +- packages/google-cloud-language/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/.gitattributes b/packages/google-cloud-language/.gitattributes index 2e63216ae9c..d4f4169b28b 100644 --- a/packages/google-cloud-language/.gitattributes +++ b/packages/google-cloud-language/.gitattributes @@ -1,3 +1,3 @@ *.ts text eol=lf -*.js test eol=lf +*.js text eol=lf protos/* linguist-generated diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index ab6f20a445b..345f169b949 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "4801fbee027850b11ff7efdd68a05c7703f028ce" + "sha": "a1a524b187bccbe5c3473142a604c1797952337d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" + "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" } } ], From 2f7c25dd2347980e40ca8c9209074cda860812d6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jul 2020 18:50:21 +0200 Subject: [PATCH 369/488] chore(deps): update dependency ts-loader to v8 (#480) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/ts-loader/7.0.5/8.0.0) | --- ### Release Notes
TypeStrong/ts-loader ### [`v8.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v800) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v7.0.5...v8.0.0) - [Support for symlinks in project references](https://togithub.com/TypeStrong/ts-loader/pull/1136) - thanks [@​sheetalkamat](https://togithub.com/sheetalkamat)! - `ts-loader` now supports TypeScript 3.6 and greater **BREAKING CHANGE**
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 90926195832..d7c04ef4a70 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -63,7 +63,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", - "ts-loader": "^7.0.0", + "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", "webpack-cli": "^3.3.10" From 1294363d10d181106bc92a1629686602b57b3968 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 12 Jul 2020 18:47:39 +0200 Subject: [PATCH 370/488] chore(deps): update dependency @types/mocha to v8 (#482) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/7.0.2/8.0.0) | --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index d7c04ef4a70..0b120ea89df 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -49,7 +49,7 @@ "google-gax": "^2.1.0" }, "devDependencies": { - "@types/mocha": "^7.0.0", + "@types/mocha": "^8.0.0", "@types/node": "^12.0.0", "@types/sinon": "^9.0.0", "c8": "^7.0.0", From a50ab1e243cdf32d6f9ec96b8fe552faa6d90ada Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jul 2020 18:05:18 -0700 Subject: [PATCH 371/488] chore: update generated protos.js (#484) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9c6207e5-a7a6-4e44-ab6b-91751e0230b1/targets - [ ] To automatically regenerate this PR, check this box. --- .../google-cloud-language/protos/protos.js | 48 +++++++++++++++---- packages/google-cloud-language/synth.metadata | 2 +- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index ee33fb8961a..dc2dfac8636 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -979,7 +979,7 @@ Entity.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.Entity(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.Entity(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -990,12 +990,26 @@ message.type = reader.int32(); break; case 3: - reader.skip().pos++; if (message.metadata === $util.emptyObject) message.metadata = {}; - key = reader.string(); - reader.pos++; - message.metadata[key] = reader.string(); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; break; case 4: message.salience = reader.float(); @@ -8643,7 +8657,7 @@ Entity.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Entity(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Entity(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -8654,12 +8668,26 @@ message.type = reader.int32(); break; case 3: - reader.skip().pos++; if (message.metadata === $util.emptyObject) message.metadata = {}; - key = reader.string(); - reader.pos++; - message.metadata[key] = reader.string(); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; break; case 4: message.salience = reader.float(); diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 345f169b949..3face922659 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "a1a524b187bccbe5c3473142a604c1797952337d" + "sha": "3b60a7f894324088a965cc1713651c366e2434a1" } }, { From fc494c4c121f8d9434991acdf60573746af70bdb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jul 2020 18:20:09 -0700 Subject: [PATCH 372/488] build: missing closing paren in publish script (#485) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9c6207e5-a7a6-4e44-ab6b-91751e0230b1/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/d82deccf657a66e31bd5da9efdb96c6fa322fc7e --- packages/google-cloud-language/synth.metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 3face922659..aef7bcd352a 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" + "sha": "d82deccf657a66e31bd5da9efdb96c6fa322fc7e" } } ], From d7b8b9fa14c72cf2effab37e5a34da8121cd22d0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Jul 2020 15:12:45 -0700 Subject: [PATCH 373/488] build: add Node 8 tests (#488) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5e903fff-57bb-4395-bb94-8b4d1909dbf6/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-language/synth.metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index aef7bcd352a..248cbdacea6 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "3b60a7f894324088a965cc1713651c366e2434a1" + "sha": "c1377dc870bb50d67602f7cc0b0acdec78837678" } }, { From 6b7b8f89080536cc1a02ac9443afc042875af2e1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Jul 2020 16:07:10 -0700 Subject: [PATCH 374/488] chore: add config files for cloud-rad for node.js, delete Node 8 templates (#489) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5e903fff-57bb-4395-bb94-8b4d1909dbf6/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/21f1470ecd01424dc91c70f1a7c798e4e87d1eec Source-Link: https://github.com/googleapis/synthtool/commit/388e10f5ae302d3e8de1fac99f3a95d1ab8f824a --- .../google-cloud-language/api-extractor.json | 369 ++++++++++++++++++ packages/google-cloud-language/synth.metadata | 2 +- 2 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 packages/google-cloud-language/api-extractor.json diff --git a/packages/google-cloud-language/api-extractor.json b/packages/google-cloud-language/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-cloud-language/api-extractor.json @@ -0,0 +1,369 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/protos/protos.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [ ], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true, + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true, + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning", + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + }, + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + }, + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } + +} diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 248cbdacea6..d09f86e9b80 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d82deccf657a66e31bd5da9efdb96c6fa322fc7e" + "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" } } ], From d7142acb6fe8ffb31d40257098c8280b0a494000 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Tue, 21 Jul 2020 14:40:44 -0400 Subject: [PATCH 375/488] chore: add dev dependencies for cloud-rad ref docs (#490) --- packages/google-cloud-language/package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 0b120ea89df..ee22c85ee62 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -43,7 +43,9 @@ "predocs-test": "npm run docs", "prepare": "npm run compile", "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "precompile": "gts clean", + "api-extractor": "api-extractor run --local", + "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { "google-gax": "^2.1.0" @@ -66,6 +68,8 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" + "webpack-cli": "^3.3.10", + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10" } } From acf9ea060a73537b41f37020338a78abedf9b4c9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 22 Jul 2020 17:15:38 -0700 Subject: [PATCH 376/488] build: rename _toc to toc (#491) Source-Author: F. Hinkelmann Source-Date: Tue Jul 21 10:53:20 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Source-Link: https://github.com/googleapis/synthtool/commit/99c93fe09f8c1dca09dfc0301c8668e3a70dd796 --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index d09f86e9b80..26d434e4b83 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "c1377dc870bb50d67602f7cc0b0acdec78837678" + "sha": "d8080ae11a56eb7b837396ac48a587fa8f15f560" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" + "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" } } ], From 5dbaa980981c3fcd2eda440cddf8f74aff5d3e34 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 24 Jul 2020 13:40:08 -0700 Subject: [PATCH 377/488] chore: move gitattributes files to node templates (#492) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d43b90cc-a087-4c57-864c-1e4f93292dc6/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 --- packages/google-cloud-language/.gitattributes | 1 + packages/google-cloud-language/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.gitattributes b/packages/google-cloud-language/.gitattributes index d4f4169b28b..33739cb74e4 100644 --- a/packages/google-cloud-language/.gitattributes +++ b/packages/google-cloud-language/.gitattributes @@ -1,3 +1,4 @@ *.ts text eol=lf *.js text eol=lf protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 26d434e4b83..4b39c2ae25c 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "d8080ae11a56eb7b837396ac48a587fa8f15f560" + "sha": "1971f568fd64de75a7f04795574c2a1726934d04" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" + "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" } } ], From f167e3aa89e9415ada8d5a542b344d09eb7b0947 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jul 2020 11:58:28 -0700 Subject: [PATCH 378/488] chore(node): fix kokoro build path for cloud-rad (#493) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4bdc1826-2f69-49f1-a63b-94f99cceb5ee/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 4b39c2ae25c..9fdc8734d05 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "1971f568fd64de75a7f04795574c2a1726934d04" + "sha": "5f0ed94b4120ee7acf41338262ac7b3ed729ef0e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" + "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" } } ], From 0d5faf7138e9c5a25f476382d86754f29e2a9cb4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 30 Jul 2020 19:10:25 -0700 Subject: [PATCH 379/488] build: update protos (#494) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b205fd33-200c-4298-88b8-18b0d1c79a3e/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-language/protos/protos.d.ts | 2 +- packages/google-cloud-language/protos/protos.js | 2 +- packages/google-cloud-language/synth.metadata | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index b6e85a6d5a9..b733f78dcaf 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import * as Long from "long"; -import * as $protobuf from "protobufjs"; +import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index dc2dfac8636..0514fb12168 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("protobufjs/minimal")); + module.exports = factory(require("google-gax").protobufMinimal); })(this, function($protobuf) { "use strict"; diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 9fdc8734d05..b577a60e37f 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "5f0ed94b4120ee7acf41338262ac7b3ed729ef0e" + "sha": "5a99f3652b09118392308be8b2282506a76600a3" } }, { From 43f1e9da82ffd72aa97933b9f33963af64bc3439 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 2 Aug 2020 21:54:06 -0700 Subject: [PATCH 380/488] docs: add links to the CHANGELOG from the README.md for Java and Node (#495) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7b446397-88f3-4463-9e7d-d2ce7069989d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5936421202fb53ed4641bcb824017dd393a3dbcc --- packages/google-cloud-language/README.md | 3 +++ packages/google-cloud-language/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 7a16d81bdd4..f20408e9c13 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -16,6 +16,9 @@ language understanding technologies to developers, including sentiment analysis, analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-language/blob/master/CHANGELOG.md). + * [Natural Language Node.js Client API Reference][client-docs] * [Natural Language Documentation][product-docs] * [github.com/googleapis/nodejs-language](https://github.com/googleapis/nodejs-language) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index b577a60e37f..9f267d5e378 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "5a99f3652b09118392308be8b2282506a76600a3" + "sha": "dd869d17f6c29b3767b268f43013feecf6ac20a9" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" + "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" } } ], From 89db5c31a7f8892e8dcda8c64b329a1ed8ac1c5f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 10 Aug 2020 10:56:39 -0700 Subject: [PATCH 381/488] build: --credential-file-override is no longer required (#498) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4de22315-84b1-493d-8da2-dfa7688128f5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/94421c47802f56a44c320257b2b4c190dc7d6b68 --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 9f267d5e378..f1360409c6a 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "dd869d17f6c29b3767b268f43013feecf6ac20a9" + "sha": "3ae56fb4e44c98a07e998db3db5eb50ca7a1bee2" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" + "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" } } ], From fc79b6cda20f86573aacc479900c3e4233a4ba30 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 09:34:19 -0700 Subject: [PATCH 382/488] chore: update cloud rad kokoro build job (#500) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/bd0deaa1113b588d70449535ab9cbf0f2bd0e72f --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index f1360409c6a..c3d2eba2e89 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "3ae56fb4e44c98a07e998db3db5eb50ca7a1bee2" + "sha": "063f4a203937d6196c5d0b11d07bd0038e19889a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" + "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" } } ], From d1ecb2adaff58414e17d578e50c3067054a0d9bf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 12:58:14 -0700 Subject: [PATCH 383/488] build: use gapic-generator-typescript v1.0.7. (#499) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 325949033 Source-Link: https://github.com/googleapis/googleapis/commit/94006b3cb8d2fb44703cf535da15608eed6bf7db --- .../google-cloud-language/src/v1/language_service_client.ts | 5 ++--- .../src/v1beta2/language_service_client.ts | 5 ++--- packages/google-cloud-language/synth.metadata | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 8fc543092e7..b696cc6fb4a 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -214,12 +214,11 @@ export class LanguageServiceClient { } ); + const descriptor = undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + descriptor ); this.innerApiCalls[methodName] = apiCall; diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 6a236f3bf80..45f8ac50e3f 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -214,12 +214,11 @@ export class LanguageServiceClient { } ); + const descriptor = undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + descriptor ); this.innerApiCalls[methodName] = apiCall; diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index c3d2eba2e89..1513109a32e 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "a60b165895ad1f100d7014c74b7df512f9377fdb", - "internalRef": "318104666" + "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", + "internalRef": "325949033" } }, { From 90330632010817533343d3e3149f002cad9358d6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 13 Aug 2020 09:47:27 -0700 Subject: [PATCH 384/488] build: perform publish using Node 12 (#501) Source-Author: Benjamin E. Coe Source-Date: Wed Aug 12 12:12:29 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 5747555f7620113d9a2078a48f4c047a99d31b3e Source-Link: https://github.com/googleapis/synthtool/commit/5747555f7620113d9a2078a48f4c047a99d31b3e --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 1513109a32e..ccf546a3d76 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "063f4a203937d6196c5d0b11d07bd0038e19889a" + "sha": "327302ad4a1adc7cb9c7bf1757a23649e0df746c" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" + "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" } } ], From efe46002a31647f49d80ed4861ba041c10cebb84 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 19 Aug 2020 09:42:56 -0700 Subject: [PATCH 385/488] chore: start tracking obsolete files (#502) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7a1b0b96-8ddb-4836-a1a2-d2f73b7e6ffe/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-language/synth.metadata | 86 ++++++++++++++++++- 1 file changed, 82 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index ccf546a3d76..40e3c20f5ef 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "327302ad4a1adc7cb9c7bf1757a23649e0df746c" + "sha": "d17a94d48a743fde5253b10bf08a09644348a0b0" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", - "internalRef": "325949033" + "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", + "internalRef": "327369997" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" + "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" } } ], @@ -42,5 +42,83 @@ "generator": "bazel" } } + ], + "generatedFiles": [ + ".eslintignore", + ".eslintrc.json", + ".gitattributes", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/publish.yml", + ".github/release-please.yml", + ".github/workflows/ci.yaml", + ".gitignore", + ".jsdoc.js", + ".kokoro/.gitattributes", + ".kokoro/common.cfg", + ".kokoro/continuous/node10/common.cfg", + ".kokoro/continuous/node10/docs.cfg", + ".kokoro/continuous/node10/lint.cfg", + ".kokoro/continuous/node10/samples-test.cfg", + ".kokoro/continuous/node10/system-test.cfg", + ".kokoro/continuous/node10/test.cfg", + ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/test.cfg", + ".kokoro/docs.sh", + ".kokoro/lint.sh", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/node10/common.cfg", + ".kokoro/presubmit/node10/samples-test.cfg", + ".kokoro/presubmit/node10/system-test.cfg", + ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/test.cfg", + ".kokoro/publish.sh", + ".kokoro/release/docs-devsite.cfg", + ".kokoro/release/docs-devsite.sh", + ".kokoro/release/docs.cfg", + ".kokoro/release/docs.sh", + ".kokoro/release/publish.cfg", + ".kokoro/samples-test.sh", + ".kokoro/system-test.sh", + ".kokoro/test.bat", + ".kokoro/test.sh", + ".kokoro/trampoline.sh", + ".mocharc.js", + ".nycrc", + ".prettierignore", + ".prettierrc.js", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "README.md", + "api-extractor.json", + "linkinator.config.json", + "package-lock.json.1938081514", + "protos/google/cloud/language/v1/language_service.proto", + "protos/google/cloud/language/v1beta2/language_service.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "samples/package-lock.json.861222396", + "src/index.ts", + "src/v1/index.ts", + "src/v1/language_service_client.ts", + "src/v1/language_service_client_config.json", + "src/v1/language_service_proto_list.json", + "src/v1beta2/index.ts", + "src/v1beta2/language_service_client.ts", + "src/v1beta2/language_service_client_config.json", + "src/v1beta2/language_service_proto_list.json", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts", + "system-test/install.ts", + "test/gapic_language_service_v1.ts", + "test/gapic_language_service_v1beta2.ts", + "tsconfig.json", + "webpack.config.js" ] } \ No newline at end of file From 25604647ea73a232dc0f5e6de60fa4fce75e53e5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 28 Aug 2020 23:25:55 -0700 Subject: [PATCH 386/488] fix: move system and samples test from Node 10 to Node 12 (#503) Source-Author: sofisl <55454395+sofisl@users.noreply.github.com> Source-Date: Thu Aug 20 18:29:50 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 05de3e1e14a0b07eab8b474e669164dbd31f81fb Source-Link: https://github.com/googleapis/synthtool/commit/05de3e1e14a0b07eab8b474e669164dbd31f81fb --- packages/google-cloud-language/synth.metadata | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 40e3c20f5ef..29108d47718 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "d17a94d48a743fde5253b10bf08a09644348a0b0" + "sha": "e7d5ef4153876399e6b559c62ac2138077097bbb" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" + "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" } } ], @@ -60,19 +60,19 @@ ".kokoro/common.cfg", ".kokoro/continuous/node10/common.cfg", ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/lint.cfg", - ".kokoro/continuous/node10/samples-test.cfg", - ".kokoro/continuous/node10/system-test.cfg", ".kokoro/continuous/node10/test.cfg", ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/lint.cfg", + ".kokoro/continuous/node12/samples-test.cfg", + ".kokoro/continuous/node12/system-test.cfg", ".kokoro/continuous/node12/test.cfg", ".kokoro/docs.sh", ".kokoro/lint.sh", ".kokoro/populate-secrets.sh", ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node10/samples-test.cfg", - ".kokoro/presubmit/node10/system-test.cfg", ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/samples-test.cfg", + ".kokoro/presubmit/node12/system-test.cfg", ".kokoro/presubmit/node12/test.cfg", ".kokoro/publish.sh", ".kokoro/release/docs-devsite.cfg", @@ -95,7 +95,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.1938081514", "protos/google/cloud/language/v1/language_service.proto", "protos/google/cloud/language/v1beta2/language_service.proto", "protos/protos.d.ts", @@ -103,7 +102,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.861222396", "src/index.ts", "src/v1/index.ts", "src/v1/language_service_client.ts", From 5c4a33d5d439d3a35748596dca3f80f3a60b1cfa Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 2 Sep 2020 11:21:50 -0700 Subject: [PATCH 387/488] build: track flaky tests for "nightly", add new secrets for tagging (#506) Source-Author: Benjamin E. Coe Source-Date: Wed Aug 26 14:28:22 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 8cf6d2834ad14318e64429c3b94f6443ae83daf9 Source-Link: https://github.com/googleapis/synthtool/commit/8cf6d2834ad14318e64429c3b94f6443ae83daf9 --- packages/google-cloud-language/synth.metadata | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 29108d47718..69ec283f590 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "e7d5ef4153876399e6b559c62ac2138077097bbb" + "sha": "df948affcc41bc6cf171bda6e3834db32fa22aa3" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" + "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" } } ], @@ -51,7 +51,6 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", - ".github/publish.yml", ".github/release-please.yml", ".github/workflows/ci.yaml", ".gitignore", From b057efb04cc66945e87ef491ee4068a1d5e9316c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Sep 2020 19:04:06 +0200 Subject: [PATCH 388/488] fix(deps): update dependency yargs to v16 (#509) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [yargs](https://yargs.js.org/) ([source](https://togithub.com/yargs/yargs)) | dependencies | major | [`^15.0.0` -> `^16.0.0`](https://renovatebot.com/diffs/npm/yargs/15.4.1/16.0.1) | --- ### Release Notes
yargs/yargs ### [`v16.0.1`](https://togithub.com/yargs/yargs/blob/master/CHANGELOG.md#​1601-httpswwwgithubcomyargsyargscomparev1600v1601-2020-09-09) [Compare Source](https://togithub.com/yargs/yargs/compare/v16.0.0...v16.0.1) ### [`v16.0.0`](https://togithub.com/yargs/yargs/blob/master/CHANGELOG.md#​1600-httpswwwgithubcomyargsyargscomparev1542v1600-2020-09-09) [Compare Source](https://togithub.com/yargs/yargs/compare/v15.4.1...v16.0.0) ##### ⚠ BREAKING CHANGES - tweaks to ESM/Deno API surface: now exports yargs function by default; getProcessArgvWithoutBin becomes hideBin; types now exported for Deno. - find-up replaced with escalade; export map added (limits importable files in Node >= 12); yarser-parser@19.x.x (new decamelize/camelcase implementation). - **usage:** single character aliases are now shown first in help output - rebase helper is no longer provided on yargs instance. - drop support for EOL Node 8 ([#​1686](https://togithub.com/yargs/yargs/issues/1686)) ##### Features - adds strictOptions() ([#​1738](https://www.github.com/yargs/yargs/issues/1738)) ([b215fba](https://www.github.com/yargs/yargs/commit/b215fba0ed6e124e5aad6cf22c8d5875661c63a3)) - **helpers:** rebase, Parser, applyExtends now blessed helpers ([#​1733](https://www.github.com/yargs/yargs/issues/1733)) ([c7debe8](https://www.github.com/yargs/yargs/commit/c7debe8eb1e5bc6ea20b5ed68026c56e5ebec9e1)) - adds support for ESM and Deno ([#​1708](https://www.github.com/yargs/yargs/issues/1708)) ([ac6d5d1](https://www.github.com/yargs/yargs/commit/ac6d5d105a75711fe703f6a39dad5181b383d6c6)) - drop support for EOL Node 8 ([#​1686](https://www.github.com/yargs/yargs/issues/1686)) ([863937f](https://www.github.com/yargs/yargs/commit/863937f23c3102f804cdea78ee3097e28c7c289f)) - i18n for ESM and Deno ([#​1735](https://www.github.com/yargs/yargs/issues/1735)) ([c71783a](https://www.github.com/yargs/yargs/commit/c71783a5a898a0c0e92ac501c939a3ec411ac0c1)) - tweaks to API surface based on user feedback ([#​1726](https://www.github.com/yargs/yargs/issues/1726)) ([4151fee](https://www.github.com/yargs/yargs/commit/4151fee4c33a97d26bc40de7e623e5b0eb87e9bb)) - **usage:** single char aliases first in help ([#​1574](https://www.github.com/yargs/yargs/issues/1574)) ([a552990](https://www.github.com/yargs/yargs/commit/a552990c120646c2d85a5c9b628e1ce92a68e797)) ##### Bug Fixes - **yargs:** add missing command(module) signature ([#​1707](https://www.github.com/yargs/yargs/issues/1707)) ([0f81024](https://www.github.com/yargs/yargs/commit/0f810245494ccf13a35b7786d021b30fc95ecad5)), closes [#​1704](https://www.github.com/yargs/yargs/issues/1704)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index a43faa0087d..d3a6f497129 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -19,7 +19,7 @@ "mathjs": "^7.0.0", "@google-cloud/language": "^4.1.0", "@google-cloud/storage": "^5.0.0", - "yargs": "^15.0.0" + "yargs": "^16.0.0" }, "devDependencies": { "chai": "^4.2.0", From c00189b8fac03d2e39ea21809840f4a732dc6485 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 12 Sep 2020 11:20:18 -0700 Subject: [PATCH 389/488] build(test): recursively find test files; fail on unsupported dependency versions (#510) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/396d1a63-c8ed-42ae-811f-d2b08d6e2089/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/fdd03c161003ab97657cc0218f25c82c89ddf4b6 --- packages/google-cloud-language/.mocharc.js | 3 ++- packages/google-cloud-language/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/.mocharc.js b/packages/google-cloud-language/.mocharc.js index ff7b34fa5d1..0b600509bed 100644 --- a/packages/google-cloud-language/.mocharc.js +++ b/packages/google-cloud-language/.mocharc.js @@ -14,7 +14,8 @@ const config = { "enable-source-maps": true, "throw-deprecation": true, - "timeout": 10000 + "timeout": 10000, + "recursive": true } if (process.env.MOCHA_THROW_DEPRECATION === 'false') { delete config['throw-deprecation']; diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 69ec283f590..8acd98f291a 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "df948affcc41bc6cf171bda6e3834db32fa22aa3" + "sha": "3ab34d3d464b66948c616b1f00dae061a48e57e3" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" + "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" } } ], From dc92c97102555a8515c59009150e0ea950c599d6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2020 15:17:20 -0700 Subject: [PATCH 390/488] chore: release 4.1.1 (#505) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-language/CHANGELOG.md | 8 ++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 736fa6696df..3cc96673249 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.1.1](https://www.github.com/googleapis/nodejs-language/compare/v4.1.0...v4.1.1) (2020-09-12) + + +### Bug Fixes + +* **deps:** update dependency yargs to v16 ([#509](https://www.github.com/googleapis/nodejs-language/issues/509)) ([3ab34d3](https://www.github.com/googleapis/nodejs-language/commit/3ab34d3d464b66948c616b1f00dae061a48e57e3)) +* move system and samples test from Node 10 to Node 12 ([#503](https://www.github.com/googleapis/nodejs-language/issues/503)) ([df948af](https://www.github.com/googleapis/nodejs-language/commit/df948affcc41bc6cf171bda6e3834db32fa22aa3)) + ## [4.1.0](https://www.github.com/googleapis/nodejs-language/compare/v4.0.1...v4.1.0) (2020-06-13) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index ee22c85ee62..4ea00397bcb 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.1.0", + "version": "4.1.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index d3a6f497129..98cbff54b96 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^7.0.0", - "@google-cloud/language": "^4.1.0", + "@google-cloud/language": "^4.1.1", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From ab4d3921143ce9a569719f108b9a5bc70ea891e5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 1 Oct 2020 13:22:11 -0700 Subject: [PATCH 391/488] chore: update bucket for cloud-rad (#511) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/fca23fa0-3627-48c1-abed-db8e850d5a5a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/079dcce498117f9570cebe6e6cff254b38ba3860 --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 8acd98f291a..a1dbbe12b2e 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "3ab34d3d464b66948c616b1f00dae061a48e57e3" + "sha": "9ac2da8aed941d422a7be75c87b233a4dd18e0c5" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" + "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" } } ], From 2c6d141e522ca007ba56bc2fddcd6cb1f371824e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 7 Oct 2020 18:26:35 -0700 Subject: [PATCH 392/488] build(node_library): migrate to Trampoline V2 (#512) Source-Author: Takashi Matsuo Source-Date: Fri Oct 2 12:13:27 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 Source-Link: https://github.com/googleapis/synthtool/commit/0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 --- packages/google-cloud-language/synth.metadata | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index a1dbbe12b2e..3c977bc5c4a 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "9ac2da8aed941d422a7be75c87b233a4dd18e0c5" + "sha": "505fb200a1c406cd611de8e689a90bc96abd970e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" + "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" } } ], @@ -84,10 +84,12 @@ ".kokoro/test.bat", ".kokoro/test.sh", ".kokoro/trampoline.sh", + ".kokoro/trampoline_v2.sh", ".mocharc.js", ".nycrc", ".prettierignore", ".prettierrc.js", + ".trampolinerc", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", From 242c27ddc073a9b34070ac2fe5b7772da06df09d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Oct 2020 21:54:18 +0200 Subject: [PATCH 393/488] chore(deps): update dependency webpack-cli to v4 (#516) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack-cli](https://togithub.com/webpack/webpack-cli) | devDependencies | major | [`^3.3.10` -> `^4.0.0`](https://renovatebot.com/diffs/npm/webpack-cli/3.3.12/4.0.0) | --- ### Release Notes
webpack/webpack-cli ### [`v4.0.0`](https://togithub.com/webpack/webpack-cli/blob/master/CHANGELOG.md#​400-httpsgithubcomwebpackwebpack-clicomparewebpack-cli400-rc1webpack-cli400-2020-10-10) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/v3.3.12...webpack-cli@4.0.0) ##### Bug Fixes - add compilation lifecycle in watch instance ([#​1903](https://togithub.com/webpack/webpack-cli/issues/1903)) ([02b6d21](https://togithub.com/webpack/webpack-cli/commit/02b6d21eaa20166a7ed37816de716b8fc22b756a)) - cleanup `package-utils` package ([#​1822](https://togithub.com/webpack/webpack-cli/issues/1822)) ([fd5b92b](https://togithub.com/webpack/webpack-cli/commit/fd5b92b3cd40361daec5bf4486e455a41f4c9738)) - cli-executer supplies args further up ([#​1904](https://togithub.com/webpack/webpack-cli/issues/1904)) ([097564a](https://togithub.com/webpack/webpack-cli/commit/097564a851b36b63e0a6bf88144997ef65aa057a)) - exit code for validation errors ([59f6303](https://togithub.com/webpack/webpack-cli/commit/59f63037fcbdbb8934b578b9adf5725bc4ae1235)) - exit process in case of schema errors ([71e89b4](https://togithub.com/webpack/webpack-cli/commit/71e89b4092d953ea587cc4f606451ab78cbcdb93)) ##### Features - assign config paths in build dependencies in cache config ([#​1900](https://togithub.com/webpack/webpack-cli/issues/1900)) ([7e90f11](https://togithub.com/webpack/webpack-cli/commit/7e90f110b119f36ef9def4f66cf4e17ccf1438cd))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 4ea00397bcb..324b18f9d09 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -68,7 +68,7 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", - "webpack-cli": "^3.3.10", + "webpack-cli": "^4.0.0", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" } From 82d066045555e08c8979a21e2241fd118494a238 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Oct 2020 23:02:15 +0200 Subject: [PATCH 394/488] chore(deps): update dependency webpack to v5 (#515) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack](https://togithub.com/webpack/webpack) | devDependencies | major | [`^4.41.2` -> `^5.0.0`](https://renovatebot.com/diffs/npm/webpack/4.44.2/5.1.0) | --- ### Release Notes
webpack/webpack ### [`v5.1.0`](https://togithub.com/webpack/webpack/releases/v5.1.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.0.0...v5.1.0) ### Features - expose `webpack` property from `Compiler` - expose `cleverMerge`, `EntryOptionPlugin`, `DynamicEntryPlugin` ### Bugfixes - missing `require("..").xxx` in try-catch produces a warning instead of an error now - handle reexports in concatenated modules correctly when they are side-effect-free - fix incorrect deprecation message for ModuleTemplate.hooks.hash ### [`v5.0.0`](https://togithub.com/webpack/webpack/releases/v5.0.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v4.44.2...v5.0.0) [Announcement and changelog](https://webpack.js.org/blog/2020-10-10-webpack-5-release/)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 324b18f9d09..fc066c2ef7c 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -67,7 +67,7 @@ "sinon": "^9.0.1", "ts-loader": "^8.0.0", "typescript": "^3.8.3", - "webpack": "^4.41.2", + "webpack": "^5.0.0", "webpack-cli": "^4.0.0", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" From 749caeb74aa17f33f789484a2e53edf6db16f2c1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 14 Oct 2020 16:50:06 -0700 Subject: [PATCH 395/488] feat: Fix proto comments for language API inorder for docs parsing to work correctly. (#514) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/ddb5e2f8-cc18-4a70-ac58-0145aa7d8d54/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 335986756 Source-Link: https://github.com/googleapis/googleapis/commit/b58004f465864e30ad015df9ee6b351da189d691 --- .../protos/google/cloud/language/v1/language_service.proto | 2 +- .../google/cloud/language/v1beta2/language_service.proto | 2 +- packages/google-cloud-language/synth.metadata | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index e8e4fd8d005..304eab073a3 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -100,7 +100,7 @@ service LanguageService { } } -// ################################################################ # + // // Represents the input to API methods. message Document { diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto index afca1205cb9..bd4167a301d 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -101,7 +101,7 @@ service LanguageService { } } -// ################################################################ # + // // Represents the input to API methods. message Document { diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 3c977bc5c4a..1bb01432615 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "505fb200a1c406cd611de8e689a90bc96abd970e" + "sha": "1007cafe7140594a1a831f27387b7a83fb96f847" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", - "internalRef": "327369997" + "sha": "b58004f465864e30ad015df9ee6b351da189d691", + "internalRef": "335986756" } }, { From 860807572d7d385d6b7738c02ede9a4089a180d6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 16 Oct 2020 10:08:24 -0700 Subject: [PATCH 396/488] build: only check --engine-strict for production deps (#518) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1c7a19e0-0642-4da9-a86e-676ae8965b89/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5451633881133e5573cc271a18e73b18caca8b1b --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 1bb01432615..bc41e79de4b 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "1007cafe7140594a1a831f27387b7a83fb96f847" + "sha": "eda55b8a371ec0e8b025e6d44a77da4c3d27db22" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" + "sha": "5451633881133e5573cc271a18e73b18caca8b1b" } } ], From 778b03b1f2df54a90f23b073e42137d03ac502f8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 07:48:23 -0700 Subject: [PATCH 397/488] chore: release 4.2.0 (#517) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 3cc96673249..fba7c6ceae7 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [4.2.0](https://www.github.com/googleapis/nodejs-language/compare/v4.1.1...v4.2.0) (2020-10-16) + + +### Features + +* Fix proto comments for language API inorder for docs parsing to work correctly. ([#514](https://www.github.com/googleapis/nodejs-language/issues/514)) ([eda55b8](https://www.github.com/googleapis/nodejs-language/commit/eda55b8a371ec0e8b025e6d44a77da4c3d27db22)) + ### [4.1.1](https://www.github.com/googleapis/nodejs-language/compare/v4.1.0...v4.1.1) (2020-09-12) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index fc066c2ef7c..ea14b0c9b84 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.1.1", + "version": "4.2.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 98cbff54b96..28653921b21 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^7.0.0", - "@google-cloud/language": "^4.1.1", + "@google-cloud/language": "^4.2.0", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 0ae369c680ceab342d7572c9469487cd83977aaa Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 21 Oct 2020 16:14:17 -0700 Subject: [PATCH 398/488] chore: clean up Node.js TOC for cloud-rad (#520) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/bea77be5-6371-49cb-b1fc-88500cc4fade/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/901ddd44e9ef7887ee681b9183bbdea99437fdcc Source-Link: https://github.com/googleapis/synthtool/commit/f96d3b455fe27c3dc7bc37c3c9cd27b1c6d269c8 --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index bc41e79de4b..580c5ec54e3 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "eda55b8a371ec0e8b025e6d44a77da4c3d27db22" + "sha": "c576bb5548a4897aef0ed3bbf0f65a6429ff6c07" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5451633881133e5573cc271a18e73b18caca8b1b" + "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" } } ], From ce2776eb97154774ffec99ae9843f5ddbe6339ae Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Oct 2020 08:38:14 -0700 Subject: [PATCH 399/488] docs: updated code of conduct (includes update to actions) (#524) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/87546435-a6be-41b1-b439-16b7d6c5df65/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89c849ba5013e45e8fb688b138f33c2ec6083dc5 Source-Link: https://github.com/googleapis/synthtool/commit/a783321fd55f010709294455584a553f4b24b944 Source-Link: https://github.com/googleapis/synthtool/commit/b7413d38b763827c72c0360f0a3d286c84656eeb Source-Link: https://github.com/googleapis/synthtool/commit/5f6ef0ec5501d33c4667885b37a7685a30d41a76 --- .../google-cloud-language/CODE_OF_CONDUCT.md | 123 +++++++++++++----- packages/google-cloud-language/synth.metadata | 4 +- 2 files changed, 89 insertions(+), 38 deletions(-) diff --git a/packages/google-cloud-language/CODE_OF_CONDUCT.md b/packages/google-cloud-language/CODE_OF_CONDUCT.md index 46b2a08ea6d..2add2547a81 100644 --- a/packages/google-cloud-language/CODE_OF_CONDUCT.md +++ b/packages/google-cloud-language/CODE_OF_CONDUCT.md @@ -1,43 +1,94 @@ -# Contributor Code of Conduct + +# Code of Conduct -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 580c5ec54e3..37d7c06deb1 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "c576bb5548a4897aef0ed3bbf0f65a6429ff6c07" + "sha": "973b95df4c62a8022afd26e86736a08179ff92a9" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" + "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" } } ], From e4dbdfba8d7ad7f8850708588d2424b9056b7f84 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Nov 2020 15:58:17 -0800 Subject: [PATCH 400/488] build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#525) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/325cd597-d8fe-40d6-aad1-01bd299fa976/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591 --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 37d7c06deb1..d3fd291c834 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "973b95df4c62a8022afd26e86736a08179ff92a9" + "sha": "258382a75f62a409cc599d39df9b0a43349765c1" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" + "sha": "ba9918cd22874245b55734f57470c719b577e591" } } ], From d6dac68f0dafc86a133976affae97777e4b40a44 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 6 Nov 2020 15:42:08 -0800 Subject: [PATCH 401/488] fix: do not modify options object, use defaultScopes (#528) Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1. --- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/src/index.ts | 1 + .../src/v1/language_service_client.ts | 102 +++++++++++------- .../src/v1beta2/language_service_client.ts | 102 +++++++++++------- packages/google-cloud-language/synth.metadata | 16 +-- .../system-test/fixtures/sample/src/index.ts | 9 +- .../system-test/install.ts | 18 ++-- 7 files changed, 152 insertions(+), 98 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index ea14b0c9b84..86925d80f0c 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -48,7 +48,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "google-gax": "^2.1.0" + "google-gax": "^2.9.2" }, "devDependencies": { "@types/mocha": "^8.0.0", diff --git a/packages/google-cloud-language/src/index.ts b/packages/google-cloud-language/src/index.ts index eedcf282434..2c3a55d420a 100644 --- a/packages/google-cloud-language/src/index.ts +++ b/packages/google-cloud-language/src/index.ts @@ -20,6 +20,7 @@ import * as v1 from './v1'; import * as v1beta2 from './v1beta2'; const LanguageServiceClient = v1.LanguageServiceClient; +type LanguageServiceClient = v1.LanguageServiceClient; export {v1, v1beta2, LanguageServiceClient}; export default {v1, v1beta2, LanguageServiceClient}; diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index b696cc6fb4a..432971b7ff2 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -51,8 +51,10 @@ export class LanguageServiceClient { /** * Construct an instance of LanguageServiceClient. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] @@ -72,42 +74,33 @@ export class LanguageServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. + * TODO(@alexander-fenster): link to gax documentation. + * @param {boolean} fallback - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. */ - constructor(opts?: ClientOptions) { - // Ensure that options include the service address and port. + // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof LanguageServiceClient; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? typeof window !== 'undefined'; + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - if (!opts) { - opts = {servicePath, port}; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - - // users can override the config from client side, like retry codes name. - // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 - // The way to override client config for Showcase API: - // - // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} - // const showcaseClient = new showcaseClient({ projectId, customConfig }); - opts.clientConfig = opts.clientConfig || {}; - // If we're running in browser, it's OK to omit `fallback` since - // google-gax has `browser` field in its `package.json`. - // For Electron (which does not respect `browser` field), - // pass `{fallback: true}` to the LanguageServiceClient constructor. + // Choose either gRPC or proto-over-HTTP implementation of google-gax. this._gaxModule = opts.fallback ? gax.fallback : gax; - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = (this.constructor as typeof LanguageServiceClient).scopes; + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); // Save options to use in initialize() method. @@ -116,6 +109,11 @@ export class LanguageServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { @@ -229,6 +227,7 @@ export class LanguageServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'language.googleapis.com'; @@ -237,6 +236,7 @@ export class LanguageServiceClient { /** * The DNS address for this API service - same as servicePath(), * exists for compatibility reasons. + * @returns {string} The DNS address for this service. */ static get apiEndpoint() { return 'language.googleapis.com'; @@ -244,6 +244,7 @@ export class LanguageServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -252,6 +253,7 @@ export class LanguageServiceClient { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -264,8 +266,7 @@ export class LanguageServiceClient { getProjectId(callback: Callback): void; /** * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. + * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback @@ -324,7 +325,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.analyzeSentiment(request); */ analyzeSentiment( request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, @@ -409,7 +414,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.analyzeEntities(request); */ analyzeEntities( request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, @@ -496,7 +505,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.analyzeEntitySentiment(request); */ analyzeEntitySentiment( request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, @@ -584,7 +597,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.analyzeSyntax(request); */ analyzeSyntax( request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, @@ -659,7 +676,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.classifyText(request); */ classifyText( request: protos.google.cloud.language.v1.IClassifyTextRequest, @@ -739,7 +760,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.annotateText(request); */ annotateText( request: protos.google.cloud.language.v1.IAnnotateTextRequest, @@ -778,9 +803,10 @@ export class LanguageServiceClient { } /** - * Terminate the GRPC channel and close the client. + * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { this.initialize(); diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 45f8ac50e3f..8c4e71a2abe 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -51,8 +51,10 @@ export class LanguageServiceClient { /** * Construct an instance of LanguageServiceClient. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] @@ -72,42 +74,33 @@ export class LanguageServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. + * TODO(@alexander-fenster): link to gax documentation. + * @param {boolean} fallback - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. */ - constructor(opts?: ClientOptions) { - // Ensure that options include the service address and port. + // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof LanguageServiceClient; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? typeof window !== 'undefined'; + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - if (!opts) { - opts = {servicePath, port}; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - - // users can override the config from client side, like retry codes name. - // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 - // The way to override client config for Showcase API: - // - // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} - // const showcaseClient = new showcaseClient({ projectId, customConfig }); - opts.clientConfig = opts.clientConfig || {}; - // If we're running in browser, it's OK to omit `fallback` since - // google-gax has `browser` field in its `package.json`. - // For Electron (which does not respect `browser` field), - // pass `{fallback: true}` to the LanguageServiceClient constructor. + // Choose either gRPC or proto-over-HTTP implementation of google-gax. this._gaxModule = opts.fallback ? gax.fallback : gax; - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = (this.constructor as typeof LanguageServiceClient).scopes; + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); // Save options to use in initialize() method. @@ -116,6 +109,11 @@ export class LanguageServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { @@ -229,6 +227,7 @@ export class LanguageServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'language.googleapis.com'; @@ -237,6 +236,7 @@ export class LanguageServiceClient { /** * The DNS address for this API service - same as servicePath(), * exists for compatibility reasons. + * @returns {string} The DNS address for this service. */ static get apiEndpoint() { return 'language.googleapis.com'; @@ -244,6 +244,7 @@ export class LanguageServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -252,6 +253,7 @@ export class LanguageServiceClient { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -264,8 +266,7 @@ export class LanguageServiceClient { getProjectId(callback: Callback): void; /** * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. + * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback @@ -325,7 +326,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.analyzeSentiment(request); */ analyzeSentiment( request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, @@ -410,7 +415,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.analyzeEntities(request); */ analyzeEntities( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, @@ -497,7 +506,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.analyzeEntitySentiment(request); */ analyzeEntitySentiment( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, @@ -589,7 +602,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.analyzeSyntax(request); */ analyzeSyntax( request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, @@ -670,7 +687,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.classifyText(request); */ classifyText( request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, @@ -756,7 +777,11 @@ export class LanguageServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.annotateText(request); */ annotateText( request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, @@ -797,9 +822,10 @@ export class LanguageServiceClient { } /** - * Terminate the GRPC channel and close the client. + * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { this.initialize(); diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index d3fd291c834..dc6563380df 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "258382a75f62a409cc599d39df9b0a43349765c1" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b58004f465864e30ad015df9ee6b351da189d691", - "internalRef": "335986756" + "remote": "git@github.com:googleapis/nodejs-language.git", + "sha": "12e5c9964dea31c7a7ceb923f82b7ed88cf87c44" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ba9918cd22874245b55734f57470c719b577e591" + "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" } } ], @@ -96,6 +88,7 @@ "README.md", "api-extractor.json", "linkinator.config.json", + "package-lock.json.1283994733", "protos/google/cloud/language/v1/language_service.proto", "protos/google/cloud/language/v1beta2/language_service.proto", "protos/protos.d.ts", @@ -103,6 +96,7 @@ "protos/protos.json", "renovate.json", "samples/README.md", + "samples/package-lock.json.1177269251", "src/index.ts", "src/v1/index.ts", "src/v1/language_service_client.ts", diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts index 7f46f0abbfb..77d178376c4 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts @@ -18,8 +18,15 @@ import {LanguageServiceClient} from '@google-cloud/language'; +// check that the client class type name can be used +function doStuffWithLanguageServiceClient(client: LanguageServiceClient) { + client.close(); +} + function main() { - new LanguageServiceClient(); + // check that the client instance can be created + const languageServiceClient = new LanguageServiceClient(); + doStuffWithLanguageServiceClient(languageServiceClient); } main(); diff --git a/packages/google-cloud-language/system-test/install.ts b/packages/google-cloud-language/system-test/install.ts index 4c1ba3eb79a..39d90f771de 100644 --- a/packages/google-cloud-language/system-test/install.ts +++ b/packages/google-cloud-language/system-test/install.ts @@ -20,32 +20,32 @@ import {packNTest} from 'pack-n-play'; import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; -describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function () { +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'TypeScript user can use the type definitions', ts: readFileSync( './system-test/fixtures/sample/src/index.ts' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); - it('should have correct type signature for javascript users', async function () { + it('JavaScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'JavaScript user can use the library', ts: readFileSync( './system-test/fixtures/sample/src/index.js' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); }); From 46027682ff0b5b9a1c41465f65d4d4b0362faad8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 7 Nov 2020 02:01:28 +0100 Subject: [PATCH 402/488] docs(deps): update dependency mathjs to v8 (#526) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 28653921b21..20acfc2b83e 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/automl": "^2.0.0", - "mathjs": "^7.0.0", + "mathjs": "^8.0.0", "@google-cloud/language": "^4.2.0", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" From 2a0eec14870ad8ffcd248445fb42cd4f3a4b9d64 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2020 09:19:19 -0800 Subject: [PATCH 403/488] chore: release 4.2.1 (#529) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index fba7c6ceae7..659b3a54722 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.2.1](https://www.github.com/googleapis/nodejs-language/compare/v4.2.0...v4.2.1) (2020-11-07) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#528](https://www.github.com/googleapis/nodejs-language/issues/528)) ([f689a4e](https://www.github.com/googleapis/nodejs-language/commit/f689a4e03818471731509f12c9049b7cc6c849cd)) + ## [4.2.0](https://www.github.com/googleapis/nodejs-language/compare/v4.1.1...v4.2.0) (2020-10-16) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 86925d80f0c..feefa4dfba6 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.0", + "version": "4.2.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 20acfc2b83e..02c91cf9dd5 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^8.0.0", - "@google-cloud/language": "^4.2.0", + "@google-cloud/language": "^4.2.1", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 87ae0461cf677f531a316dae46ed215588de4197 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 19 Nov 2020 11:13:28 -0800 Subject: [PATCH 404/488] build: adds gapic_metadata.json; bug fix to generator --- .../google-cloud-language/protos/protos.json | 186 ++++++++++++++++-- .../src/v1/gapic_metadata.json | 57 ++++++ .../src/v1/language_service_client.ts | 76 +++---- .../src/v1beta2/gapic_metadata.json | 57 ++++++ .../src/v1beta2/language_service_client.ts | 76 +++---- packages/google-cloud-language/synth.metadata | 16 +- 6 files changed, 384 insertions(+), 84 deletions(-) create mode 100644 packages/google-cloud-language/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-language/src/v1beta2/gapic_metadata.json diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index b07582f4343..e3251ebf0a9 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -27,7 +27,21 @@ "(google.api.http).post": "/v1/documents:analyzeSentiment", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/documents:analyzeSentiment", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,encoding_type" + }, + { + "(google.api.method_signature)": "document" + } + ] }, "AnalyzeEntities": { "requestType": "AnalyzeEntitiesRequest", @@ -36,7 +50,21 @@ "(google.api.http).post": "/v1/documents:analyzeEntities", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/documents:analyzeEntities", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,encoding_type" + }, + { + "(google.api.method_signature)": "document" + } + ] }, "AnalyzeEntitySentiment": { "requestType": "AnalyzeEntitySentimentRequest", @@ -45,7 +73,21 @@ "(google.api.http).post": "/v1/documents:analyzeEntitySentiment", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/documents:analyzeEntitySentiment", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,encoding_type" + }, + { + "(google.api.method_signature)": "document" + } + ] }, "AnalyzeSyntax": { "requestType": "AnalyzeSyntaxRequest", @@ -54,7 +96,21 @@ "(google.api.http).post": "/v1/documents:analyzeSyntax", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/documents:analyzeSyntax", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,encoding_type" + }, + { + "(google.api.method_signature)": "document" + } + ] }, "ClassifyText": { "requestType": "ClassifyTextRequest", @@ -63,7 +119,18 @@ "(google.api.http).post": "/v1/documents:classifyText", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/documents:classifyText", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document" + } + ] }, "AnnotateText": { "requestType": "AnnotateTextRequest", @@ -72,7 +139,21 @@ "(google.api.http).post": "/v1/documents:annotateText", "(google.api.http).body": "*", "(google.api.method_signature)": "document,features" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/documents:annotateText", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,features,encoding_type" + }, + { + "(google.api.method_signature)": "document,features" + } + ] } } }, @@ -792,7 +873,21 @@ "(google.api.http).post": "/v1beta2/documents:analyzeSentiment", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/documents:analyzeSentiment", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,encoding_type" + }, + { + "(google.api.method_signature)": "document" + } + ] }, "AnalyzeEntities": { "requestType": "AnalyzeEntitiesRequest", @@ -801,7 +896,21 @@ "(google.api.http).post": "/v1beta2/documents:analyzeEntities", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/documents:analyzeEntities", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,encoding_type" + }, + { + "(google.api.method_signature)": "document" + } + ] }, "AnalyzeEntitySentiment": { "requestType": "AnalyzeEntitySentimentRequest", @@ -810,7 +919,21 @@ "(google.api.http).post": "/v1beta2/documents:analyzeEntitySentiment", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/documents:analyzeEntitySentiment", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,encoding_type" + }, + { + "(google.api.method_signature)": "document" + } + ] }, "AnalyzeSyntax": { "requestType": "AnalyzeSyntaxRequest", @@ -819,7 +942,21 @@ "(google.api.http).post": "/v1beta2/documents:analyzeSyntax", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/documents:analyzeSyntax", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,encoding_type" + }, + { + "(google.api.method_signature)": "document" + } + ] }, "ClassifyText": { "requestType": "ClassifyTextRequest", @@ -828,7 +965,18 @@ "(google.api.http).post": "/v1beta2/documents:classifyText", "(google.api.http).body": "*", "(google.api.method_signature)": "document" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/documents:classifyText", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document" + } + ] }, "AnnotateText": { "requestType": "AnnotateTextRequest", @@ -837,7 +985,21 @@ "(google.api.http).post": "/v1beta2/documents:annotateText", "(google.api.http).body": "*", "(google.api.method_signature)": "document,features" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/documents:annotateText", + "body": "*" + } + }, + { + "(google.api.method_signature)": "document,features,encoding_type" + }, + { + "(google.api.method_signature)": "document,features" + } + ] } } }, diff --git a/packages/google-cloud-language/src/v1/gapic_metadata.json b/packages/google-cloud-language/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..441ddcf6f72 --- /dev/null +++ b/packages/google-cloud-language/src/v1/gapic_metadata.json @@ -0,0 +1,57 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.language.v1", + "libraryPackage": "@google-cloud/language", + "services": { + "LanguageService": { + "grpc": { + "libraryClient": "LanguageServiceClient", + "rpcs": { + "AnalyzeSentiment": [ + "analyzeSentiment" + ], + "AnalyzeEntities": [ + "analyzeEntities" + ], + "AnalyzeEntitySentiment": [ + "analyzeEntitySentiment" + ], + "AnalyzeSyntax": [ + "analyzeSyntax" + ], + "ClassifyText": [ + "classifyText" + ], + "AnnotateText": [ + "annotateText" + ] + } + }, + "grpc-fallback": { + "libraryClient": "LanguageServiceClient", + "rpcs": { + "AnalyzeSentiment": [ + "analyzeSentiment" + ], + "AnalyzeEntities": [ + "analyzeEntities" + ], + "AnalyzeEntitySentiment": [ + "analyzeEntitySentiment" + ], + "AnalyzeSyntax": [ + "analyzeSyntax" + ], + "ClassifyText": [ + "classifyText" + ], + "AnnotateText": [ + "annotateText" + ] + } + } + } + } +} diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 432971b7ff2..87c483558eb 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -16,11 +16,17 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/language_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './language_service_client_config.json'; const version = require('../../../package.json').version; @@ -74,9 +80,9 @@ export class LanguageServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -89,7 +95,9 @@ export class LanguageServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -283,7 +291,7 @@ export class LanguageServiceClient { // ------------------- analyzeSentiment( request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnalyzeSentimentResponse, @@ -293,7 +301,7 @@ export class LanguageServiceClient { >; analyzeSentiment( request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnalyzeSentimentResponse, | protos.google.cloud.language.v1.IAnalyzeSentimentRequest @@ -334,7 +342,7 @@ export class LanguageServiceClient { analyzeSentiment( request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1.IAnalyzeSentimentResponse, | protos.google.cloud.language.v1.IAnalyzeSentimentRequest @@ -357,12 +365,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -370,7 +378,7 @@ export class LanguageServiceClient { } analyzeEntities( request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, @@ -380,7 +388,7 @@ export class LanguageServiceClient { >; analyzeEntities( request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest @@ -423,7 +431,7 @@ export class LanguageServiceClient { analyzeEntities( request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, | protos.google.cloud.language.v1.IAnalyzeEntitiesRequest @@ -446,12 +454,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -459,7 +467,7 @@ export class LanguageServiceClient { } analyzeEntitySentiment( request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, @@ -472,7 +480,7 @@ export class LanguageServiceClient { >; analyzeEntitySentiment( request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest @@ -514,7 +522,7 @@ export class LanguageServiceClient { analyzeEntitySentiment( request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest @@ -540,12 +548,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -557,7 +565,7 @@ export class LanguageServiceClient { } analyzeSyntax( request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, @@ -567,7 +575,7 @@ export class LanguageServiceClient { >; analyzeSyntax( request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | null | undefined, @@ -606,7 +614,7 @@ export class LanguageServiceClient { analyzeSyntax( request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, | protos.google.cloud.language.v1.IAnalyzeSyntaxRequest @@ -627,12 +635,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -640,7 +648,7 @@ export class LanguageServiceClient { } classifyText( request: protos.google.cloud.language.v1.IClassifyTextRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IClassifyTextResponse, @@ -650,7 +658,7 @@ export class LanguageServiceClient { >; classifyText( request: protos.google.cloud.language.v1.IClassifyTextRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IClassifyTextResponse, protos.google.cloud.language.v1.IClassifyTextRequest | null | undefined, @@ -685,7 +693,7 @@ export class LanguageServiceClient { classifyText( request: protos.google.cloud.language.v1.IClassifyTextRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1.IClassifyTextResponse, | protos.google.cloud.language.v1.IClassifyTextRequest @@ -706,12 +714,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -719,7 +727,7 @@ export class LanguageServiceClient { } annotateText( request: protos.google.cloud.language.v1.IAnnotateTextRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnnotateTextResponse, @@ -729,7 +737,7 @@ export class LanguageServiceClient { >; annotateText( request: protos.google.cloud.language.v1.IAnnotateTextRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnnotateTextResponse, protos.google.cloud.language.v1.IAnnotateTextRequest | null | undefined, @@ -769,7 +777,7 @@ export class LanguageServiceClient { annotateText( request: protos.google.cloud.language.v1.IAnnotateTextRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1.IAnnotateTextResponse, | protos.google.cloud.language.v1.IAnnotateTextRequest @@ -790,12 +798,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); diff --git a/packages/google-cloud-language/src/v1beta2/gapic_metadata.json b/packages/google-cloud-language/src/v1beta2/gapic_metadata.json new file mode 100644 index 00000000000..135a42a453a --- /dev/null +++ b/packages/google-cloud-language/src/v1beta2/gapic_metadata.json @@ -0,0 +1,57 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.language.v1beta2", + "libraryPackage": "@google-cloud/language", + "services": { + "LanguageService": { + "grpc": { + "libraryClient": "LanguageServiceClient", + "rpcs": { + "AnalyzeSentiment": [ + "analyzeSentiment" + ], + "AnalyzeEntities": [ + "analyzeEntities" + ], + "AnalyzeEntitySentiment": [ + "analyzeEntitySentiment" + ], + "AnalyzeSyntax": [ + "analyzeSyntax" + ], + "ClassifyText": [ + "classifyText" + ], + "AnnotateText": [ + "annotateText" + ] + } + }, + "grpc-fallback": { + "libraryClient": "LanguageServiceClient", + "rpcs": { + "AnalyzeSentiment": [ + "analyzeSentiment" + ], + "AnalyzeEntities": [ + "analyzeEntities" + ], + "AnalyzeEntitySentiment": [ + "analyzeEntitySentiment" + ], + "AnalyzeSyntax": [ + "analyzeSyntax" + ], + "ClassifyText": [ + "classifyText" + ], + "AnnotateText": [ + "annotateText" + ] + } + } + } + } +} diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 8c4e71a2abe..52b2d9d0caf 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -16,11 +16,17 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta2/language_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './language_service_client_config.json'; const version = require('../../../package.json').version; @@ -74,9 +80,9 @@ export class LanguageServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -89,7 +95,9 @@ export class LanguageServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -283,7 +291,7 @@ export class LanguageServiceClient { // ------------------- analyzeSentiment( request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, @@ -293,7 +301,7 @@ export class LanguageServiceClient { >; analyzeSentiment( request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest @@ -335,7 +343,7 @@ export class LanguageServiceClient { analyzeSentiment( request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest @@ -358,12 +366,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -371,7 +379,7 @@ export class LanguageServiceClient { } analyzeEntities( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, @@ -381,7 +389,7 @@ export class LanguageServiceClient { >; analyzeEntities( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest @@ -424,7 +432,7 @@ export class LanguageServiceClient { analyzeEntities( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest @@ -447,12 +455,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -460,7 +468,7 @@ export class LanguageServiceClient { } analyzeEntitySentiment( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, @@ -473,7 +481,7 @@ export class LanguageServiceClient { >; analyzeEntitySentiment( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest @@ -515,7 +523,7 @@ export class LanguageServiceClient { analyzeEntitySentiment( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest @@ -541,12 +549,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -558,7 +566,7 @@ export class LanguageServiceClient { } analyzeSyntax( request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, @@ -568,7 +576,7 @@ export class LanguageServiceClient { >; analyzeSyntax( request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest @@ -611,7 +619,7 @@ export class LanguageServiceClient { analyzeSyntax( request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest @@ -634,12 +642,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -647,7 +655,7 @@ export class LanguageServiceClient { } classifyText( request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IClassifyTextResponse, @@ -657,7 +665,7 @@ export class LanguageServiceClient { >; classifyText( request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IClassifyTextResponse, | protos.google.cloud.language.v1beta2.IClassifyTextRequest @@ -696,7 +704,7 @@ export class LanguageServiceClient { classifyText( request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1beta2.IClassifyTextResponse, | protos.google.cloud.language.v1beta2.IClassifyTextRequest @@ -719,12 +727,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -732,7 +740,7 @@ export class LanguageServiceClient { } annotateText( request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnnotateTextResponse, @@ -742,7 +750,7 @@ export class LanguageServiceClient { >; annotateText( request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnnotateTextResponse, | protos.google.cloud.language.v1beta2.IAnnotateTextRequest @@ -786,7 +794,7 @@ export class LanguageServiceClient { annotateText( request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.language.v1beta2.IAnnotateTextResponse, | protos.google.cloud.language.v1beta2.IAnnotateTextRequest @@ -809,12 +817,12 @@ export class LanguageServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index dc6563380df..67ae97e6886 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -3,8 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-language.git", - "sha": "12e5c9964dea31c7a7ceb923f82b7ed88cf87c44" + "remote": "https://github.com/googleapis/nodejs-language.git", + "sha": "96cfd2cb7bceda8bc3df2b0a1064911e2e17fb5f" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", + "internalRef": "343202295" } }, { @@ -88,7 +96,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.1283994733", "protos/google/cloud/language/v1/language_service.proto", "protos/google/cloud/language/v1beta2/language_service.proto", "protos/protos.d.ts", @@ -96,12 +103,13 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.1177269251", "src/index.ts", + "src/v1/gapic_metadata.json", "src/v1/index.ts", "src/v1/language_service_client.ts", "src/v1/language_service_client_config.json", "src/v1/language_service_proto_list.json", + "src/v1beta2/gapic_metadata.json", "src/v1beta2/index.ts", "src/v1beta2/language_service_client.ts", "src/v1beta2/language_service_client_config.json", From b72a5df7b68ef8390d178a79e2cad321b2478748 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 08:34:13 -0800 Subject: [PATCH 405/488] docs: spelling correction for "targetting" (#532) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4ae6b577-4a5f-4ba7-885b-7384aaed05b5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/15013eff642a7e7e855aed5a29e6e83c39beba2a --- packages/google-cloud-language/README.md | 2 +- packages/google-cloud-language/synth.metadata | 83 +------------------ 2 files changed, 3 insertions(+), 82 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index f20408e9c13..2a12b2abfb4 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -110,7 +110,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 67ae97e6886..f772b35debf 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "96cfd2cb7bceda8bc3df2b0a1064911e2e17fb5f" + "sha": "8df39fe2346420fee3bf3a40dcf6a97a1289db45" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], @@ -42,84 +42,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/lint.cfg", - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/continuous/node12/system-test.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", - ".kokoro/presubmit/node12/system-test.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "protos/google/cloud/language/v1/language_service.proto", - "protos/google/cloud/language/v1beta2/language_service.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/index.ts", - "src/v1/gapic_metadata.json", - "src/v1/index.ts", - "src/v1/language_service_client.ts", - "src/v1/language_service_client_config.json", - "src/v1/language_service_proto_list.json", - "src/v1beta2/gapic_metadata.json", - "src/v1beta2/index.ts", - "src/v1beta2/language_service_client.ts", - "src/v1beta2/language_service_client_config.json", - "src/v1beta2/language_service_proto_list.json", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_language_service_v1.ts", - "test/gapic_language_service_v1beta2.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file From 0e2358921c981fef9145455fc31be02f83af8db7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 3 Dec 2020 10:30:15 -0800 Subject: [PATCH 406/488] chore: proper format of gapic_metadata.json (#533) Updated gapic-generator-typescript to v1.2.7. Committer: @alexander-fenster PiperOrigin-RevId: 345358447 Source-Author: Google APIs Source-Date: Wed Dec 2 18:54:44 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 539f0d44c80ef331ae1a50d92d61b91e77d500dd Source-Link: https://github.com/googleapis/googleapis/commit/539f0d44c80ef331ae1a50d92d61b91e77d500dd --- .../src/v1/gapic_metadata.json | 114 +++++++++++------- .../src/v1beta2/gapic_metadata.json | 114 +++++++++++------- packages/google-cloud-language/synth.metadata | 6 +- 3 files changed, 143 insertions(+), 91 deletions(-) diff --git a/packages/google-cloud-language/src/v1/gapic_metadata.json b/packages/google-cloud-language/src/v1/gapic_metadata.json index 441ddcf6f72..fc97e120f5a 100644 --- a/packages/google-cloud-language/src/v1/gapic_metadata.json +++ b/packages/google-cloud-language/src/v1/gapic_metadata.json @@ -6,50 +6,76 @@ "libraryPackage": "@google-cloud/language", "services": { "LanguageService": { - "grpc": { - "libraryClient": "LanguageServiceClient", - "rpcs": { - "AnalyzeSentiment": [ - "analyzeSentiment" - ], - "AnalyzeEntities": [ - "analyzeEntities" - ], - "AnalyzeEntitySentiment": [ - "analyzeEntitySentiment" - ], - "AnalyzeSyntax": [ - "analyzeSyntax" - ], - "ClassifyText": [ - "classifyText" - ], - "AnnotateText": [ - "annotateText" - ] - } - }, - "grpc-fallback": { - "libraryClient": "LanguageServiceClient", - "rpcs": { - "AnalyzeSentiment": [ - "analyzeSentiment" - ], - "AnalyzeEntities": [ - "analyzeEntities" - ], - "AnalyzeEntitySentiment": [ - "analyzeEntitySentiment" - ], - "AnalyzeSyntax": [ - "analyzeSyntax" - ], - "ClassifyText": [ - "classifyText" - ], - "AnnotateText": [ - "annotateText" - ] + "clients": { + "grpc": { + "libraryClient": "LanguageServiceClient", + "rpcs": { + "AnalyzeSentiment": { + "methods": [ + "analyzeSentiment" + ] + }, + "AnalyzeEntities": { + "methods": [ + "analyzeEntities" + ] + }, + "AnalyzeEntitySentiment": { + "methods": [ + "analyzeEntitySentiment" + ] + }, + "AnalyzeSyntax": { + "methods": [ + "analyzeSyntax" + ] + }, + "ClassifyText": { + "methods": [ + "classifyText" + ] + }, + "AnnotateText": { + "methods": [ + "annotateText" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "LanguageServiceClient", + "rpcs": { + "AnalyzeSentiment": { + "methods": [ + "analyzeSentiment" + ] + }, + "AnalyzeEntities": { + "methods": [ + "analyzeEntities" + ] + }, + "AnalyzeEntitySentiment": { + "methods": [ + "analyzeEntitySentiment" + ] + }, + "AnalyzeSyntax": { + "methods": [ + "analyzeSyntax" + ] + }, + "ClassifyText": { + "methods": [ + "classifyText" + ] + }, + "AnnotateText": { + "methods": [ + "annotateText" + ] + } + } } } } diff --git a/packages/google-cloud-language/src/v1beta2/gapic_metadata.json b/packages/google-cloud-language/src/v1beta2/gapic_metadata.json index 135a42a453a..cc37c24c2d1 100644 --- a/packages/google-cloud-language/src/v1beta2/gapic_metadata.json +++ b/packages/google-cloud-language/src/v1beta2/gapic_metadata.json @@ -6,50 +6,76 @@ "libraryPackage": "@google-cloud/language", "services": { "LanguageService": { - "grpc": { - "libraryClient": "LanguageServiceClient", - "rpcs": { - "AnalyzeSentiment": [ - "analyzeSentiment" - ], - "AnalyzeEntities": [ - "analyzeEntities" - ], - "AnalyzeEntitySentiment": [ - "analyzeEntitySentiment" - ], - "AnalyzeSyntax": [ - "analyzeSyntax" - ], - "ClassifyText": [ - "classifyText" - ], - "AnnotateText": [ - "annotateText" - ] - } - }, - "grpc-fallback": { - "libraryClient": "LanguageServiceClient", - "rpcs": { - "AnalyzeSentiment": [ - "analyzeSentiment" - ], - "AnalyzeEntities": [ - "analyzeEntities" - ], - "AnalyzeEntitySentiment": [ - "analyzeEntitySentiment" - ], - "AnalyzeSyntax": [ - "analyzeSyntax" - ], - "ClassifyText": [ - "classifyText" - ], - "AnnotateText": [ - "annotateText" - ] + "clients": { + "grpc": { + "libraryClient": "LanguageServiceClient", + "rpcs": { + "AnalyzeSentiment": { + "methods": [ + "analyzeSentiment" + ] + }, + "AnalyzeEntities": { + "methods": [ + "analyzeEntities" + ] + }, + "AnalyzeEntitySentiment": { + "methods": [ + "analyzeEntitySentiment" + ] + }, + "AnalyzeSyntax": { + "methods": [ + "analyzeSyntax" + ] + }, + "ClassifyText": { + "methods": [ + "classifyText" + ] + }, + "AnnotateText": { + "methods": [ + "annotateText" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "LanguageServiceClient", + "rpcs": { + "AnalyzeSentiment": { + "methods": [ + "analyzeSentiment" + ] + }, + "AnalyzeEntities": { + "methods": [ + "analyzeEntities" + ] + }, + "AnalyzeEntitySentiment": { + "methods": [ + "analyzeEntitySentiment" + ] + }, + "AnalyzeSyntax": { + "methods": [ + "analyzeSyntax" + ] + }, + "ClassifyText": { + "methods": [ + "classifyText" + ] + }, + "AnnotateText": { + "methods": [ + "annotateText" + ] + } + } } } } diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index f772b35debf..2a173239fc5 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "8df39fe2346420fee3bf3a40dcf6a97a1289db45" + "sha": "87c644d5b22b37945e5b456b073770133684ed0d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", - "internalRef": "343202295" + "sha": "539f0d44c80ef331ae1a50d92d61b91e77d500dd", + "internalRef": "345358447" } }, { From 5a70ca66a72d83193d86c8240e7f3b17b72e4b48 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 11:42:28 -0800 Subject: [PATCH 407/488] docs: add instructions for authenticating for system tests (#534) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/910b6b4c-44a8-42e1-939c-9018f9008df4/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- packages/google-cloud-language/CONTRIBUTING.md | 15 +++++++++++++-- packages/google-cloud-language/README.md | 3 +-- packages/google-cloud-language/synth.metadata | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-language/CONTRIBUTING.md b/packages/google-cloud-language/CONTRIBUTING.md index f6c4cf010e3..9bfc7279b48 100644 --- a/packages/google-cloud-language/CONTRIBUTING.md +++ b/packages/google-cloud-language/CONTRIBUTING.md @@ -37,6 +37,15 @@ accept your pull requests. 1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Natural Language API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + ## Running the tests 1. [Prepare your environment for Node.js setup][setup]. @@ -51,11 +60,9 @@ accept your pull requests. npm test # Run sample integration tests. - gcloud auth application-default login npm run samples-test # Run all system tests. - gcloud auth application-default login npm run system-test 1. Lint (and maybe fix) any changes: @@ -63,3 +70,7 @@ accept your pull requests. npm run fix [setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=language.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 2a12b2abfb4..faab4a572f1 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -90,8 +90,7 @@ async function quickstart() { ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 2a173239fc5..4e4f5c1dc1e 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "87c644d5b22b37945e5b456b073770133684ed0d" + "sha": "f30573f6c99f3450735a46c31aa2636dd83f0512" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From 49810304600a06a673bebfec2b6e62c38cf59c8f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 1 Jan 2021 19:39:20 -0800 Subject: [PATCH 408/488] chore: update license headers (#535) --- packages/google-cloud-language/.jsdoc.js | 4 ++-- packages/google-cloud-language/protos/protos.d.ts | 2 +- packages/google-cloud-language/protos/protos.js | 2 +- packages/google-cloud-language/src/v1/index.ts | 2 +- .../google-cloud-language/src/v1/language_service_client.ts | 2 +- packages/google-cloud-language/src/v1beta2/index.ts | 2 +- .../src/v1beta2/language_service_client.ts | 2 +- packages/google-cloud-language/synth.metadata | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-language/system-test/install.ts | 2 +- .../google-cloud-language/test/gapic_language_service_v1.ts | 2 +- .../test/gapic_language_service_v1beta2.ts | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index 413c188891d..1bf22dc4420 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2020 Google LLC', + copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/language', diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index b733f78dcaf..8d1c1ad3262 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 0514fb12168..33b2ca3d11a 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1/index.ts b/packages/google-cloud-language/src/v1/index.ts index d07c325e894..6880d48ddc6 100644 --- a/packages/google-cloud-language/src/v1/index.ts +++ b/packages/google-cloud-language/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 87c483558eb..6c75c1de34a 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1beta2/index.ts b/packages/google-cloud-language/src/v1beta2/index.ts index d07c325e894..6880d48ddc6 100644 --- a/packages/google-cloud-language/src/v1beta2/index.ts +++ b/packages/google-cloud-language/src/v1beta2/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 52b2d9d0caf..1adca3901bf 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 4e4f5c1dc1e..47a8a181afa 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "f30573f6c99f3450735a46c31aa2636dd83f0512" + "sha": "21387cfb58e70dad4779191238e8800de1b411cd" } }, { diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js index a4274b479c3..ce5d6334438 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts index 77d178376c4..dcde00bc256 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/system-test/install.ts b/packages/google-cloud-language/system-test/install.ts index 39d90f771de..d2d61c0396f 100644 --- a/packages/google-cloud-language/system-test/install.ts +++ b/packages/google-cloud-language/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index 7707da7bb6f..f27aacd0757 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 5b60359ddb0..a31b94c173b 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From b6b4d8968645c7e9a00936c3212084d8c83a3cab Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 6 Jan 2021 13:08:33 -0800 Subject: [PATCH 409/488] build: update go meta information --- packages/google-cloud-language/protos/protos.json | 2 +- packages/google-cloud-language/synth.metadata | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index e3251ebf0a9..9622494f709 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -1835,7 +1835,7 @@ }, "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 47a8a181afa..3abd6fd9914 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "21387cfb58e70dad4779191238e8800de1b411cd" + "sha": "b9fd685241ce21d19e42620425d2ec96dde27699" } }, { From f7eb298f009ed061677a5c936fd93a067c9f2ac8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jan 2021 07:03:26 +0100 Subject: [PATCH 410/488] fix(deps): update dependency mathjs to v9 (#537) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 02c91cf9dd5..71fd5ba587b 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/automl": "^2.0.0", - "mathjs": "^8.0.0", + "mathjs": "^9.0.0", "@google-cloud/language": "^4.2.1", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" From 06deaab2ce57bcfa8f03e0f49ab5e4fbadbba07e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 08:40:23 -0800 Subject: [PATCH 411/488] refactor(nodejs): move build cop to flakybot (#540) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/79c017af-4fff-4b22-8cb4-5c2208642be6/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- packages/google-cloud-language/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 3abd6fd9914..dbcfb67ea5e 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "b9fd685241ce21d19e42620425d2ec96dde27699" + "sha": "794f530137cc79c9d834befbeaeef70e9d414bd5" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From 9b617b0f09da51e56753ce010ea45cb840e73e6a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 2 Feb 2021 17:52:09 -0800 Subject: [PATCH 412/488] chore: update CODEOWNERS config (#541) --- packages/google-cloud-language/.repo-metadata.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.repo-metadata.json b/packages/google-cloud-language/.repo-metadata.json index 95f6bc936a9..f03bc393c68 100644 --- a/packages/google-cloud-language/.repo-metadata.json +++ b/packages/google-cloud-language/.repo-metadata.json @@ -9,5 +9,6 @@ "repo": "googleapis/nodejs-language", "distribution_name": "@google-cloud/language", "api_id": "language.googleapis.com", - "requires_billing": true -} \ No newline at end of file + "requires_billing": true, + "codeowner_team": "@googleapis/ml-apis" +} From 77b885572f47c62277e962d2be4ffa76d9413ab0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 18:04:04 -0800 Subject: [PATCH 413/488] build: adds UNORDERED_LIST enum (#542) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2ae671ee-21a8-4bed-96cc-bdcf6b4638b5/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-language/protos/protos.d.ts | 3 ++- packages/google-cloud-language/protos/protos.js | 7 +++++++ packages/google-cloud-language/protos/protos.json | 3 ++- packages/google-cloud-language/synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index 8d1c1ad3262..93ab308079c 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -5976,7 +5976,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } } diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 33b2ca3d11a..57788f4910d 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -16342,6 +16342,7 @@ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -16351,6 +16352,7 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); @@ -21798,6 +21800,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -21893,6 +21896,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } return message; diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index 9622494f709..61a578c077d 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -1828,7 +1828,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } } } diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index dbcfb67ea5e..690c3bc0f01 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "794f530137cc79c9d834befbeaeef70e9d414bd5" + "sha": "e269873fa74794a914b4c64ee169d0c75dc5abf2" } }, { From 192cd6f0fe580f5657d2ccc617921e4b0c21c1dd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:00:25 -0800 Subject: [PATCH 414/488] build: update gapic-generator-typescript to v1.2.10. (#543) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7d84eafd-4925-434f-9ffd-6407671972cb/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- packages/google-cloud-language/synth.metadata | 6 +++--- packages/google-cloud-language/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata index 690c3bc0f01..edf24409a78 100644 --- a/packages/google-cloud-language/synth.metadata +++ b/packages/google-cloud-language/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "e269873fa74794a914b4c64ee169d0c75dc5abf2" + "sha": "1fd6e5e8ea43b9d89463b6038b11cf66cec9f292" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "539f0d44c80ef331ae1a50d92d61b91e77d500dd", - "internalRef": "345358447" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/packages/google-cloud-language/webpack.config.js b/packages/google-cloud-language/webpack.config.js index e92ce835266..a742509255e 100644 --- a/packages/google-cloud-language/webpack.config.js +++ b/packages/google-cloud-language/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 95d86ca29e255f87a594f8b81beddb6b784ac405 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 8 Mar 2021 12:15:26 -0800 Subject: [PATCH 415/488] chore: release 4.2.2 (#538) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 659b3a54722..b8a9b117900 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.2.2](https://www.github.com/googleapis/nodejs-language/compare/v4.2.1...v4.2.2) (2021-03-07) + + +### Bug Fixes + +* **deps:** update dependency mathjs to v9 ([#537](https://www.github.com/googleapis/nodejs-language/issues/537)) ([794f530](https://www.github.com/googleapis/nodejs-language/commit/794f530137cc79c9d834befbeaeef70e9d414bd5)) + ### [4.2.1](https://www.github.com/googleapis/nodejs-language/compare/v4.2.0...v4.2.1) (2020-11-07) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index feefa4dfba6..c93e1938998 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.1", + "version": "4.2.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 71fd5ba587b..5d0b1053b34 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.2.1", + "@google-cloud/language": "^4.2.2", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 354b47c14c4905d12fbe284f0d1709fcc177f3c6 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Thu, 18 Mar 2021 15:47:13 -0700 Subject: [PATCH 416/488] chore: migrate to owl bot (#544) --- .../.github/.OwlBot.yaml | 23 ++++++++++ .../google-cloud-language/.repo-metadata.json | 17 +++---- packages/google-cloud-language/synth.metadata | 46 ------------------- packages/google-cloud-language/synth.py | 28 ----------- 4 files changed, 32 insertions(+), 82 deletions(-) create mode 100644 packages/google-cloud-language/.github/.OwlBot.yaml delete mode 100644 packages/google-cloud-language/synth.metadata delete mode 100644 packages/google-cloud-language/synth.py diff --git a/packages/google-cloud-language/.github/.OwlBot.yaml b/packages/google-cloud-language/.github/.OwlBot.yaml new file mode 100644 index 00000000000..daf185e31b0 --- /dev/null +++ b/packages/google-cloud-language/.github/.OwlBot.yaml @@ -0,0 +1,23 @@ +# Copyright 2021 Google LLC +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/language/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + diff --git a/packages/google-cloud-language/.repo-metadata.json b/packages/google-cloud-language/.repo-metadata.json index f03bc393c68..86012d5ad4a 100644 --- a/packages/google-cloud-language/.repo-metadata.json +++ b/packages/google-cloud-language/.repo-metadata.json @@ -1,14 +1,15 @@ { - "name": "language", - "name_pretty": "Natural Language", - "product_documentation": "https://cloud.google.com/natural-language/docs/", - "client_documentation": "https://googleapis.dev/nodejs/language/latest", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559753", + "default_version": "v1", "release_level": "ga", + "requires_billing": true, + "client_documentation": "https://googleapis.dev/nodejs/language/latest", + "codeowner_team": "@googleapis/ml-apis", "language": "nodejs", - "repo": "googleapis/nodejs-language", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559753", + "product_documentation": "https://cloud.google.com/natural-language/docs/", + "name": "language", "distribution_name": "@google-cloud/language", + "name_pretty": "Natural Language", "api_id": "language.googleapis.com", - "requires_billing": true, - "codeowner_team": "@googleapis/ml-apis" + "repo": "googleapis/nodejs-language" } diff --git a/packages/google-cloud-language/synth.metadata b/packages/google-cloud-language/synth.metadata deleted file mode 100644 index edf24409a78..00000000000 --- a/packages/google-cloud-language/synth.metadata +++ /dev/null @@ -1,46 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-language.git", - "sha": "1fd6e5e8ea43b9d89463b6038b11cf66cec9f292" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "language", - "apiVersion": "v1", - "language": "nodejs", - "generator": "bazel" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "language", - "apiVersion": "v1beta2", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file diff --git a/packages/google-cloud-language/synth.py b/packages/google-cloud-language/synth.py deleted file mode 100644 index b073188cd26..00000000000 --- a/packages/google-cloud-language/synth.py +++ /dev/null @@ -1,28 +0,0 @@ -import synthtool as s -import synthtool.gcp as gcp -import synthtool.languages.node as node -import logging - -logging.basicConfig(level=logging.DEBUG) - -AUTOSYNTH_MULTIPLE_COMMITS = True - - -gapic = gcp.GAPICBazel() -versions = ['v1', 'v1beta2'] -for version in versions: - library = gapic.node_library( - 'language', - version, - ) - s.copy( - library, - excludes=['package.json', 'README.md']) - -# Update common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=versions, default_version='v1') -s.copy(templates) - -node.postprocess_gapic_library() From 54e87d13dae521ee03adcdf6295e6f0f60f13a41 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 30 Mar 2021 12:20:47 -0700 Subject: [PATCH 417/488] build: update .OwlBot.lock with new version of post-processor (#553) Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-language/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/src/index.ts b/packages/google-cloud-language/src/index.ts index 2c3a55d420a..54ab3d79695 100644 --- a/packages/google-cloud-language/src/index.ts +++ b/packages/google-cloud-language/src/index.ts @@ -16,13 +16,13 @@ // ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** -import * as v1 from './v1'; import * as v1beta2 from './v1beta2'; +import * as v1 from './v1'; const LanguageServiceClient = v1.LanguageServiceClient; type LanguageServiceClient = v1.LanguageServiceClient; -export {v1, v1beta2, LanguageServiceClient}; -export default {v1, v1beta2, LanguageServiceClient}; +export {v1beta2, v1, LanguageServiceClient}; +export default {v1beta2, v1, LanguageServiceClient}; import * as protos from '../protos/protos'; export {protos}; From 3e6f6c3b7eba31dfacb0dacdba1321a53a33d3f8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:08:29 +0200 Subject: [PATCH 418/488] chore(deps): update dependency sinon to v10 (#560) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^9.0.1` -> `^10.0.0`](https://renovatebot.com/diffs/npm/sinon/9.2.4/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/compatibility-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/confidence-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^9.0.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/9.0.11/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/compatibility-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/confidence-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v10.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1000--2021-03-22) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v9.2.4...v10.0.0) ================== - Upgrade nise to 4.1.0 - Use [@​sinonjs/eslint-config](https://togithub.com/sinonjs/eslint-config)[@​4](https://togithub.com/4) => Adopts ES2017 => Drops support for IE 11, Legacy Edge and legacy Safari
--- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index c93e1938998..bd0ab79f2d9 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -53,7 +53,7 @@ "devDependencies": { "@types/mocha": "^8.0.0", "@types/node": "^12.0.0", - "@types/sinon": "^9.0.0", + "@types/sinon": "^10.0.0", "c8": "^7.0.0", "codecov": "^3.0.2", "gts": "^2.0.0", @@ -64,7 +64,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^9.0.1", + "sinon": "^10.0.0", "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 9eb6bb4f17c1a030a63d84ebcf50ded62bcfc8ae Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Apr 2021 00:56:11 +0200 Subject: [PATCH 419/488] chore(deps): update dependency ts-loader to v9 (#564) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/ts-loader/8.1.0/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/compatibility-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/confidence-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
TypeStrong/ts-loader ### [`v9.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v900) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v8.1.0...v9.0.0) Breaking changes: - minimum webpack version: 5 - minimum node version: 12 Changes: - [webpack 5 migration](https://togithub.com/TypeStrong/ts-loader/pull/1251) - thanks [@​johnnyreilly](https://togithub.com/johnnyreilly), [@​jonwallsten](https://togithub.com/jonwallsten), [@​sokra](https://togithub.com/sokra), [@​appzuka](https://togithub.com/appzuka), [@​alexander-akait](https://togithub.com/alexander-akait)
--- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index bd0ab79f2d9..59095d52354 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -65,7 +65,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", - "ts-loader": "^8.0.0", + "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", "webpack-cli": "^4.0.0", From e9b29f41fbe2681fcc6f97e496da3e4ee21d8203 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:52:22 -0700 Subject: [PATCH 420/488] fix(deps): require google-gax v2.12.0 (#569) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 59095d52354..dbd0a0e177f 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -48,7 +48,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "google-gax": "^2.9.2" + "google-gax": "^2.12.0" }, "devDependencies": { "@types/mocha": "^8.0.0", From 0a2fd4d81052f024626f83213078244e647a0f2d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 17:00:19 +0000 Subject: [PATCH 421/488] chore: new owl bot post processor docker image (#571) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f --- .../google-cloud-language/protos/protos.d.ts | 18 ++++---- .../google-cloud-language/protos/protos.js | 36 ++++++++-------- .../src/v1/language_service_client.ts | 15 +++---- .../src/v1beta2/language_service_client.ts | 15 +++---- .../test/gapic_language_service_v1.ts | 42 ++++++++----------- .../test/gapic_language_service_v1beta2.ts | 42 ++++++++----------- 6 files changed, 77 insertions(+), 91 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index 93ab308079c..ea137147fb0 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -205,10 +205,10 @@ export namespace google { public type: (google.cloud.language.v1.Document.Type|keyof typeof google.cloud.language.v1.Document.Type); /** Document content. */ - public content: string; + public content?: (string|null); /** Document gcsContentUri. */ - public gcsContentUri: string; + public gcsContentUri?: (string|null); /** Document language. */ public language: string; @@ -3006,10 +3006,10 @@ export namespace google { public type: (google.cloud.language.v1beta2.Document.Type|keyof typeof google.cloud.language.v1beta2.Document.Type); /** Document content. */ - public content: string; + public content?: (string|null); /** Document gcsContentUri. */ - public gcsContentUri: string; + public gcsContentUri?: (string|null); /** Document language. */ public language: string; @@ -5773,19 +5773,19 @@ export namespace google { public selector: string; /** HttpRule get. */ - public get: string; + public get?: (string|null); /** HttpRule put. */ - public put: string; + public put?: (string|null); /** HttpRule post. */ - public post: string; + public post?: (string|null); /** HttpRule delete. */ - public delete: string; + public delete?: (string|null); /** HttpRule patch. */ - public patch: string; + public patch?: (string|null); /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 57788f4910d..ad355d5e72c 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -336,19 +336,19 @@ /** * Document content. - * @member {string} content + * @member {string|null|undefined} content * @memberof google.cloud.language.v1.Document * @instance */ - Document.prototype.content = ""; + Document.prototype.content = null; /** * Document gcsContentUri. - * @member {string} gcsContentUri + * @member {string|null|undefined} gcsContentUri * @memberof google.cloud.language.v1.Document * @instance */ - Document.prototype.gcsContentUri = ""; + Document.prototype.gcsContentUri = null; /** * Document language. @@ -8014,19 +8014,19 @@ /** * Document content. - * @member {string} content + * @member {string|null|undefined} content * @memberof google.cloud.language.v1beta2.Document * @instance */ - Document.prototype.content = ""; + Document.prototype.content = null; /** * Document gcsContentUri. - * @member {string} gcsContentUri + * @member {string|null|undefined} gcsContentUri * @memberof google.cloud.language.v1beta2.Document * @instance */ - Document.prototype.gcsContentUri = ""; + Document.prototype.gcsContentUri = null; /** * Document language. @@ -15703,43 +15703,43 @@ /** * HttpRule get. - * @member {string} get + * @member {string|null|undefined} get * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.get = ""; + HttpRule.prototype.get = null; /** * HttpRule put. - * @member {string} put + * @member {string|null|undefined} put * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.put = ""; + HttpRule.prototype.put = null; /** * HttpRule post. - * @member {string} post + * @member {string|null|undefined} post * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.post = ""; + HttpRule.prototype.post = null; /** * HttpRule delete. - * @member {string} delete + * @member {string|null|undefined} delete * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype["delete"] = ""; + HttpRule.prototype["delete"] = null; /** * HttpRule patch. - * @member {string} patch + * @member {string|null|undefined} patch * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.patch = ""; + HttpRule.prototype.patch = null; /** * HttpRule custom. diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 6c75c1de34a..7c8630c7df5 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -208,13 +208,14 @@ export class LanguageServiceClient { ]; for (const methodName of languageServiceStubMethods) { const callPromise = this.languageServiceStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, (err: Error | null | undefined) => () => { throw err; } diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 1adca3901bf..b64920b34f0 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -208,13 +208,14 @@ export class LanguageServiceClient { ]; for (const methodName of languageServiceStubMethods) { const callPromise = this.languageServiceStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, (err: Error | null | undefined) => () => { throw err; } diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index f27aacd0757..12b85705fa4 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -26,10 +26,9 @@ import * as languageserviceModule from '../src'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( filledObject ) as T; @@ -170,9 +169,8 @@ describe('v1.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentResponse() ); - client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.analyzeSentiment = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.analyzeSentiment( request, @@ -258,9 +256,8 @@ describe('v1.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() ); - client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.analyzeEntities = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.analyzeEntities( request, @@ -323,9 +320,8 @@ describe('v1.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() ); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.analyzeEntitySentiment = + stubSimpleCall(expectedResponse); const [response] = await client.analyzeEntitySentiment(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -348,9 +344,8 @@ describe('v1.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() ); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.analyzeEntitySentiment = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.analyzeEntitySentiment( request, @@ -439,9 +434,8 @@ describe('v1.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() ); - client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.analyzeSyntax = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.analyzeSyntax( request, @@ -527,9 +521,8 @@ describe('v1.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextResponse() ); - client.innerApiCalls.classifyText = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.classifyText = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.classifyText( request, @@ -615,9 +608,8 @@ describe('v1.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextResponse() ); - client.innerApiCalls.annotateText = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.annotateText = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.annotateText( request, diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index a31b94c173b..2453d4e0e46 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -26,10 +26,9 @@ import * as languageserviceModule from '../src'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( filledObject ) as T; @@ -170,9 +169,8 @@ describe('v1beta2.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() ); - client.innerApiCalls.analyzeSentiment = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.analyzeSentiment = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.analyzeSentiment( request, @@ -258,9 +256,8 @@ describe('v1beta2.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() ); - client.innerApiCalls.analyzeEntities = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.analyzeEntities = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.analyzeEntities( request, @@ -323,9 +320,8 @@ describe('v1beta2.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() ); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.analyzeEntitySentiment = + stubSimpleCall(expectedResponse); const [response] = await client.analyzeEntitySentiment(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -348,9 +344,8 @@ describe('v1beta2.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() ); - client.innerApiCalls.analyzeEntitySentiment = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.analyzeEntitySentiment = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.analyzeEntitySentiment( request, @@ -439,9 +434,8 @@ describe('v1beta2.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() ); - client.innerApiCalls.analyzeSyntax = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.analyzeSyntax = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.analyzeSyntax( request, @@ -527,9 +521,8 @@ describe('v1beta2.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextResponse() ); - client.innerApiCalls.classifyText = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.classifyText = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.classifyText( request, @@ -615,9 +608,8 @@ describe('v1beta2.LanguageServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextResponse() ); - client.innerApiCalls.annotateText = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.annotateText = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.annotateText( request, From f3ca270593e30bae2b6e3312e579b12cc8dd4921 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 21:58:28 +0000 Subject: [PATCH 422/488] fix: use require() to load JSON protos (#572) The library is regenerated with gapic-generator-typescript v1.3.1. Committer: @alexander-fenster PiperOrigin-RevId: 372468161 Source-Link: https://github.com/googleapis/googleapis/commit/75880c3e6a6aa2597400582848e81bbbfac51dea Source-Link: https://github.com/googleapis/googleapis-gen/commit/77b18044813d4c8c415ff9ea68e76e307eb8e904 --- .../src/v1/language_service_client.ts | 18 ++---------------- .../src/v1beta2/language_service_client.ts | 18 ++---------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 7c8630c7df5..6e2889f038b 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -22,6 +22,7 @@ import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v1/language_service_client_config.json`. @@ -136,22 +137,7 @@ export class LanguageServiceClient { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index b64920b34f0..e54d4b80430 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -22,6 +22,7 @@ import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v1beta2/language_service_client_config.json`. @@ -136,22 +137,7 @@ export class LanguageServiceClient { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( From 8315546c19ba58d7a5ac955f7b4f9e7ab7694eb2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 23:12:22 +0000 Subject: [PATCH 423/488] chore: update gapic-generator-typescript to v1.3.2 (#573) Committer: @alexander-fenster PiperOrigin-RevId: 372656503 Source-Link: https://github.com/googleapis/googleapis/commit/6fa858c6489b1bbc505a7d7afe39f2dc45819c38 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d7c95df3ab1ea1b4c22a4542bad4924cc46d1388 --- packages/google-cloud-language/src/v1/language_service_client.ts | 1 - .../google-cloud-language/src/v1beta2/language_service_client.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 6e2889f038b..5f256cd2553 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -19,7 +19,6 @@ /* global window */ import * as gax from 'google-gax'; import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; -import * as path from 'path'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index e54d4b80430..df0e18be22b 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -19,7 +19,6 @@ /* global window */ import * as gax from 'google-gax'; import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; -import * as path from 'path'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); From 50c1696d7f36735363102ab7a6c306afda2d0fc8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 May 2021 10:39:48 -0700 Subject: [PATCH 424/488] chore: release 4.2.3 (#570) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-language/CHANGELOG.md | 8 ++++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index b8a9b117900..cdbeb9a6aca 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.2.3](https://www.github.com/googleapis/nodejs-language/compare/v4.2.2...v4.2.3) (2021-05-12) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#569](https://www.github.com/googleapis/nodejs-language/issues/569)) ([70b3883](https://www.github.com/googleapis/nodejs-language/commit/70b3883797cc61f6ef314f19e75930f0c0193dff)) +* use require() to load JSON protos ([#572](https://www.github.com/googleapis/nodejs-language/issues/572)) ([e3efed9](https://www.github.com/googleapis/nodejs-language/commit/e3efed93fb7dab7236b9ba4effdcda915327fd1d)) + ### [4.2.2](https://www.github.com/googleapis/nodejs-language/compare/v4.2.1...v4.2.2) (2021-03-07) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index dbd0a0e177f..14af9443f20 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.2", + "version": "4.2.3", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 5d0b1053b34..de7ba54f1c4 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.2.2", + "@google-cloud/language": "^4.2.3", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 05358f6714cf791cc9c9371cf5496294c02a1c12 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 May 2021 19:04:06 +0200 Subject: [PATCH 425/488] chore(deps): update dependency @types/node to v14 (#577) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^12.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/12.20.13/14.17.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/compatibility-slim/12.20.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/confidence-slim/12.20.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 14af9443f20..75baf06e451 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,7 +52,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.0", - "@types/node": "^12.0.0", + "@types/node": "^14.0.0", "@types/sinon": "^10.0.0", "c8": "^7.0.0", "codecov": "^3.0.2", From 606e9359b5b36ffd61fa82da8a3b7503d7ede7f5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 17:54:25 +0200 Subject: [PATCH 426/488] chore(deps): update dependency sinon to v11 (#578) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^10.0.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/sinon/10.0.0/11.1.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/compatibility-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/confidence-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v11.1.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1110--2021-05-25) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.0.0...31be9a5d5a4762ef01cb195f29024616dfee9ce8) \================== - Add sinon.promise() implementation ([#​2369](https://togithub.com/sinonjs/sinon/issues/2369)) - Set wrappedMethod on getters/setters ([#​2378](https://togithub.com/sinonjs/sinon/issues/2378)) - \[Docs] Update fake-server usage & descriptions ([#​2365](https://togithub.com/sinonjs/sinon/issues/2365)) - Fake docs improvement ([#​2360](https://togithub.com/sinonjs/sinon/issues/2360)) - Update nise to 5.1.0 (fixed [#​2318](https://togithub.com/sinonjs/sinon/issues/2318)) ### [`v11.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1100--2021-05-24) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.1...v11.0.0) \================== - Explicitly use samsam 6.0.2 with fix for [#​2345](https://togithub.com/sinonjs/sinon/issues/2345) - Update most packages ([#​2371](https://togithub.com/sinonjs/sinon/issues/2371)) - Update compatibility docs ([#​2366](https://togithub.com/sinonjs/sinon/issues/2366)) - Update packages (includes breaking fake-timers change, see [#​2352](https://togithub.com/sinonjs/sinon/issues/2352)) - Warn of potential memory leaks ([#​2357](https://togithub.com/sinonjs/sinon/issues/2357)) - Fix clock test errors ### [`v10.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1001--2021-04-08) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.0...v10.0.1) \================== - Upgrade sinon components (bumps y18n to 4.0.1) - Bump y18n from 4.0.0 to 4.0.1
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 75baf06e451..bdaafccc3a1 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -64,7 +64,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 2d8c4a99e776206a0334506009cbb80892a3e9a9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 20:48:14 +0000 Subject: [PATCH 427/488] fix: GoogleAdsError missing using generator version after 1.3.0 (#579) [PR](https://github.com/googleapis/gapic-generator-typescript/pull/878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: https://github.com/googleapis/googleapis/commit/95fa72fdd0d69b02d72c33b37d1e4cc66d4b1446 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46 --- .../google-cloud-language/src/v1/language_service_client.ts | 2 ++ .../src/v1beta2/language_service_client.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 5f256cd2553..dfe030c87ac 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -131,6 +131,8 @@ export class LanguageServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index df0e18be22b..3ca35e8d152 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -131,6 +131,8 @@ export class LanguageServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); From c5ea02ffee2a01984ab0be82a3e797490bd3db4e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 29 May 2021 20:54:04 +0000 Subject: [PATCH 428/488] chore: make generate_index_ts() deterministic (#581) Fixes https://github.com/googleapis/synthtool/issues/1103 Source-Link: https://github.com/googleapis/synthtool/commit/c3e41da0fa256ad7f6b4bc76b9d069dedecdfef4 Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:e37a815333a6f3e14d8532efe90cba8aa0d34210f8c0fdbdd9e6a34dcbe51e96 --- packages/google-cloud-language/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/src/index.ts b/packages/google-cloud-language/src/index.ts index 54ab3d79695..2c3a55d420a 100644 --- a/packages/google-cloud-language/src/index.ts +++ b/packages/google-cloud-language/src/index.ts @@ -16,13 +16,13 @@ // ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** -import * as v1beta2 from './v1beta2'; import * as v1 from './v1'; +import * as v1beta2 from './v1beta2'; const LanguageServiceClient = v1.LanguageServiceClient; type LanguageServiceClient = v1.LanguageServiceClient; -export {v1beta2, v1, LanguageServiceClient}; -export default {v1beta2, v1, LanguageServiceClient}; +export {v1, v1beta2, LanguageServiceClient}; +export default {v1, v1beta2, LanguageServiceClient}; import * as protos from '../protos/protos'; export {protos}; From b55d6c85267026d74c7e71feb2121a5913f31fbe Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Jun 2021 18:08:22 -0700 Subject: [PATCH 429/488] chore: release 4.2.4 (#580) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index cdbeb9a6aca..3505edcc7ba 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.2.4](https://www.github.com/googleapis/nodejs-language/compare/v4.2.3...v4.2.4) (2021-05-29) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#579](https://www.github.com/googleapis/nodejs-language/issues/579)) ([3ab88da](https://www.github.com/googleapis/nodejs-language/commit/3ab88daffd13aeab99689ccccfe3ec29f8ec89cd)) + ### [4.2.3](https://www.github.com/googleapis/nodejs-language/compare/v4.2.2...v4.2.3) (2021-05-12) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index bdaafccc3a1..e1c71ac79f6 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.3", + "version": "4.2.4", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index de7ba54f1c4..82789e50b2b 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.2.3", + "@google-cloud/language": "^4.2.4", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 585a78e07ed183a86151a1f47fcc5467f7c8081b Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 10 Jun 2021 23:02:31 +0200 Subject: [PATCH 430/488] chore(nodejs): remove api-extractor dependencies (#586) --- packages/google-cloud-language/package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index e1c71ac79f6..e405843cc4e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -43,9 +43,7 @@ "predocs-test": "npm run docs", "prepare": "npm run compile", "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean", - "api-extractor": "api-extractor run --local", - "api-documenter": "api-documenter yaml --input-folder=temp" + "precompile": "gts clean" }, "dependencies": { "google-gax": "^2.12.0" @@ -68,8 +66,6 @@ "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", - "webpack-cli": "^4.0.0", - "@microsoft/api-documenter": "^7.8.10", - "@microsoft/api-extractor": "^7.8.10" + "webpack-cli": "^4.0.0" } } From 873258eae4b121200de771ea5b60a4941dfbeb22 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:22:21 +0000 Subject: [PATCH 431/488] fix: make request optional in all cases (#588) ... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0 Committer: @miraleung PiperOrigin-RevId: 380641501 Source-Link: https://github.com/googleapis/googleapis/commit/076f7e9f0b258bdb54338895d7251b202e8f0de3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/27e4c88b4048e5f56508d4e1aa417d60a3380892 --- .../src/v1/language_service_client.ts | 24 +++++++++---------- .../src/v1beta2/language_service_client.ts | 24 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index dfe030c87ac..e842b0d62a2 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -278,7 +278,7 @@ export class LanguageServiceClient { // -- Service calls -- // ------------------- analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + request?: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, options?: CallOptions ): Promise< [ @@ -328,7 +328,7 @@ export class LanguageServiceClient { * const [response] = await client.analyzeSentiment(request); */ analyzeSentiment( - request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, + request?: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -365,7 +365,7 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + request?: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, options?: CallOptions ): Promise< [ @@ -417,7 +417,7 @@ export class LanguageServiceClient { * const [response] = await client.analyzeEntities(request); */ analyzeEntities( - request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, + request?: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, optionsOrCallback?: | CallOptions | Callback< @@ -454,7 +454,7 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + request?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, options?: CallOptions ): Promise< [ @@ -508,7 +508,7 @@ export class LanguageServiceClient { * const [response] = await client.analyzeEntitySentiment(request); */ analyzeEntitySentiment( - request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, + request?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -552,7 +552,7 @@ export class LanguageServiceClient { ); } analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + request?: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, options?: CallOptions ): Promise< [ @@ -600,7 +600,7 @@ export class LanguageServiceClient { * const [response] = await client.analyzeSyntax(request); */ analyzeSyntax( - request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, + request?: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, optionsOrCallback?: | CallOptions | Callback< @@ -635,7 +635,7 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, + request?: protos.google.cloud.language.v1.IClassifyTextRequest, options?: CallOptions ): Promise< [ @@ -679,7 +679,7 @@ export class LanguageServiceClient { * const [response] = await client.classifyText(request); */ classifyText( - request: protos.google.cloud.language.v1.IClassifyTextRequest, + request?: protos.google.cloud.language.v1.IClassifyTextRequest, optionsOrCallback?: | CallOptions | Callback< @@ -714,7 +714,7 @@ export class LanguageServiceClient { return this.innerApiCalls.classifyText(request, options, callback); } annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, + request?: protos.google.cloud.language.v1.IAnnotateTextRequest, options?: CallOptions ): Promise< [ @@ -763,7 +763,7 @@ export class LanguageServiceClient { * const [response] = await client.annotateText(request); */ annotateText( - request: protos.google.cloud.language.v1.IAnnotateTextRequest, + request?: protos.google.cloud.language.v1.IAnnotateTextRequest, optionsOrCallback?: | CallOptions | Callback< diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 3ca35e8d152..4fc97c86c9a 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -278,7 +278,7 @@ export class LanguageServiceClient { // -- Service calls -- // ------------------- analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + request?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, options?: CallOptions ): Promise< [ @@ -329,7 +329,7 @@ export class LanguageServiceClient { * const [response] = await client.analyzeSentiment(request); */ analyzeSentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, + request?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -366,7 +366,7 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSentiment(request, options, callback); } analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, options?: CallOptions ): Promise< [ @@ -418,7 +418,7 @@ export class LanguageServiceClient { * const [response] = await client.analyzeEntities(request); */ analyzeEntities( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, + request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, optionsOrCallback?: | CallOptions | Callback< @@ -455,7 +455,7 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeEntities(request, options, callback); } analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, options?: CallOptions ): Promise< [ @@ -509,7 +509,7 @@ export class LanguageServiceClient { * const [response] = await client.analyzeEntitySentiment(request); */ analyzeEntitySentiment( - request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, + request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, optionsOrCallback?: | CallOptions | Callback< @@ -553,7 +553,7 @@ export class LanguageServiceClient { ); } analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + request?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, options?: CallOptions ): Promise< [ @@ -605,7 +605,7 @@ export class LanguageServiceClient { * const [response] = await client.analyzeSyntax(request); */ analyzeSyntax( - request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, + request?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, optionsOrCallback?: | CallOptions | Callback< @@ -642,7 +642,7 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeSyntax(request, options, callback); } classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + request?: protos.google.cloud.language.v1beta2.IClassifyTextRequest, options?: CallOptions ): Promise< [ @@ -690,7 +690,7 @@ export class LanguageServiceClient { * const [response] = await client.classifyText(request); */ classifyText( - request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, + request?: protos.google.cloud.language.v1beta2.IClassifyTextRequest, optionsOrCallback?: | CallOptions | Callback< @@ -727,7 +727,7 @@ export class LanguageServiceClient { return this.innerApiCalls.classifyText(request, options, callback); } annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + request?: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, options?: CallOptions ): Promise< [ @@ -780,7 +780,7 @@ export class LanguageServiceClient { * const [response] = await client.annotateText(request); */ annotateText( - request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, + request?: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, optionsOrCallback?: | CallOptions | Callback< From ddc06ac434958f75a2d45dd06608d3e87ec9df7a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:44:44 +0000 Subject: [PATCH 432/488] chore: release 4.2.5 (#589) :robot: I have created a release \*beep\* \*boop\* --- ### [4.2.5](https://www.github.com/googleapis/nodejs-language/compare/v4.2.4...v4.2.5) (2021-06-22) ### Bug Fixes * make request optional in all cases ([#588](https://www.github.com/googleapis/nodejs-language/issues/588)) ([878d365](https://www.github.com/googleapis/nodejs-language/commit/878d365dd0fba24ac58dcc80939e250c77d8cb53)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 3505edcc7ba..6bca1d0b9d6 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.2.5](https://www.github.com/googleapis/nodejs-language/compare/v4.2.4...v4.2.5) (2021-06-22) + + +### Bug Fixes + +* make request optional in all cases ([#588](https://www.github.com/googleapis/nodejs-language/issues/588)) ([878d365](https://www.github.com/googleapis/nodejs-language/commit/878d365dd0fba24ac58dcc80939e250c77d8cb53)) + ### [4.2.4](https://www.github.com/googleapis/nodejs-language/compare/v4.2.3...v4.2.4) (2021-05-29) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index e405843cc4e..9ea8f69c371 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.4", + "version": "4.2.5", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 82789e50b2b..1b0771c9a6c 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.2.4", + "@google-cloud/language": "^4.2.5", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 9ef8c5b2802de753fc349217ca274302946a35a4 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 29 Jun 2021 11:24:37 -0400 Subject: [PATCH 433/488] fix(deps): google-gax v2.17.0 with mTLS (#595) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 9ea8f69c371..86ac7b76671 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -46,7 +46,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" }, "devDependencies": { "@types/mocha": "^8.0.0", From 6f3543deae29338c7ed316ac54061e3e2beb8efc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 16:12:24 +0000 Subject: [PATCH 434/488] chore: release 4.2.6 (#596) :robot: I have created a release \*beep\* \*boop\* --- ### [4.2.6](https://www.github.com/googleapis/nodejs-language/compare/v4.2.5...v4.2.6) (2021-06-30) ### Bug Fixes * **deps:** google-gax v2.17.0 with mTLS ([#595](https://www.github.com/googleapis/nodejs-language/issues/595)) ([3ac3cfb](https://www.github.com/googleapis/nodejs-language/commit/3ac3cfb8d0ce0ba055502e07178764555d020622)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 6bca1d0b9d6..9d706a379e5 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.2.6](https://www.github.com/googleapis/nodejs-language/compare/v4.2.5...v4.2.6) (2021-06-30) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#595](https://www.github.com/googleapis/nodejs-language/issues/595)) ([3ac3cfb](https://www.github.com/googleapis/nodejs-language/commit/3ac3cfb8d0ce0ba055502e07178764555d020622)) + ### [4.2.5](https://www.github.com/googleapis/nodejs-language/compare/v4.2.4...v4.2.5) (2021-06-22) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 86ac7b76671..7a3a1ca0e82 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.5", + "version": "4.2.6", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 1b0771c9a6c..ce188a415ae 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.2.5", + "@google-cloud/language": "^4.2.6", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 01b8b5893a7a164a84dd02804f36da189091791b Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:44:18 -0400 Subject: [PATCH 435/488] fix(deps): google-gax v2.17.1 (#598) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 7a3a1ca0e82..26e66e75302 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -46,7 +46,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" }, "devDependencies": { "@types/mocha": "^8.0.0", From a755ce38a75dd30d7d290ad395214953c4e44fdb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 22:00:15 +0000 Subject: [PATCH 436/488] chore: release 4.2.7 (#599) :robot: I have created a release \*beep\* \*boop\* --- ### [4.2.7](https://www.github.com/googleapis/nodejs-language/compare/v4.2.6...v4.2.7) (2021-07-12) ### Bug Fixes * **deps:** google-gax v2.17.1 ([#598](https://www.github.com/googleapis/nodejs-language/issues/598)) ([47f9295](https://www.github.com/googleapis/nodejs-language/commit/47f9295ae17d4f9f87c32a40276eb1588f2cca55)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 9d706a379e5..79f847b03b0 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.2.7](https://www.github.com/googleapis/nodejs-language/compare/v4.2.6...v4.2.7) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#598](https://www.github.com/googleapis/nodejs-language/issues/598)) ([47f9295](https://www.github.com/googleapis/nodejs-language/commit/47f9295ae17d4f9f87c32a40276eb1588f2cca55)) + ### [4.2.6](https://www.github.com/googleapis/nodejs-language/compare/v4.2.5...v4.2.6) (2021-06-30) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 26e66e75302..271ecd77f15 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.6", + "version": "4.2.7", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index ce188a415ae..64b94538af9 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.2.6", + "@google-cloud/language": "^4.2.7", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 52770fab24c54d097e51478f44b31f63f5e0970f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:08:15 +0000 Subject: [PATCH 437/488] fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#600) Also removing the explicit generator tag for the IAMPolicy mixin for the kms and pubsub APIS as the generator will now read it from the .yaml file. PiperOrigin-RevId: 385101839 Source-Link: https://github.com/googleapis/googleapis/commit/80f404215a9346259db760d80d0671f28c433453 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 --- .../src/v1/language_service_client.ts | 11 ++++++++++- .../src/v1beta2/language_service_client.ts | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index e842b0d62a2..c63adb3f09f 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -40,6 +40,7 @@ const version = require('../../../package.json').version; export class LanguageServiceClient { private _terminated = false; private _opts: ClientOptions; + private _providedCustomServicePath: boolean; private _gaxModule: typeof gax | typeof gax.fallback; private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; @@ -51,6 +52,7 @@ export class LanguageServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; languageServiceStub?: Promise<{[name: string]: Function}>; @@ -93,6 +95,9 @@ export class LanguageServiceClient { const staticMembers = this.constructor as typeof LanguageServiceClient; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -152,6 +157,9 @@ export class LanguageServiceClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -180,7 +188,8 @@ export class LanguageServiceClient { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.language.v1.LanguageService, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 4fc97c86c9a..5206d6a9b9f 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -40,6 +40,7 @@ const version = require('../../../package.json').version; export class LanguageServiceClient { private _terminated = false; private _opts: ClientOptions; + private _providedCustomServicePath: boolean; private _gaxModule: typeof gax | typeof gax.fallback; private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; @@ -51,6 +52,7 @@ export class LanguageServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; languageServiceStub?: Promise<{[name: string]: Function}>; @@ -93,6 +95,9 @@ export class LanguageServiceClient { const staticMembers = this.constructor as typeof LanguageServiceClient; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -152,6 +157,9 @@ export class LanguageServiceClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -180,7 +188,8 @@ export class LanguageServiceClient { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.language.v1beta2.LanguageService, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides From 752c6b6407e75ecf42190f0cd2bea2d1ea8bc254 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 Jul 2021 00:32:11 +0000 Subject: [PATCH 438/488] chore: release 4.2.8 (#601) :robot: I have created a release \*beep\* \*boop\* --- ### [4.2.8](https://www.github.com/googleapis/nodejs-language/compare/v4.2.7...v4.2.8) (2021-07-21) ### Bug Fixes * Updating WORKSPACE files to use the newest version of the Typescript generator. ([#600](https://www.github.com/googleapis/nodejs-language/issues/600)) ([9f31d3f](https://www.github.com/googleapis/nodejs-language/commit/9f31d3f510c1628d610633d4ec749abdf66d73f3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 79f847b03b0..11e9b7420ba 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.2.8](https://www.github.com/googleapis/nodejs-language/compare/v4.2.7...v4.2.8) (2021-07-21) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#600](https://www.github.com/googleapis/nodejs-language/issues/600)) ([9f31d3f](https://www.github.com/googleapis/nodejs-language/commit/9f31d3f510c1628d610633d4ec749abdf66d73f3)) + ### [4.2.7](https://www.github.com/googleapis/nodejs-language/compare/v4.2.6...v4.2.7) (2021-07-12) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 271ecd77f15..978b3e6ed48 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.7", + "version": "4.2.8", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 64b94538af9..bccb92f8f5c 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.2.7", + "@google-cloud/language": "^4.2.8", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 4e6e85f5224c021e641740a43c5d2fdc68e00031 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:06:25 -0400 Subject: [PATCH 439/488] chore(nodejs): update client ref docs link in metadata (#606) --- packages/google-cloud-language/.repo-metadata.json | 2 +- packages/google-cloud-language/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/.repo-metadata.json b/packages/google-cloud-language/.repo-metadata.json index 86012d5ad4a..61cffdc7b34 100644 --- a/packages/google-cloud-language/.repo-metadata.json +++ b/packages/google-cloud-language/.repo-metadata.json @@ -2,7 +2,7 @@ "default_version": "v1", "release_level": "ga", "requires_billing": true, - "client_documentation": "https://googleapis.dev/nodejs/language/latest", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/language/latest", "codeowner_team": "@googleapis/ml-apis", "language": "nodejs", "issue_tracker": "https://issuetracker.google.com/savedsearches/559753", diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index faab4a572f1..ab1b38e15d3 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -159,7 +159,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/language/latest +[client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest [product-docs]: https://cloud.google.com/natural-language/docs/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From bce0245c601a6a2d883a7567f117cd0c61f7aaa0 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:46:38 -0400 Subject: [PATCH 440/488] fix(deps): google-gax v2.24.1 (#608) --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 978b3e6ed48..9d40a77a4a4 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -46,7 +46,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" }, "devDependencies": { "@types/mocha": "^8.0.0", From 35b7f0c7d52dbed72ec35abe5cc8d91e92faf4d1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 03:30:46 +0000 Subject: [PATCH 441/488] chore: release 4.2.9 (#609) :robot: I have created a release \*beep\* \*boop\* --- ### [4.2.9](https://www.github.com/googleapis/nodejs-language/compare/v4.2.8...v4.2.9) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#608](https://www.github.com/googleapis/nodejs-language/issues/608)) ([81d9fa1](https://www.github.com/googleapis/nodejs-language/commit/81d9fa1ff73ea6129d85bcf071cadd3946b9bdd7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 11e9b7420ba..f124b1355c6 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.2.9](https://www.github.com/googleapis/nodejs-language/compare/v4.2.8...v4.2.9) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#608](https://www.github.com/googleapis/nodejs-language/issues/608)) ([81d9fa1](https://www.github.com/googleapis/nodejs-language/commit/81d9fa1ff73ea6129d85bcf071cadd3946b9bdd7)) + ### [4.2.8](https://www.github.com/googleapis/nodejs-language/compare/v4.2.7...v4.2.8) (2021-07-21) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 9d40a77a4a4..622bc2c565d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.8", + "version": "4.2.9", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index bccb92f8f5c..88ab8d8e33f 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.2.8", + "@google-cloud/language": "^4.2.9", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 43fb1615f408f270275e17ff3298bd071b7475b6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:30:28 +0000 Subject: [PATCH 442/488] feat: turns on self-signed JWT feature flag (#610) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: https://github.com/googleapis/googleapis/commit/06345f7b95c4b4a3ffe4303f1f2984ccc304b2e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95882b37970e41e4cd51b22fa507cfd46dc7c4b6 --- .../google-cloud-language/src/v1/language_service_client.ts | 6 ++++++ .../src/v1beta2/language_service_client.ts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index c63adb3f09f..aa13ba11105 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -122,6 +122,12 @@ export class LanguageServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 5206d6a9b9f..1375ddf5176 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -122,6 +122,12 @@ export class LanguageServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; From f6fe045bfbe139829cebbafe179021141dd29440 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:50:44 +0000 Subject: [PATCH 443/488] chore: release 4.3.0 (#611) :robot: I have created a release \*beep\* \*boop\* --- ## [4.3.0](https://www.github.com/googleapis/nodejs-language/compare/v4.2.9...v4.3.0) (2021-08-23) ### Features * turns on self-signed JWT feature flag ([#610](https://www.github.com/googleapis/nodejs-language/issues/610)) ([461baca](https://www.github.com/googleapis/nodejs-language/commit/461bacad4c1c2216e39622b3f82ef634a3665956)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index f124b1355c6..8890f400abe 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [4.3.0](https://www.github.com/googleapis/nodejs-language/compare/v4.2.9...v4.3.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#610](https://www.github.com/googleapis/nodejs-language/issues/610)) ([461baca](https://www.github.com/googleapis/nodejs-language/commit/461bacad4c1c2216e39622b3f82ef634a3665956)) + ### [4.2.9](https://www.github.com/googleapis/nodejs-language/compare/v4.2.8...v4.2.9) (2021-08-17) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 622bc2c565d..a48a0724b27 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.2.9", + "version": "4.3.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 88ab8d8e33f..bee229873ce 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.2.9", + "@google-cloud/language": "^4.3.0", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 65fb3f6ff3296591e6211a743cb04912d6d5b8b2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 23:36:13 +0000 Subject: [PATCH 444/488] chore: disable renovate dependency dashboard (#1194) (#613) --- packages/google-cloud-language/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index ab1b38e15d3..589e76e1589 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -150,8 +150,8 @@ Contributions welcome! See the [Contributing Guide](https://github.com/googleapi Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) are generated from a central template. To edit one of these files, make an edit -to its template in this -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). +to its templates in +[directory](https://github.com/googleapis/synthtool). ## License From 4d999f075750345ec03920898874bebccaa52a58 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 3 Sep 2021 13:42:57 -0400 Subject: [PATCH 445/488] fix(build): migrate to main branch (#614) --- packages/google-cloud-language/README.md | 16 ++++++++-------- packages/google-cloud-language/samples/README.md | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 589e76e1589..25904ed6642 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/language.svg)](https://www.npmjs.org/package/@google-cloud/language) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-language/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-language) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-language/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-language) @@ -17,7 +17,7 @@ analysis, and syntax analysis. This API is part of the larger Cloud Machine Lear A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-language/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-language/blob/main/CHANGELOG.md). * [Natural Language Node.js Client API Reference][client-docs] * [Natural Language Documentation][product-docs] @@ -90,13 +90,13 @@ async function quickstart() { ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | -| Set Endpoint | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/setEndpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) | +| Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Set Endpoint | [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/setEndpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) | @@ -145,7 +145,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-language/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-language/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -157,7 +157,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-language/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-language/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest [product-docs]: https://cloud.google.com/natural-language/docs/ diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 53f347d5a98..191187d14cc 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -35,7 +35,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Analyze v1 -View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js). +View the [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/analyze.v1.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) @@ -52,7 +52,7 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/quickstart.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) @@ -69,7 +69,7 @@ __Usage:__ ### Set Endpoint -View the [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/setEndpoint.js). +View the [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/setEndpoint.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) From 8479261d805607a92d06dbab165a34f45d317b72 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 3 Sep 2021 12:24:45 -0700 Subject: [PATCH 446/488] chore: release 4.3.1 (#615) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 8890f400abe..bf149b01371 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.3.1](https://www.github.com/googleapis/nodejs-language/compare/v4.3.0...v4.3.1) (2021-09-03) + + +### Bug Fixes + +* **build:** migrate to main branch ([#614](https://www.github.com/googleapis/nodejs-language/issues/614)) ([703d479](https://www.github.com/googleapis/nodejs-language/commit/703d47916ba915a0b173dd702c8558e7fedb8a77)) + ## [4.3.0](https://www.github.com/googleapis/nodejs-language/compare/v4.2.9...v4.3.0) (2021-08-23) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index a48a0724b27..f301db59fa9 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.3.0", + "version": "4.3.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index bee229873ce..bd6af6ee395 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^9.0.0", - "@google-cloud/language": "^4.3.0", + "@google-cloud/language": "^4.3.1", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From baf25a7403871e027c09bd2e979d4b3e22bf5db9 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 21 Sep 2021 14:38:17 -0700 Subject: [PATCH 447/488] chore: relocate owl bot post processor (#621) chore: relocate owl bot post processor --- packages/google-cloud-language/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/.github/.OwlBot.yaml b/packages/google-cloud-language/.github/.OwlBot.yaml index daf185e31b0..047cedc2fd1 100644 --- a/packages/google-cloud-language/.github/.OwlBot.yaml +++ b/packages/google-cloud-language/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging From 88c09b2cddd4aac4ba5cb18e28ef8a84be1c9f0a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:44:58 +0000 Subject: [PATCH 448/488] build(node): update deps used during postprocessing (#1243) (#626) --- packages/google-cloud-language/protos/protos.d.ts | 3 ++- packages/google-cloud-language/protos/protos.js | 7 +++++++ packages/google-cloud-language/protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index ea137147fb0..ff51e5cdd4f 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -5977,7 +5977,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } } diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index ad355d5e72c..02056011c8f 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -16343,6 +16343,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -16353,6 +16354,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); @@ -21801,6 +21803,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -21900,6 +21903,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } return message; diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index 61a578c077d..7c597946cec 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -1829,7 +1829,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } } } @@ -2395,6 +2396,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 42c5994b96d230f5a24f345f260467b804e9e750 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Oct 2021 23:18:33 +0200 Subject: [PATCH 449/488] chore(deps): update dependency @types/node to v16 (#628) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.0.0` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.17.32/16.11.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/compatibility-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/confidence-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f301db59fa9..43034ddeacb 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -50,7 +50,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.0", - "@types/node": "^14.0.0", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.0.0", "codecov": "^3.0.2", From eab0109ce916643d66e236a335ae3b904241cf1d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:42:33 +0100 Subject: [PATCH 450/488] chore(deps): update dependency sinon to v12 (#629) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 43034ddeacb..27f8ba42b7f 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -62,7 +62,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 23d61bce9a332d522f7258fcb13e1fa7e39a00d0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 6 Nov 2021 01:28:36 +0100 Subject: [PATCH 451/488] fix(deps): update dependency mathjs to v10 (#630) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index bd6af6ee395..3c82a6cafd5 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/automl": "^2.0.0", - "mathjs": "^9.0.0", + "mathjs": "^10.0.0", "@google-cloud/language": "^4.3.1", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" From 41b2fb3c13463cc96b174de3392bad5ce6f7d588 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:34:20 +0000 Subject: [PATCH 452/488] docs(samples): add example tags to generated samples (#633) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 --- .../linkinator.config.json | 2 +- .../v1/language_service.analyze_entities.js | 56 ++++ ...nguage_service.analyze_entity_sentiment.js | 56 ++++ .../v1/language_service.analyze_sentiment.js | 56 ++++ .../v1/language_service.analyze_syntax.js | 56 ++++ .../v1/language_service.annotate_text.js | 61 +++++ .../v1/language_service.classify_text.js | 52 ++++ .../language_service.analyze_entities.js | 56 ++++ ...nguage_service.analyze_entity_sentiment.js | 56 ++++ .../language_service.analyze_sentiment.js | 57 ++++ .../language_service.analyze_syntax.js | 56 ++++ .../v1beta2/language_service.annotate_text.js | 61 +++++ .../v1beta2/language_service.classify_text.js | 52 ++++ .../src/v1/language_service_client.ts | 252 ++++++++--------- .../src/v1beta2/language_service_client.ts | 254 +++++++++--------- .../test/gapic_language_service_v1.ts | 36 +-- .../test/gapic_language_service_v1beta2.ts | 36 +-- 17 files changed, 977 insertions(+), 278 deletions(-) create mode 100644 packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js create mode 100644 packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js create mode 100644 packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js create mode 100644 packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js create mode 100644 packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js create mode 100644 packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js create mode 100644 packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js create mode 100644 packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js create mode 100644 packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js create mode 100644 packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js create mode 100644 packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js create mode 100644 packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js diff --git a/packages/google-cloud-language/linkinator.config.json b/packages/google-cloud-language/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-language/linkinator.config.json +++ b/packages/google-cloud-language/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js new file mode 100644 index 00000000000..d74f55fa4d5 --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js @@ -0,0 +1,56 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1_generated_LanguageService_AnalyzeEntities_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input document. + */ + // const document = {} + /** + * The encoding type used by the API to calculate offsets. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnalyzeEntities() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.analyzeEntities(request); + console.log(response); + } + + callAnalyzeEntities(); + // [END language_v1_generated_LanguageService_AnalyzeEntities_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js new file mode 100644 index 00000000000..b78fbfc9d6b --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js @@ -0,0 +1,56 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1_generated_LanguageService_AnalyzeEntitySentiment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input document. + */ + // const document = {} + /** + * The encoding type used by the API to calculate offsets. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnalyzeEntitySentiment() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.analyzeEntitySentiment(request); + console.log(response); + } + + callAnalyzeEntitySentiment(); + // [END language_v1_generated_LanguageService_AnalyzeEntitySentiment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js new file mode 100644 index 00000000000..440cec2398d --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js @@ -0,0 +1,56 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1_generated_LanguageService_AnalyzeSentiment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input document. + */ + // const document = {} + /** + * The encoding type used by the API to calculate sentence offsets. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnalyzeSentiment() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.analyzeSentiment(request); + console.log(response); + } + + callAnalyzeSentiment(); + // [END language_v1_generated_LanguageService_AnalyzeSentiment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js new file mode 100644 index 00000000000..402a250e40e --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js @@ -0,0 +1,56 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1_generated_LanguageService_AnalyzeSyntax_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input document. + */ + // const document = {} + /** + * The encoding type used by the API to calculate offsets. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnalyzeSyntax() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.analyzeSyntax(request); + console.log(response); + } + + callAnalyzeSyntax(); + // [END language_v1_generated_LanguageService_AnalyzeSyntax_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js new file mode 100644 index 00000000000..9b2be51bfc4 --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document, features) { + // [START language_v1_generated_LanguageService_AnnotateText_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input document. + */ + // const document = {} + /** + * The enabled features. + */ + // const features = {} + /** + * The encoding type used by the API to calculate offsets. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnnotateText() { + // Construct request + const request = { + document, + features, + }; + + // Run request + const response = await languageClient.annotateText(request); + console.log(response); + } + + callAnnotateText(); + // [END language_v1_generated_LanguageService_AnnotateText_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js new file mode 100644 index 00000000000..b20fb03a568 --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js @@ -0,0 +1,52 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1_generated_LanguageService_ClassifyText_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Input document. + */ + // const document = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callClassifyText() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.classifyText(request); + console.log(response); + } + + callClassifyText(); + // [END language_v1_generated_LanguageService_ClassifyText_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js new file mode 100644 index 00000000000..358fb868823 --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js @@ -0,0 +1,56 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1beta2_generated_LanguageService_AnalyzeEntities_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Input document. + */ + // const document = {} + /** + * The encoding type used by the API to calculate offsets. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1beta2; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnalyzeEntities() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.analyzeEntities(request); + console.log(response); + } + + callAnalyzeEntities(); + // [END language_v1beta2_generated_LanguageService_AnalyzeEntities_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js new file mode 100644 index 00000000000..0061d977863 --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js @@ -0,0 +1,56 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Input document. + */ + // const document = {} + /** + * The encoding type used by the API to calculate offsets. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1beta2; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnalyzeEntitySentiment() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.analyzeEntitySentiment(request); + console.log(response); + } + + callAnalyzeEntitySentiment(); + // [END language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js new file mode 100644 index 00000000000..b27b7eaccae --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js @@ -0,0 +1,57 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1beta2_generated_LanguageService_AnalyzeSentiment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Input document. + */ + // const document = {} + /** + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1beta2; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnalyzeSentiment() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.analyzeSentiment(request); + console.log(response); + } + + callAnalyzeSentiment(); + // [END language_v1beta2_generated_LanguageService_AnalyzeSentiment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js new file mode 100644 index 00000000000..a8a770776ae --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js @@ -0,0 +1,56 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1beta2_generated_LanguageService_AnalyzeSyntax_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Input document. + */ + // const document = {} + /** + * The encoding type used by the API to calculate offsets. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1beta2; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnalyzeSyntax() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.analyzeSyntax(request); + console.log(response); + } + + callAnalyzeSyntax(); + // [END language_v1beta2_generated_LanguageService_AnalyzeSyntax_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js new file mode 100644 index 00000000000..61ffb0a1248 --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document, features) { + // [START language_v1beta2_generated_LanguageService_AnnotateText_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Input document. + */ + // const document = {} + /** + * Required. The enabled features. + */ + // const features = {} + /** + * The encoding type used by the API to calculate offsets. + */ + // const encodingType = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1beta2; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callAnnotateText() { + // Construct request + const request = { + document, + features, + }; + + // Run request + const response = await languageClient.annotateText(request); + console.log(response); + } + + callAnnotateText(); + // [END language_v1beta2_generated_LanguageService_AnnotateText_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js new file mode 100644 index 00000000000..e4c448c04a8 --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js @@ -0,0 +1,52 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(document) { + // [START language_v1beta2_generated_LanguageService_ClassifyText_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Input document. + */ + // const document = {} + + // Imports the Language library + const {LanguageServiceClient} = require('@google-cloud/language').v1beta2; + + // Instantiates a client + const languageClient = new LanguageServiceClient(); + + async function callClassifyText() { + // Construct request + const request = { + document, + }; + + // Run request + const response = await languageClient.classifyText(request); + console.log(response); + } + + callClassifyText(); + // [END language_v1beta2_generated_LanguageService_ClassifyText_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index aa13ba11105..7e1e65c44b3 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -292,6 +292,25 @@ export class LanguageServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate sentence offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/language_service.analyze_sentiment.js + * region_tag:language_v1_generated_LanguageService_AnalyzeSentiment_async + */ analyzeSentiment( request?: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, options?: CallOptions @@ -323,25 +342,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate sentence offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1.AnalyzeSentimentResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.analyzeSentiment(request); - */ analyzeSentiment( request?: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, optionsOrCallback?: @@ -376,9 +376,32 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.analyzeSentiment(request, options, callback); } + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/language_service.analyze_entities.js + * region_tag:language_v1_generated_LanguageService_AnalyzeEntities_async + */ analyzeEntities( request?: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, options?: CallOptions @@ -410,27 +433,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1.AnalyzeEntitiesResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.analyzeEntities(request); - */ analyzeEntities( request?: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, optionsOrCallback?: @@ -465,9 +467,31 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.analyzeEntities(request, options, callback); } + /** + * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/language_service.analyze_entity_sentiment.js + * region_tag:language_v1_generated_LanguageService_AnalyzeEntitySentiment_async + */ analyzeEntitySentiment( request?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, options?: CallOptions @@ -502,26 +526,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1.AnalyzeEntitySentimentResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.analyzeEntitySentiment(request); - */ analyzeEntitySentiment( request?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, optionsOrCallback?: @@ -559,6 +563,8 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.analyzeEntitySentiment( request, @@ -566,6 +572,27 @@ export class LanguageServiceClient { callback ); } + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/language_service.analyze_syntax.js + * region_tag:language_v1_generated_LanguageService_AnalyzeSyntax_async + */ analyzeSyntax( request?: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, options?: CallOptions @@ -593,27 +620,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1.AnalyzeSyntaxResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.analyzeSyntax(request); - */ analyzeSyntax( request?: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, optionsOrCallback?: @@ -646,9 +652,28 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.analyzeSyntax(request, options, callback); } + /** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/language_service.classify_text.js + * region_tag:language_v1_generated_LanguageService_ClassifyText_async + */ classifyText( request?: protos.google.cloud.language.v1.IClassifyTextRequest, options?: CallOptions @@ -676,23 +701,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Classifies a document into categories. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1.ClassifyTextResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.classifyText(request); - */ classifyText( request?: protos.google.cloud.language.v1.IClassifyTextRequest, optionsOrCallback?: @@ -725,9 +733,33 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.classifyText(request, options, callback); } + /** + * A convenience method that provides all the features that analyzeSentiment, + * analyzeEntities, and analyzeSyntax provide in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1.Document} request.document + * Input document. + * @param {google.cloud.language.v1.AnnotateTextRequest.Features} request.features + * The enabled features. + * @param {google.cloud.language.v1.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/language_service.annotate_text.js + * region_tag:language_v1_generated_LanguageService_AnnotateText_async + */ annotateText( request?: protos.google.cloud.language.v1.IAnnotateTextRequest, options?: CallOptions @@ -755,28 +787,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * A convenience method that provides all the features that analyzeSentiment, - * analyzeEntities, and analyzeSyntax provide in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1.Document} request.document - * Input document. - * @param {google.cloud.language.v1.AnnotateTextRequest.Features} request.features - * The enabled features. - * @param {google.cloud.language.v1.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1.AnnotateTextResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.annotateText(request); - */ annotateText( request?: protos.google.cloud.language.v1.IAnnotateTextRequest, optionsOrCallback?: @@ -809,6 +819,8 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.annotateText(request, options, callback); } diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 1375ddf5176..b64ddee179d 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -292,6 +292,26 @@ export class LanguageServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Analyzes the sentiment of the provided text. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/language_service.analyze_sentiment.js + * region_tag:language_v1beta2_generated_LanguageService_AnalyzeSentiment_async + */ analyzeSentiment( request?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, options?: CallOptions @@ -323,26 +343,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Analyzes the sentiment of the provided text. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeSentimentResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.analyzeSentiment(request); - */ analyzeSentiment( request?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, optionsOrCallback?: @@ -377,9 +377,32 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.analyzeSentiment(request, options, callback); } + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/language_service.analyze_entities.js + * region_tag:language_v1beta2_generated_LanguageService_AnalyzeEntities_async + */ analyzeEntities( request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, options?: CallOptions @@ -411,27 +434,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitiesResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitiesResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.analyzeEntities(request); - */ analyzeEntities( request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, optionsOrCallback?: @@ -466,9 +468,31 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.analyzeEntities(request, options, callback); } + /** + * Finds entities, similar to {@link google.cloud.language.v1beta2.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/language_service.analyze_entity_sentiment.js + * region_tag:language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_async + */ analyzeEntitySentiment( request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, options?: CallOptions @@ -503,26 +527,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Finds entities, similar to {@link google.cloud.language.v1beta2.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeEntitySentimentResponse]{@link google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.analyzeEntitySentiment(request); - */ analyzeEntitySentiment( request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, optionsOrCallback?: @@ -560,6 +564,8 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.analyzeEntitySentiment( request, @@ -567,6 +573,27 @@ export class LanguageServiceClient { callback ); } + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part-of-speech tags, dependency trees, and other + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/language_service.analyze_syntax.js + * region_tag:language_v1beta2_generated_LanguageService_AnalyzeSyntax_async + */ analyzeSyntax( request?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, options?: CallOptions @@ -598,27 +625,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part-of-speech tags, dependency trees, and other - * properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnalyzeSyntaxResponse]{@link google.cloud.language.v1beta2.AnalyzeSyntaxResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.analyzeSyntax(request); - */ analyzeSyntax( request?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, optionsOrCallback?: @@ -653,9 +659,28 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.analyzeSyntax(request, options, callback); } + /** + * Classifies a document into categories. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/language_service.classify_text.js + * region_tag:language_v1beta2_generated_LanguageService_ClassifyText_async + */ classifyText( request?: protos.google.cloud.language.v1beta2.IClassifyTextRequest, options?: CallOptions @@ -687,23 +712,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * Classifies a document into categories. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ClassifyTextResponse]{@link google.cloud.language.v1beta2.ClassifyTextResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.classifyText(request); - */ classifyText( request?: protos.google.cloud.language.v1beta2.IClassifyTextRequest, optionsOrCallback?: @@ -738,9 +746,33 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.classifyText(request, options, callback); } + /** + * A convenience method that provides all syntax, sentiment, entity, and + * classification features in one call. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.language.v1beta2.Document} request.document + * Required. Input document. + * @param {google.cloud.language.v1beta2.AnnotateTextRequest.Features} request.features + * Required. The enabled features. + * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType + * The encoding type used by the API to calculate offsets. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/language_service.annotate_text.js + * region_tag:language_v1beta2_generated_LanguageService_AnnotateText_async + */ annotateText( request?: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, options?: CallOptions @@ -772,28 +804,6 @@ export class LanguageServiceClient { {} | null | undefined > ): void; - /** - * A convenience method that provides all syntax, sentiment, entity, and - * classification features in one call. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.language.v1beta2.Document} request.document - * Required. Input document. - * @param {google.cloud.language.v1beta2.AnnotateTextRequest.Features} request.features - * Required. The enabled features. - * @param {google.cloud.language.v1beta2.EncodingType} request.encodingType - * The encoding type used by the API to calculate offsets. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AnnotateTextResponse]{@link google.cloud.language.v1beta2.AnnotateTextResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.annotateText(request); - */ annotateText( request?: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, optionsOrCallback?: @@ -828,6 +838,8 @@ export class LanguageServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.annotateText(request, options, callback); } diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index 12b85705fa4..67dc6b26acc 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -142,7 +142,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentResponse() ); @@ -165,7 +165,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentResponse() ); @@ -204,7 +204,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeSentiment = stubSimpleCall( undefined, @@ -229,7 +229,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() ); @@ -252,7 +252,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() ); @@ -291,7 +291,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeEntities = stubSimpleCall( undefined, @@ -316,7 +316,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() ); @@ -340,7 +340,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() ); @@ -379,7 +379,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( undefined, @@ -407,7 +407,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() ); @@ -430,7 +430,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() ); @@ -469,7 +469,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeSyntax = stubSimpleCall( undefined, @@ -494,7 +494,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextResponse() ); @@ -517,7 +517,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextResponse() ); @@ -556,7 +556,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.classifyText = stubSimpleCall( undefined, @@ -581,7 +581,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextResponse() ); @@ -604,7 +604,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextResponse() ); @@ -643,7 +643,7 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.annotateText = stubSimpleCall( undefined, diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 2453d4e0e46..01594d26a87 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -142,7 +142,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() ); @@ -165,7 +165,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() ); @@ -204,7 +204,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeSentiment = stubSimpleCall( undefined, @@ -229,7 +229,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() ); @@ -252,7 +252,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() ); @@ -291,7 +291,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeEntities = stubSimpleCall( undefined, @@ -316,7 +316,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() ); @@ -340,7 +340,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() ); @@ -379,7 +379,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( undefined, @@ -407,7 +407,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() ); @@ -430,7 +430,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() ); @@ -469,7 +469,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeSyntax = stubSimpleCall( undefined, @@ -494,7 +494,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextResponse() ); @@ -517,7 +517,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextResponse() ); @@ -556,7 +556,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.classifyText = stubSimpleCall( undefined, @@ -581,7 +581,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextResponse() ); @@ -604,7 +604,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextResponse() ); @@ -643,7 +643,7 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.annotateText = stubSimpleCall( undefined, From 06e302b4c12f8e9260f05745eba8b8192c1c08f4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:52:24 +0000 Subject: [PATCH 453/488] chore: release 4.3.2 (#632) :robot: I have created a release \*beep\* \*boop\* --- ### [4.3.2](https://www.github.com/googleapis/nodejs-language/compare/v4.3.1...v4.3.2) (2021-11-10) ### Bug Fixes * **deps:** update dependency mathjs to v10 ([#630](https://www.github.com/googleapis/nodejs-language/issues/630)) ([24a189d](https://www.github.com/googleapis/nodejs-language/commit/24a189d1cd2dc68f772f2530684612b4d6ebc2ec)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index bf149b01371..42965e22f0e 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +### [4.3.2](https://www.github.com/googleapis/nodejs-language/compare/v4.3.1...v4.3.2) (2021-11-10) + + +### Bug Fixes + +* **deps:** update dependency mathjs to v10 ([#630](https://www.github.com/googleapis/nodejs-language/issues/630)) ([24a189d](https://www.github.com/googleapis/nodejs-language/commit/24a189d1cd2dc68f772f2530684612b4d6ebc2ec)) + ### [4.3.1](https://www.github.com/googleapis/nodejs-language/compare/v4.3.0...v4.3.1) (2021-09-03) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 27f8ba42b7f..46ba2231d47 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.3.1", + "version": "4.3.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 3c82a6cafd5..c755c16f5b1 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^10.0.0", - "@google-cloud/language": "^4.3.1", + "@google-cloud/language": "^4.3.2", "@google-cloud/storage": "^5.0.0", "yargs": "^16.0.0" }, From 68e8a40786d223c69cff649c2a39d3bf901f84c6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 9 Dec 2021 23:00:24 +0000 Subject: [PATCH 454/488] build: add generated samples to .eslintignore (#634) --- packages/google-cloud-language/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-language/.eslintignore b/packages/google-cloud-language/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-language/.eslintignore +++ b/packages/google-cloud-language/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From a2b70ca44b749a31ab9a61bf76915499b0144cb9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 19:54:19 +0000 Subject: [PATCH 455/488] docs(node): support "stable"/"preview" release level (#1312) (#637) --- packages/google-cloud-language/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 25904ed6642..991b6cf0327 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -139,6 +139,8 @@ are addressed with the highest priority. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 8d99a5432eca0ff8142bb79f56d50e15ccb0d410 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 23:12:29 +0000 Subject: [PATCH 456/488] docs(badges): tweak badge to use new preview/stable language (#1314) (#638) --- packages/google-cloud-language/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 991b6cf0327..1782ade875a 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -6,7 +6,6 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/language.svg)](https://www.npmjs.org/package/@google-cloud/language) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-language/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-language) From 90c918cefa23457324915ea15914045b35593c7c Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 19:02:16 -0500 Subject: [PATCH 457/488] chore: add api_shortname and library_type to repo metadata (#636) Update .repo-metadata.json as required by go/library-data-integrity --- packages/google-cloud-language/.repo-metadata.json | 6 ++++-- packages/google-cloud-language/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-language/.repo-metadata.json b/packages/google-cloud-language/.repo-metadata.json index 61cffdc7b34..d8e23638f96 100644 --- a/packages/google-cloud-language/.repo-metadata.json +++ b/packages/google-cloud-language/.repo-metadata.json @@ -1,6 +1,6 @@ { "default_version": "v1", - "release_level": "ga", + "release_level": "stable", "requires_billing": true, "client_documentation": "https://cloud.google.com/nodejs/docs/reference/language/latest", "codeowner_team": "@googleapis/ml-apis", @@ -11,5 +11,7 @@ "distribution_name": "@google-cloud/language", "name_pretty": "Natural Language", "api_id": "language.googleapis.com", - "repo": "googleapis/nodejs-language" + "repo": "googleapis/nodejs-language", + "api_shortname": "language", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 1782ade875a..4efc802100d 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -4,7 +4,7 @@ # [Natural Language: Node.js Client](https://github.com/googleapis/nodejs-language) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/language.svg)](https://www.npmjs.org/package/@google-cloud/language) @@ -128,10 +128,10 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -139,7 +139,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 1228ab12ea68fa2863aaee742a80c4a81e558988 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:06:42 +0000 Subject: [PATCH 458/488] test(nodejs): remove 15 add 16 (#1322) (#640) --- packages/google-cloud-language/protos/protos.d.ts | 2 +- packages/google-cloud-language/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index ff51e5cdd4f..f4d5a07c1e0 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 02056011c8f..306c5c83c96 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 8083c38b26d7661fd49800ae4db0c17d2ed9a6ea Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 26 Jan 2022 20:02:15 +0000 Subject: [PATCH 459/488] chore: update v2.12.0 gapic-generator-typescript (#645) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- packages/google-cloud-language/.jsdoc.js | 4 ++-- packages/google-cloud-language/linkinator.config.json | 10 ++++++++-- .../generated/v1/language_service.analyze_entities.js | 1 + .../v1/language_service.analyze_entity_sentiment.js | 1 + .../generated/v1/language_service.analyze_sentiment.js | 1 + .../generated/v1/language_service.analyze_syntax.js | 1 + .../generated/v1/language_service.annotate_text.js | 1 + .../generated/v1/language_service.classify_text.js | 1 + .../v1beta2/language_service.analyze_entities.js | 1 + .../language_service.analyze_entity_sentiment.js | 1 + .../v1beta2/language_service.analyze_sentiment.js | 1 + .../v1beta2/language_service.analyze_syntax.js | 1 + .../v1beta2/language_service.annotate_text.js | 1 + .../v1beta2/language_service.classify_text.js | 1 + packages/google-cloud-language/src/v1/index.ts | 2 +- .../src/v1/language_service_client.ts | 2 +- packages/google-cloud-language/src/v1beta2/index.ts | 2 +- .../src/v1beta2/language_service_client.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-language/system-test/install.ts | 2 +- .../test/gapic_language_service_v1.ts | 2 +- .../test/gapic_language_service_v1beta2.ts | 2 +- 23 files changed, 31 insertions(+), 13 deletions(-) diff --git a/packages/google-cloud-language/.jsdoc.js b/packages/google-cloud-language/.jsdoc.js index 1bf22dc4420..7961113291c 100644 --- a/packages/google-cloud-language/.jsdoc.js +++ b/packages/google-cloud-language/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/language', diff --git a/packages/google-cloud-language/linkinator.config.json b/packages/google-cloud-language/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-cloud-language/linkinator.config.json +++ b/packages/google-cloud-language/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js index d74f55fa4d5..d85d12658d8 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js index b78fbfc9d6b..1cbd18cbc2a 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js index 440cec2398d..9127675f5ab 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js index 402a250e40e..a76c068b718 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js index 9b2be51bfc4..f5205a407e5 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document, features) { diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js index b20fb03a568..9d8ca8830f2 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js index 358fb868823..455a7810e7e 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js index 0061d977863..41aa78c26d2 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js index b27b7eaccae..8c705a72ca1 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js index a8a770776ae..1ec5203cfa7 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js index 61ffb0a1248..5636e3d7c9d 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document, features) { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js index e4c448c04a8..340c968e1a6 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(document) { diff --git a/packages/google-cloud-language/src/v1/index.ts b/packages/google-cloud-language/src/v1/index.ts index 6880d48ddc6..7e077a202c6 100644 --- a/packages/google-cloud-language/src/v1/index.ts +++ b/packages/google-cloud-language/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 7e1e65c44b3..3c22706c714 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1beta2/index.ts b/packages/google-cloud-language/src/v1beta2/index.ts index 6880d48ddc6..7e077a202c6 100644 --- a/packages/google-cloud-language/src/v1beta2/index.ts +++ b/packages/google-cloud-language/src/v1beta2/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index b64ddee179d..74dd5238e89 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js index ce5d6334438..e43e3ad5c54 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts index dcde00bc256..67dcd47c266 100644 --- a/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-language/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/system-test/install.ts b/packages/google-cloud-language/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-cloud-language/system-test/install.ts +++ b/packages/google-cloud-language/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index 67dc6b26acc..4ecac6a76b8 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 01594d26a87..6549f017d0a 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From ed80de2e0bebca6b496ef43738416fb6682313e3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 31 Jan 2022 23:34:36 +0100 Subject: [PATCH 460/488] chore(deps): update dependency sinon to v13 (#647) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 46ba2231d47..fbbd969bbb0 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -62,7 +62,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 33e2c5b0e6c56946f2eb87e2f8e02bfd51acee8a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 22:04:47 +0000 Subject: [PATCH 461/488] docs(nodejs): version support policy edits (#1346) (#649) --- packages/google-cloud-language/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 4efc802100d..02128d65cc3 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -107,21 +107,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/language@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From 385df0ea88ce040f68c6fc0009d54db3e883b741 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 00:56:52 +0000 Subject: [PATCH 462/488] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#650) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../v1/language_service.analyze_entities.js | 9 +- ...nguage_service.analyze_entity_sentiment.js | 9 +- .../v1/language_service.analyze_sentiment.js | 9 +- .../v1/language_service.analyze_syntax.js | 9 +- .../v1/language_service.annotate_text.js | 9 +- .../v1/language_service.classify_text.js | 9 +- ...pet_metadata.google.cloud.language.v1.json | 279 ++++++++++++++++++ .../language_service.analyze_entities.js | 9 +- ...nguage_service.analyze_entity_sentiment.js | 9 +- .../language_service.analyze_sentiment.js | 9 +- .../language_service.analyze_syntax.js | 9 +- .../v1beta2/language_service.annotate_text.js | 9 +- .../v1beta2/language_service.classify_text.js | 9 +- ...etadata.google.cloud.language.v1beta2.json | 279 ++++++++++++++++++ .../src/v1/language_service_client.ts | 5 +- .../src/v1beta2/language_service_client.ts | 5 +- .../test/gapic_language_service_v1.ts | 106 ++++++- .../test/gapic_language_service_v1beta2.ts | 106 ++++++- 18 files changed, 854 insertions(+), 34 deletions(-) create mode 100644 packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json create mode 100644 packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js index d85d12658d8..c51b14831dc 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js index 1cbd18cbc2a..59d0340906d 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js index 9127675f5ab..e16a69be3fa 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js index a76c068b718..89bc540ec7e 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js index f5205a407e5..fb978dde245 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js index 9d8ca8830f2..81a04f8cd99 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json new file mode 100644 index 00000000000..6f66069f90d --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -0,0 +1,279 @@ +{ + "clientLibrary": { + "name": "nodejs-language", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.language.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "language_v1_generated_LanguageService_AnalyzeSentiment_async", + "title": "LanguageService analyzeSentiment Sample", + "origin": "API_DEFINITION", + "description": " Analyzes the sentiment of the provided text.", + "canonical": true, + "file": "language_service.analyze_sentiment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeSentiment", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSentiment", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnalyzeSentimentResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeSentiment", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSentiment", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1_generated_LanguageService_AnalyzeEntities_async", + "title": "LanguageService analyzeEntities Sample", + "origin": "API_DEFINITION", + "description": " Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.", + "canonical": true, + "file": "language_service.analyze_entities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeEntities", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntities", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnalyzeEntitiesResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeEntities", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntities", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1_generated_LanguageService_AnalyzeEntitySentiment_async", + "title": "LanguageService analyzeEntitySentiment Sample", + "origin": "API_DEFINITION", + "description": " Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes sentiment associated with each entity and its mentions.", + "canonical": true, + "file": "language_service.analyze_entity_sentiment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeEntitySentiment", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntitySentiment", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnalyzeEntitySentimentResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeEntitySentiment", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntitySentiment", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1_generated_LanguageService_AnalyzeSyntax_async", + "title": "LanguageService analyzeSyntax Sample", + "origin": "API_DEFINITION", + "description": " Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.", + "canonical": true, + "file": "language_service.analyze_syntax.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeSyntax", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSyntax", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnalyzeSyntaxResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeSyntax", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSyntax", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1_generated_LanguageService_ClassifyText_async", + "title": "LanguageService classifyText Sample", + "origin": "API_DEFINITION", + "description": " Classifies a document into categories.", + "canonical": true, + "file": "language_service.classify_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ClassifyText", + "fullName": "google.cloud.language.v1.LanguageService.ClassifyText", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + } + ], + "resultType": ".google.cloud.language.v1.ClassifyTextResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "ClassifyText", + "fullName": "google.cloud.language.v1.LanguageService.ClassifyText", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1_generated_LanguageService_AnnotateText_async", + "title": "LanguageService annotateText Sample", + "origin": "API_DEFINITION", + "description": " A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.", + "canonical": true, + "file": "language_service.annotate_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnnotateText", + "fullName": "google.cloud.language.v1.LanguageService.AnnotateText", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "features", + "type": ".google.cloud.language.v1.AnnotateTextRequest.Features" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnnotateTextResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnnotateText", + "fullName": "google.cloud.language.v1.LanguageService.AnnotateText", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js index 455a7810e7e..61da1c26131 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js index 41aa78c26d2..f7fbf3b4d56 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js index 8c705a72ca1..8bf110baa0a 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js index 1ec5203cfa7..2d928214fb6 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js index 5636e3d7c9d..b8b0239aed2 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js index 340c968e1a6..e7b868ca67c 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json new file mode 100644 index 00000000000..b46b91a8dfb --- /dev/null +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -0,0 +1,279 @@ +{ + "clientLibrary": { + "name": "nodejs-language", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.language.v1beta2", + "version": "v1beta2" + } + ] + }, + "snippets": [ + { + "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeSentiment_async", + "title": "LanguageService analyzeSentiment Sample", + "origin": "API_DEFINITION", + "description": " Analyzes the sentiment of the provided text.", + "canonical": true, + "file": "language_service.analyze_sentiment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeSentiment", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSentiment", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnalyzeSentimentResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeSentiment", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSentiment", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeEntities_async", + "title": "LanguageService analyzeEntities Sample", + "origin": "API_DEFINITION", + "description": " Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.", + "canonical": true, + "file": "language_service.analyze_entities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeEntities", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntities", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnalyzeEntitiesResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeEntities", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntities", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_async", + "title": "LanguageService analyzeEntitySentiment Sample", + "origin": "API_DEFINITION", + "description": " Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes sentiment associated with each entity and its mentions.", + "canonical": true, + "file": "language_service.analyze_entity_sentiment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeEntitySentiment", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentiment", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeEntitySentiment", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentiment", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeSyntax_async", + "title": "LanguageService analyzeSyntax Sample", + "origin": "API_DEFINITION", + "description": " Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part-of-speech tags, dependency trees, and other properties.", + "canonical": true, + "file": "language_service.analyze_syntax.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeSyntax", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSyntax", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnalyzeSyntaxResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeSyntax", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSyntax", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1beta2_generated_LanguageService_ClassifyText_async", + "title": "LanguageService classifyText Sample", + "origin": "API_DEFINITION", + "description": " Classifies a document into categories.", + "canonical": true, + "file": "language_service.classify_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ClassifyText", + "fullName": "google.cloud.language.v1beta2.LanguageService.ClassifyText", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + } + ], + "resultType": ".google.cloud.language.v1beta2.ClassifyTextResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "ClassifyText", + "fullName": "google.cloud.language.v1beta2.LanguageService.ClassifyText", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } + }, + { + "regionTag": "language_v1beta2_generated_LanguageService_AnnotateText_async", + "title": "LanguageService annotateText Sample", + "origin": "API_DEFINITION", + "description": " A convenience method that provides all syntax, sentiment, entity, and classification features in one call.", + "canonical": true, + "file": "language_service.annotate_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnnotateText", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnnotateText", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "features", + "type": ".google.cloud.language.v1beta2.AnnotateTextRequest.Features" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnnotateTextResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnnotateText", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnnotateText", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 3c22706c714..b1dcca7f95d 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -832,9 +832,8 @@ export class LanguageServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.languageServiceStub!.then(stub => { + if (this.languageServiceStub && !this._terminated) { + return this.languageServiceStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 74dd5238e89..8eed5d7d5bb 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -851,9 +851,8 @@ export class LanguageServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.languageServiceStub!.then(stub => { + if (this.languageServiceStub && !this._terminated) { + return this.languageServiceStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index 4ecac6a76b8..e109c2e543c 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -90,12 +90,27 @@ describe('v1.LanguageServiceClient', () => { assert(client.languageServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new languageserviceModule.v1.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.languageServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -217,6 +232,20 @@ describe('v1.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes analyzeSentiment with closed client', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSentimentRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.analyzeSentiment(request), expectedError); + }); }); describe('analyzeEntities', () => { @@ -304,6 +333,20 @@ describe('v1.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes analyzeEntities with closed client', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.analyzeEntities(request), expectedError); + }); }); describe('analyzeEntitySentiment', () => { @@ -395,6 +438,23 @@ describe('v1.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes analyzeEntitySentiment with closed client', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.analyzeEntitySentiment(request), + expectedError + ); + }); }); describe('analyzeSyntax', () => { @@ -482,6 +542,20 @@ describe('v1.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes analyzeSyntax with closed client', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.analyzeSyntax(request), expectedError); + }); }); describe('classifyText', () => { @@ -569,6 +643,20 @@ describe('v1.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes classifyText with closed client', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.ClassifyTextRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.classifyText(request), expectedError); + }); }); describe('annotateText', () => { @@ -656,5 +744,19 @@ describe('v1.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes annotateText with closed client', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1.AnnotateTextRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.annotateText(request), expectedError); + }); }); }); diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 6549f017d0a..75993cffeed 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -90,12 +90,27 @@ describe('v1beta2.LanguageServiceClient', () => { assert(client.languageServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new languageserviceModule.v1beta2.LanguageServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.languageServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -217,6 +232,20 @@ describe('v1beta2.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes analyzeSentiment with closed client', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.analyzeSentiment(request), expectedError); + }); }); describe('analyzeEntities', () => { @@ -304,6 +333,20 @@ describe('v1beta2.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes analyzeEntities with closed client', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.analyzeEntities(request), expectedError); + }); }); describe('analyzeEntitySentiment', () => { @@ -395,6 +438,23 @@ describe('v1beta2.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes analyzeEntitySentiment with closed client', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.analyzeEntitySentiment(request), + expectedError + ); + }); }); describe('analyzeSyntax', () => { @@ -482,6 +542,20 @@ describe('v1beta2.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes analyzeSyntax with closed client', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.analyzeSyntax(request), expectedError); + }); }); describe('classifyText', () => { @@ -569,6 +643,20 @@ describe('v1beta2.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes classifyText with closed client', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.ClassifyTextRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.classifyText(request), expectedError); + }); }); describe('annotateText', () => { @@ -656,5 +744,19 @@ describe('v1beta2.LanguageServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes annotateText with closed client', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.language.v1beta2.AnnotateTextRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.annotateText(request), expectedError); + }); }); }); From d4a95aa5ee5e868b96d9c8ffe9bb083fd87323e2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 02:36:16 +0000 Subject: [PATCH 463/488] build(node): update client library version in samples metadata (#1356) (#660) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 --- ...pet_metadata.google.cloud.language.v1.json | 532 +++++++++--------- ...etadata.google.cloud.language.v1beta2.json | 532 +++++++++--------- 2 files changed, 532 insertions(+), 532 deletions(-) diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index 6f66069f90d..81796cc7663 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -1,279 +1,279 @@ { - "clientLibrary": { - "name": "nodejs-language", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.language.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "language_v1_generated_LanguageService_AnalyzeSentiment_async", - "title": "LanguageService analyzeSentiment Sample", - "origin": "API_DEFINITION", - "description": " Analyzes the sentiment of the provided text.", - "canonical": true, - "file": "language_service.analyze_sentiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnalyzeSentiment", - "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSentiment", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1.Document" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1.AnalyzeSentimentResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1.LanguageServiceClient" - }, - "method": { - "shortName": "AnalyzeSentiment", - "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSentiment", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1.LanguageService" - } - } - } + "clientLibrary": { + "name": "nodejs-language", + "version": "4.3.2", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.language.v1", + "version": "v1" + } + ] }, - { - "regionTag": "language_v1_generated_LanguageService_AnalyzeEntities_async", - "title": "LanguageService analyzeEntities Sample", - "origin": "API_DEFINITION", - "description": " Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.", - "canonical": true, - "file": "language_service.analyze_entities.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnalyzeEntities", - "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntities", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1.Document" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1.AnalyzeEntitiesResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1.LanguageServiceClient" + "regionTag": "language_v1_generated_LanguageService_AnalyzeSentiment_async", + "title": "LanguageService analyzeSentiment Sample", + "origin": "API_DEFINITION", + "description": " Analyzes the sentiment of the provided text.", + "canonical": true, + "file": "language_service.analyze_sentiment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeSentiment", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSentiment", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnalyzeSentimentResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeSentiment", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSentiment", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } }, - "method": { - "shortName": "AnalyzeEntities", - "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntities", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1.LanguageService" - } - } - } - }, - { - "regionTag": "language_v1_generated_LanguageService_AnalyzeEntitySentiment_async", - "title": "LanguageService analyzeEntitySentiment Sample", - "origin": "API_DEFINITION", - "description": " Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes sentiment associated with each entity and its mentions.", - "canonical": true, - "file": "language_service.analyze_entity_sentiment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnalyzeEntitySentiment", - "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntitySentiment", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1.Document" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1.AnalyzeEntitySentimentResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1.LanguageServiceClient" + "regionTag": "language_v1_generated_LanguageService_AnalyzeEntities_async", + "title": "LanguageService analyzeEntities Sample", + "origin": "API_DEFINITION", + "description": " Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.", + "canonical": true, + "file": "language_service.analyze_entities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeEntities", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntities", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnalyzeEntitiesResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeEntities", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntities", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } }, - "method": { - "shortName": "AnalyzeEntitySentiment", - "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntitySentiment", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1.LanguageService" - } - } - } - }, - { - "regionTag": "language_v1_generated_LanguageService_AnalyzeSyntax_async", - "title": "LanguageService analyzeSyntax Sample", - "origin": "API_DEFINITION", - "description": " Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.", - "canonical": true, - "file": "language_service.analyze_syntax.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnalyzeSyntax", - "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSyntax", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1.Document" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1.AnalyzeSyntaxResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1.LanguageServiceClient" + "regionTag": "language_v1_generated_LanguageService_AnalyzeEntitySentiment_async", + "title": "LanguageService analyzeEntitySentiment Sample", + "origin": "API_DEFINITION", + "description": " Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes sentiment associated with each entity and its mentions.", + "canonical": true, + "file": "language_service.analyze_entity_sentiment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeEntitySentiment", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntitySentiment", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnalyzeEntitySentimentResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeEntitySentiment", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeEntitySentiment", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } }, - "method": { - "shortName": "AnalyzeSyntax", - "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSyntax", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1.LanguageService" - } - } - } - }, - { - "regionTag": "language_v1_generated_LanguageService_ClassifyText_async", - "title": "LanguageService classifyText Sample", - "origin": "API_DEFINITION", - "description": " Classifies a document into categories.", - "canonical": true, - "file": "language_service.classify_text.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ClassifyText", - "fullName": "google.cloud.language.v1.LanguageService.ClassifyText", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1.Document" - } - ], - "resultType": ".google.cloud.language.v1.ClassifyTextResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1.LanguageServiceClient" + "regionTag": "language_v1_generated_LanguageService_AnalyzeSyntax_async", + "title": "LanguageService analyzeSyntax Sample", + "origin": "API_DEFINITION", + "description": " Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.", + "canonical": true, + "file": "language_service.analyze_syntax.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeSyntax", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSyntax", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnalyzeSyntaxResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeSyntax", + "fullName": "google.cloud.language.v1.LanguageService.AnalyzeSyntax", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } }, - "method": { - "shortName": "ClassifyText", - "fullName": "google.cloud.language.v1.LanguageService.ClassifyText", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1.LanguageService" - } - } - } - }, - { - "regionTag": "language_v1_generated_LanguageService_AnnotateText_async", - "title": "LanguageService annotateText Sample", - "origin": "API_DEFINITION", - "description": " A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.", - "canonical": true, - "file": "language_service.annotate_text.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnnotateText", - "fullName": "google.cloud.language.v1.LanguageService.AnnotateText", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1.Document" - }, - { - "name": "features", - "type": ".google.cloud.language.v1.AnnotateTextRequest.Features" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1.AnnotateTextResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1.LanguageServiceClient" + "regionTag": "language_v1_generated_LanguageService_ClassifyText_async", + "title": "LanguageService classifyText Sample", + "origin": "API_DEFINITION", + "description": " Classifies a document into categories.", + "canonical": true, + "file": "language_service.classify_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ClassifyText", + "fullName": "google.cloud.language.v1.LanguageService.ClassifyText", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + } + ], + "resultType": ".google.cloud.language.v1.ClassifyTextResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "ClassifyText", + "fullName": "google.cloud.language.v1.LanguageService.ClassifyText", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } }, - "method": { - "shortName": "AnnotateText", - "fullName": "google.cloud.language.v1.LanguageService.AnnotateText", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1.LanguageService" - } + { + "regionTag": "language_v1_generated_LanguageService_AnnotateText_async", + "title": "LanguageService annotateText Sample", + "origin": "API_DEFINITION", + "description": " A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.", + "canonical": true, + "file": "language_service.annotate_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnnotateText", + "fullName": "google.cloud.language.v1.LanguageService.AnnotateText", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1.Document" + }, + { + "name": "features", + "type": ".google.cloud.language.v1.AnnotateTextRequest.Features" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1.AnnotateTextResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1.LanguageServiceClient" + }, + "method": { + "shortName": "AnnotateText", + "fullName": "google.cloud.language.v1.LanguageService.AnnotateText", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1.LanguageService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index b46b91a8dfb..c03cbce58a3 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -1,279 +1,279 @@ { - "clientLibrary": { - "name": "nodejs-language", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.language.v1beta2", - "version": "v1beta2" - } - ] - }, - "snippets": [ - { - "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeSentiment_async", - "title": "LanguageService analyzeSentiment Sample", - "origin": "API_DEFINITION", - "description": " Analyzes the sentiment of the provided text.", - "canonical": true, - "file": "language_service.analyze_sentiment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnalyzeSentiment", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSentiment", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1beta2.Document" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1beta2.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1beta2.AnalyzeSentimentResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" - }, - "method": { - "shortName": "AnalyzeSentiment", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSentiment", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1beta2.LanguageService" - } - } - } + "clientLibrary": { + "name": "nodejs-language", + "version": "4.3.2", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.language.v1beta2", + "version": "v1beta2" + } + ] }, - { - "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeEntities_async", - "title": "LanguageService analyzeEntities Sample", - "origin": "API_DEFINITION", - "description": " Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.", - "canonical": true, - "file": "language_service.analyze_entities.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnalyzeEntities", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntities", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1beta2.Document" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1beta2.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1beta2.AnalyzeEntitiesResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeSentiment_async", + "title": "LanguageService analyzeSentiment Sample", + "origin": "API_DEFINITION", + "description": " Analyzes the sentiment of the provided text.", + "canonical": true, + "file": "language_service.analyze_sentiment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeSentiment", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSentiment", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnalyzeSentimentResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeSentiment", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSentiment", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } }, - "method": { - "shortName": "AnalyzeEntities", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntities", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1beta2.LanguageService" - } - } - } - }, - { - "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_async", - "title": "LanguageService analyzeEntitySentiment Sample", - "origin": "API_DEFINITION", - "description": " Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes sentiment associated with each entity and its mentions.", - "canonical": true, - "file": "language_service.analyze_entity_sentiment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnalyzeEntitySentiment", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentiment", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1beta2.Document" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1beta2.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeEntities_async", + "title": "LanguageService analyzeEntities Sample", + "origin": "API_DEFINITION", + "description": " Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.", + "canonical": true, + "file": "language_service.analyze_entities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeEntities", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntities", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnalyzeEntitiesResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeEntities", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntities", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } }, - "method": { - "shortName": "AnalyzeEntitySentiment", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentiment", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1beta2.LanguageService" - } - } - } - }, - { - "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeSyntax_async", - "title": "LanguageService analyzeSyntax Sample", - "origin": "API_DEFINITION", - "description": " Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part-of-speech tags, dependency trees, and other properties.", - "canonical": true, - "file": "language_service.analyze_syntax.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnalyzeSyntax", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSyntax", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1beta2.Document" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1beta2.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1beta2.AnalyzeSyntaxResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_async", + "title": "LanguageService analyzeEntitySentiment Sample", + "origin": "API_DEFINITION", + "description": " Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes sentiment associated with each entity and its mentions.", + "canonical": true, + "file": "language_service.analyze_entity_sentiment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeEntitySentiment", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentiment", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeEntitySentiment", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentiment", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } }, - "method": { - "shortName": "AnalyzeSyntax", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSyntax", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1beta2.LanguageService" - } - } - } - }, - { - "regionTag": "language_v1beta2_generated_LanguageService_ClassifyText_async", - "title": "LanguageService classifyText Sample", - "origin": "API_DEFINITION", - "description": " Classifies a document into categories.", - "canonical": true, - "file": "language_service.classify_text.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ClassifyText", - "fullName": "google.cloud.language.v1beta2.LanguageService.ClassifyText", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1beta2.Document" - } - ], - "resultType": ".google.cloud.language.v1beta2.ClassifyTextResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeSyntax_async", + "title": "LanguageService analyzeSyntax Sample", + "origin": "API_DEFINITION", + "description": " Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part-of-speech tags, dependency trees, and other properties.", + "canonical": true, + "file": "language_service.analyze_syntax.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnalyzeSyntax", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSyntax", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnalyzeSyntaxResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnalyzeSyntax", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnalyzeSyntax", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } }, - "method": { - "shortName": "ClassifyText", - "fullName": "google.cloud.language.v1beta2.LanguageService.ClassifyText", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1beta2.LanguageService" - } - } - } - }, - { - "regionTag": "language_v1beta2_generated_LanguageService_AnnotateText_async", - "title": "LanguageService annotateText Sample", - "origin": "API_DEFINITION", - "description": " A convenience method that provides all syntax, sentiment, entity, and classification features in one call.", - "canonical": true, - "file": "language_service.annotate_text.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AnnotateText", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnnotateText", - "async": true, - "parameters": [ - { - "name": "document", - "type": ".google.cloud.language.v1beta2.Document" - }, - { - "name": "features", - "type": ".google.cloud.language.v1beta2.AnnotateTextRequest.Features" - }, - { - "name": "encoding_type", - "type": ".google.cloud.language.v1beta2.EncodingType" - } - ], - "resultType": ".google.cloud.language.v1beta2.AnnotateTextResponse", - "client": { - "shortName": "LanguageServiceClient", - "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + "regionTag": "language_v1beta2_generated_LanguageService_ClassifyText_async", + "title": "LanguageService classifyText Sample", + "origin": "API_DEFINITION", + "description": " Classifies a document into categories.", + "canonical": true, + "file": "language_service.classify_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ClassifyText", + "fullName": "google.cloud.language.v1beta2.LanguageService.ClassifyText", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + } + ], + "resultType": ".google.cloud.language.v1beta2.ClassifyTextResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "ClassifyText", + "fullName": "google.cloud.language.v1beta2.LanguageService.ClassifyText", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } }, - "method": { - "shortName": "AnnotateText", - "fullName": "google.cloud.language.v1beta2.LanguageService.AnnotateText", - "service": { - "shortName": "LanguageService", - "fullName": "google.cloud.language.v1beta2.LanguageService" - } + { + "regionTag": "language_v1beta2_generated_LanguageService_AnnotateText_async", + "title": "LanguageService annotateText Sample", + "origin": "API_DEFINITION", + "description": " A convenience method that provides all syntax, sentiment, entity, and classification features in one call.", + "canonical": true, + "file": "language_service.annotate_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AnnotateText", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnnotateText", + "async": true, + "parameters": [ + { + "name": "document", + "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "features", + "type": ".google.cloud.language.v1beta2.AnnotateTextRequest.Features" + }, + { + "name": "encoding_type", + "type": ".google.cloud.language.v1beta2.EncodingType" + } + ], + "resultType": ".google.cloud.language.v1beta2.AnnotateTextResponse", + "client": { + "shortName": "LanguageServiceClient", + "fullName": "google.cloud.language.v1beta2.LanguageServiceClient" + }, + "method": { + "shortName": "AnnotateText", + "fullName": "google.cloud.language.v1beta2.LanguageService.AnnotateText", + "service": { + "shortName": "LanguageService", + "fullName": "google.cloud.language.v1beta2.LanguageService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From 4fa01edcbdf6e13524161b2ce29f02b20f3863cb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 3 May 2022 02:22:11 +0200 Subject: [PATCH 464/488] chore(deps): update dependency @types/mocha to v9 (#661) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.1.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/confidence-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index fbbd969bbb0..6af608b006d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -49,7 +49,7 @@ "google-gax": "^2.24.1" }, "devDependencies": { - "@types/mocha": "^8.0.0", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.0.0", From 655038f9f0789d69f73ee529c05cc04511b68a95 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:34:33 +0200 Subject: [PATCH 465/488] chore(deps): update dependency sinon to v14 (#664) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6af608b006d..217feeb5354 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -62,7 +62,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 1a2fb92194f3d01e8475f13162d9cc3a26efe448 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 13 May 2022 23:32:29 +0200 Subject: [PATCH 466/488] chore(deps): update dependency gts to v3 (#641) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 217feeb5354..1d6e91d622b 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -54,7 +54,7 @@ "@types/sinon": "^10.0.0", "c8": "^7.0.0", "codecov": "^3.0.2", - "gts": "^2.0.0", + "gts": "^3.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", From f06017ddd469bf09c8db59188272000d3a009b4c Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Thu, 19 May 2022 15:36:16 -0700 Subject: [PATCH 467/488] build!: update library to use Node 12 (#666) * build!: Update library to use Node 12 --- packages/google-cloud-language/package.json | 8 ++++---- packages/google-cloud-language/samples/package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1d6e91d622b..1d8e761086c 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "repository": "googleapis/nodejs-language", "main": "build/src/index.js", @@ -46,7 +46,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", @@ -59,12 +59,12 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^8.0.0", + "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.0.0", - "typescript": "^3.8.3", + "typescript": "^4.6.4", "webpack": "^5.0.0", "webpack-cli": "^4.0.0" } diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index c755c16f5b1..54374cf4b66 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -3,7 +3,7 @@ "license": "Apache-2.0", "author": "Google Inc.", "engines": { - "node": ">=8" + "node": ">=12.0.0" }, "repository": "googleapis/nodejs-language", "private": true, @@ -26,4 +26,4 @@ "mocha": "^8.0.0", "uuid": "^8.0.0" } -} +} \ No newline at end of file From 3f98669f58fbd2720cb728c8524a455deabea702 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 03:03:15 +0200 Subject: [PATCH 468/488] fix(deps): update dependency @google-cloud/storage to v6 (#668) --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 54374cf4b66..73db2fa9030 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -18,7 +18,7 @@ "@google-cloud/automl": "^2.0.0", "mathjs": "^10.0.0", "@google-cloud/language": "^4.3.2", - "@google-cloud/storage": "^5.0.0", + "@google-cloud/storage": "^6.0.0", "yargs": "^16.0.0" }, "devDependencies": { From 66102d801d2539bf4db005cf947565195162a458 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 16:54:30 +0200 Subject: [PATCH 469/488] chore(deps): update dependency jsdoc-region-tag to v2 (#671) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 1d8e761086c..ee0be30fca2 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -57,7 +57,7 @@ "gts": "^3.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", From 100a407e6fcd88f9d42f57ce58422ca292d8ce40 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 17:22:48 +0200 Subject: [PATCH 470/488] chore(deps): update dependency jsdoc-fresh to v2 (#670) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.1` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-fresh ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index ee0be30fca2..e7ad0fcf03e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -56,7 +56,7 @@ "codecov": "^3.0.2", "gts": "^3.0.0", "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.0.0", "mocha": "^9.2.2", From fc62f05365bb0eb89c798d078ed80377ea967fe5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 16:12:06 -0400 Subject: [PATCH 471/488] chore(main): release 5.0.0 (#667) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- packages/google-cloud-language/CHANGELOG.md | 16 ++++++++++++++++ packages/google-cloud-language/package.json | 2 +- ...nippet_metadata.google.cloud.language.v1.json | 2 +- ...t_metadata.google.cloud.language.v1beta2.json | 2 +- .../google-cloud-language/samples/package.json | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 42965e22f0e..8b7aaf99001 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,22 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [5.0.0](https://github.com/googleapis/nodejs-language/compare/v4.3.2...v5.0.0) (2022-06-10) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#666) + +### Bug Fixes + +* **deps:** update dependency @google-cloud/storage to v6 ([#668](https://github.com/googleapis/nodejs-language/issues/668)) ([4120d2d](https://github.com/googleapis/nodejs-language/commit/4120d2d1da4ce6bd99bd51c5ee180929007d7051)) + + +### Build System + +* update library to use Node 12 ([#666](https://github.com/googleapis/nodejs-language/issues/666)) ([c6edf4a](https://github.com/googleapis/nodejs-language/commit/c6edf4a10b43c2706de89d5d553fb9f74b59ee98)) + ### [4.3.2](https://www.github.com/googleapis/nodejs-language/compare/v4.3.1...v4.3.2) (2021-11-10) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index e7ad0fcf03e..58de9c69b17 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "4.3.2", + "version": "5.0.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index 81796cc7663..c8c049c2de0 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "4.3.2", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index c03cbce58a3..bbe2666bcf0 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "4.3.2", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 73db2fa9030..92d02f8f5ee 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^10.0.0", - "@google-cloud/language": "^4.3.2", + "@google-cloud/language": "^5.0.0", "@google-cloud/storage": "^6.0.0", "yargs": "^16.0.0" }, From 278c22da1c4ea0b3e72a11ce120909f7bcbcb959 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 17:44:04 -0700 Subject: [PATCH 472/488] fix(docs): describe fallback rest option (#673) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(docs): describe fallback rest option Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/language_service_client.ts | 11 +++++------ .../src/v1beta2/language_service_client.ts | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index b1dcca7f95d..37a8960fa35 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -61,7 +61,7 @@ export class LanguageServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -84,11 +84,10 @@ export class LanguageServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 8eed5d7d5bb..9116a66b835 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -61,7 +61,7 @@ export class LanguageServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -84,11 +84,10 @@ export class LanguageServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. From 525b0362ae11d3e3bb8001f661071c0690729917 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:18:32 +0000 Subject: [PATCH 473/488] chore(main): release 5.0.1 (#674) :robot: I have created a release *beep* *boop* --- ## [5.0.1](https://github.com/googleapis/nodejs-language/compare/v5.0.0...v5.0.1) (2022-06-30) ### Bug Fixes * **docs:** describe fallback rest option ([#673](https://github.com/googleapis/nodejs-language/issues/673)) ([6767804](https://github.com/googleapis/nodejs-language/commit/67678040029a2cdfe1ed1a7488ec2c8ba5920db8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-language/CHANGELOG.md | 7 +++++++ packages/google-cloud-language/package.json | 2 +- .../v1/snippet_metadata.google.cloud.language.v1.json | 2 +- .../snippet_metadata.google.cloud.language.v1beta2.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 8b7aaf99001..dedc840c080 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [5.0.1](https://github.com/googleapis/nodejs-language/compare/v5.0.0...v5.0.1) (2022-06-30) + + +### Bug Fixes + +* **docs:** describe fallback rest option ([#673](https://github.com/googleapis/nodejs-language/issues/673)) ([6767804](https://github.com/googleapis/nodejs-language/commit/67678040029a2cdfe1ed1a7488ec2c8ba5920db8)) + ## [5.0.0](https://github.com/googleapis/nodejs-language/compare/v4.3.2...v5.0.0) (2022-06-10) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 58de9c69b17..41c34b96005 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "5.0.0", + "version": "5.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index c8c049c2de0..80c0fd38934 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index bbe2666bcf0..94e3d4d93d2 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 92d02f8f5ee..fd6121e8b0a 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^2.0.0", "mathjs": "^10.0.0", - "@google-cloud/language": "^5.0.0", + "@google-cloud/language": "^5.0.1", "@google-cloud/storage": "^6.0.0", "yargs": "^16.0.0" }, From 7be51b8ec7cbb422927c34b75fb2f5bd8cb57796 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 8 Jul 2022 22:52:26 +0200 Subject: [PATCH 474/488] chore(deps): update dependency linkinator to v4 (#677) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [linkinator](https://togithub.com/JustinBeckwith/linkinator) | [`^2.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/linkinator/2.16.2/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/compatibility-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/confidence-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
JustinBeckwith/linkinator ### [`v4.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.1.0...v4.0.0) ##### Features - create new release with notes ([#​508](https://togithub.com/JustinBeckwith/linkinator/issues/508)) ([2cab633](https://togithub.com/JustinBeckwith/linkinator/commit/2cab633c9659eb10794a4bac06f8b0acdc3e2c0c)) ##### BREAKING CHANGES - The commits in [#​507](https://togithub.com/JustinBeckwith/linkinator/issues/507) and [#​506](https://togithub.com/JustinBeckwith/linkinator/issues/506) both had breaking changes. They included dropping support for Node.js 12.x and updating the CSV export to be streaming, and to use a new way of writing the CSV file. This is an empty to commit using the `BREAKING CHANGE` format in the commit message to ensure a release is triggered. ### [`v3.1.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.1.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.6...v3.1.0) ##### Features - allow --skip to be defined multiple times ([#​399](https://togithub.com/JustinBeckwith/linkinator/issues/399)) ([5ca5a46](https://togithub.com/JustinBeckwith/linkinator/commit/5ca5a461508e688de12e5ae6b4cfb6565f832ebf)) ### [`v3.0.6`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.6) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.5...v3.0.6) ##### Bug Fixes - **deps:** upgrade node-glob to v8 ([#​397](https://togithub.com/JustinBeckwith/linkinator/issues/397)) ([d334dc6](https://togithub.com/JustinBeckwith/linkinator/commit/d334dc6734cd7c2b73d7ed3dea0550a6c3072ad5)) ### [`v3.0.5`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.5) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.4...v3.0.5) ##### Bug Fixes - **deps:** upgrade to htmlparser2 v8.0.1 ([#​396](https://togithub.com/JustinBeckwith/linkinator/issues/396)) ([ba3b9a8](https://togithub.com/JustinBeckwith/linkinator/commit/ba3b9a8a9b19d39af6ed91790135e833b80c1eb6)) ### [`v3.0.4`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.4) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.3...v3.0.4) ##### Bug Fixes - **deps:** update dependency gaxios to v5 ([#​391](https://togithub.com/JustinBeckwith/linkinator/issues/391)) ([48af50e](https://togithub.com/JustinBeckwith/linkinator/commit/48af50e787731204aeb7eff41325c62291311e45)) ### [`v3.0.3`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.3) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.2...v3.0.3) ##### Bug Fixes - export getConfig from index ([#​371](https://togithub.com/JustinBeckwith/linkinator/issues/371)) ([0bc0355](https://togithub.com/JustinBeckwith/linkinator/commit/0bc0355c7e2ea457f247e6b52d1577b8c4ecb3a1)) ### [`v3.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.1...v3.0.2) ##### Bug Fixes - allow server root with trailing slash ([#​370](https://togithub.com/JustinBeckwith/linkinator/issues/370)) ([8adf6b0](https://togithub.com/JustinBeckwith/linkinator/commit/8adf6b025fda250e38461f1cdad40fe08c3b3b7c)) ### [`v3.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.0...v3.0.1) ##### Bug Fixes - decode path parts in local web server ([#​369](https://togithub.com/JustinBeckwith/linkinator/issues/369)) ([4696a0c](https://togithub.com/JustinBeckwith/linkinator/commit/4696a0c38c341b178ed815f47371fca955979feb)) ### [`v3.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v2.16.2...v3.0.0) ##### Bug Fixes - **deps:** update dependency chalk to v5 ([#​362](https://togithub.com/JustinBeckwith/linkinator/issues/362)) ([4b17a8d](https://togithub.com/JustinBeckwith/linkinator/commit/4b17a8d87b649eaf813428f8ee6955e1d21dae4f)) - feat!: convert to es modules, drop node 10 ([#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359)) ([efee299](https://togithub.com/JustinBeckwith/linkinator/commit/efee299ab8a805accef751eecf8538915a4e7783)), closes [#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359) ##### BREAKING CHANGES - this module now requires node.js 12 and above, and has moved to es modules by default.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 41c34b96005..6da42b34c3e 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -58,7 +58,7 @@ "jsdoc": "^3.5.5", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.0.0", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", From 2c5c94a66b4b5957bf13a4557f4b797e1abbbf84 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 18:20:13 +0200 Subject: [PATCH 475/488] fix(deps): update dependency mathjs to v11 (#679) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [mathjs](https://mathjs.org) ([source](https://togithub.com/josdejong/mathjs)) | [`^10.0.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/mathjs/10.6.4/11.0.1) | [![age](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/compatibility-slim/10.6.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/confidence-slim/10.6.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
josdejong/mathjs ### [`v11.0.1`](https://togithub.com/josdejong/mathjs/blob/HEAD/HISTORY.md#​2022-07-25-version-1101) [Compare Source](https://togithub.com/josdejong/mathjs/compare/v11.0.0...v11.0.1) - Fix [#​2632](https://togithub.com/josdejong/mathjs/issues/2632): TypeScript issue of `simplifyConstant` and `simplifyCore` not having a return type defined. ### [`v11.0.0`](https://togithub.com/josdejong/mathjs/blob/HEAD/HISTORY.md#​2022-07-23-version-1100) [Compare Source](https://togithub.com/josdejong/mathjs/compare/v10.6.4...v11.0.0) !!! BE CAREFUL: BREAKING CHANGES !!! Breaking changes: - Dropped official support for IE11. - Upgraded to `typed-function@3`, see [josdejong/typed-function/HISTORY.md](https://togithub.com/josdejong/typed-function/blob/develop/HISTORY.md#​2022-05-12-version-300). Thanks [@​gwhitney](https://togithub.com/gwhitney). Most importantly: - Conversions now have preference over `any`. - The `this` variable is no longer bound to the typed function itself. - The properties `typed.types`, `typed.conversions`, and `typed.ignore` have been removed. - There are new static functions available like `typed.referTo`, `typed.referToSelf`, `typed.addTypes`, `typed.addConversions`. - Implement amended "Rule 2" for implicit multiplication ([#​2370](https://togithub.com/josdejong/mathjs/issues/2370), [#​2460](https://togithub.com/josdejong/mathjs/issues/2460)): when having a division followed by an implicit multiplication, the division gets higher precedence over the implicit multiplication when (a) the numerator is a constant with optionally a prefix operator (`-`, `+`, `~`), and (b) the denominator is a constant. For example: formerly `-1 / 2 x` was interpreted as `-1 / (2 * x)` and now it is interpreted as `(-1 / 2) * x`. Thanks [@​gwhitney](https://togithub.com/gwhitney). - Drop elementwise matrix support for trigonometric functions, exp, log, gamma, square, sqrt, cube, and cbrt to prevent confusion with standard matrix functions ([#​2440](https://togithub.com/josdejong/mathjs/issues/2440), [#​2465](https://togithub.com/josdejong/mathjs/issues/2465)). Instead, use `math.map(matrix, fn)`. Thanks [@​gwhitney](https://togithub.com/gwhitney). - Simplify: convert equivalent function calls into operators, for example, `add(2, x)` will now be simplified into `2 + x` ([#​2415](https://togithub.com/josdejong/mathjs/issues/2415), [#​2466](https://togithub.com/josdejong/mathjs/issues/2466)). Thanks [@​gwhitney](https://togithub.com/gwhitney). - Removed the automatic conversion from `number` to `string` ([#​2482](https://togithub.com/josdejong/mathjs/issues/2482)). Thanks [@​gwhitney](https://togithub.com/gwhitney). - Fix [#​2412](https://togithub.com/josdejong/mathjs/issues/2412): let function `diff` return an empty matrix when the input contains only one element ([#​2422](https://togithub.com/josdejong/mathjs/issues/2422)). - Internal refactoring in the `simplifyCore` logic ([#​2490](https://togithub.com/josdejong/mathjs/issues/2490), [#​2484](https://togithub.com/josdejong/mathjs/issues/2484), [#​2459](https://togithub.com/josdejong/mathjs/issues/2459)). The function `simplifyCore` will no longer (partially) merge constants, that behavior has been moved to `simplifyConstant`. The combination of `simplifyConstant` and `simplifyCore` is still close to the old behavior of `simplifyCore`, but there are some differences. To reproduce the same behavior as the old `simplifyCore`, you can use `math.simplify(expr, [math.simplifyCore, math.simplifyConstant])`. Thanks to the refactoring, `simplify` is more thorough in reducing constants. Thanks [@​gwhitney](https://togithub.com/gwhitney). - Disable support for splitting rest parameters in chained calculations ([#​2485](https://togithub.com/josdejong/mathjs/issues/2485), [#​2474](https://togithub.com/josdejong/mathjs/issues/2474)). For example: `math.chain(3).max(4, 2).done()` will now throw an error rather than return `4`, because the rest parameter of `math.max(...number)` has been split between the contents of the chain and the arguments to the max call. Thanks [@​gwhitney](https://togithub.com/gwhitney). - Function `typeOf` now returns `function` (lowercase) for a function instead of `Function` ([#​2560](https://togithub.com/josdejong/mathjs/issues/2560)). Thanks [@​gwhitney](https://togithub.com/gwhitney). Non-breaking changes: - Fix [#​2600](https://togithub.com/josdejong/mathjs/issues/2600): improve the TypeScript definitions of `simplify`. Thanks [@​laureen-m](https://togithub.com/laureen-m) and [@​mattvague](https://togithub.com/mattvague). - Fix [#​2607](https://togithub.com/josdejong/mathjs/issues/2607): improve type definition of `createUnit`. Thanks [@​egziko](https://togithub.com/egziko). - Fix [#​2608](https://togithub.com/josdejong/mathjs/issues/2608): clarify the docs on the need to configure a smaller `epsilon` when using BigNumbers. - Fix [#​2613](https://togithub.com/josdejong/mathjs/issues/2613): describe matrix methods `get` and `set` in the docs. - Fix link to `math.rationalize` in the docs ([#​2616](https://togithub.com/josdejong/mathjs/issues/2616)). Thanks [@​nukisman](https://togithub.com/nukisman). - Fix [#​2621](https://togithub.com/josdejong/mathjs/issues/2621): add TypeScript definitions for `count` ([#​2622](https://togithub.com/josdejong/mathjs/issues/2622)). Thanks [@​Hansuku](https://togithub.com/Hansuku). - Improved TypeScript definitions of `multiply` ([#​2623](https://togithub.com/josdejong/mathjs/issues/2623)). Thanks [@​Windrill](https://togithub.com/Windrill).
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index fd6121e8b0a..403fa61469a 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/automl": "^2.0.0", - "mathjs": "^10.0.0", + "mathjs": "^11.0.0", "@google-cloud/language": "^5.0.1", "@google-cloud/storage": "^6.0.0", "yargs": "^16.0.0" From bb5f1864759f821c8d99380651ce3da2f3bcf9ff Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 18:42:46 +0200 Subject: [PATCH 476/488] fix(deps): update dependency @google-cloud/automl to v3 (#672) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@google-cloud/automl](https://togithub.com/googleapis/nodejs-automl) | [`^2.0.0` -> `^3.0.0`](https://renovatebot.com/diffs/npm/@google-cloud%2fautoml/2.5.2/3.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@google-cloud%2fautoml/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@google-cloud%2fautoml/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@google-cloud%2fautoml/3.0.0/compatibility-slim/2.5.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@google-cloud%2fautoml/3.0.0/confidence-slim/2.5.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/nodejs-automl ### [`v3.0.0`](https://togithub.com/googleapis/nodejs-automl/blob/HEAD/CHANGELOG.md#​300-httpsgithubcomgoogleapisnodejs-automlcomparev252v300-2022-06-20) [Compare Source](https://togithub.com/googleapis/nodejs-automl/compare/v2.5.2...v3.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​613](https://togithub.com/googleapis/nodejs-automl/issues/613)) ##### Bug Fixes - Add back java_multiple_files option to the text_sentiment.proto to match with the previous published version of text_sentiment proto ([20995db](https://togithub.com/googleapis/nodejs-automl/commit/20995db72854243213a6ffabcb188a52c9cef8f6)) - proto field markdown comment for the display_name field in annotation_payload.proto to point the correct public v1/ version ([20995db](https://togithub.com/googleapis/nodejs-automl/commit/20995db72854243213a6ffabcb188a52c9cef8f6)) ##### Build System - update library to use Node 12 ([#​613](https://togithub.com/googleapis/nodejs-automl/issues/613)) ([9ddf084](https://togithub.com/googleapis/nodejs-automl/commit/9ddf0845c8f5f1a2434a1f48d3740447fa2d747d)) ##### [2.5.2](https://www.github.com/googleapis/nodejs-automl/compare/v2.5.1...v2.5.2) (2021-12-30) ##### Bug Fixes - **deps:** update dependency csv to v6 ([#​565](https://www.togithub.com/googleapis/nodejs-automl/issues/565)) ([7f1d947](https://www.github.com/googleapis/nodejs-automl/commit/7f1d9477cfa2d9697206dffabdfb92dfb80bc1d1)) ##### [2.5.1](https://www.github.com/googleapis/nodejs-automl/compare/v2.5.0...v2.5.1) (2021-11-08) ##### Bug Fixes - **deps:** update dependency mathjs to v10 ([#​559](https://www.togithub.com/googleapis/nodejs-automl/issues/559)) ([120a457](https://www.github.com/googleapis/nodejs-automl/commit/120a457211590c48c0e8d81e35e364f6c098dbce))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 403fa61469a..ba60becb949 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 60000" }, "dependencies": { - "@google-cloud/automl": "^2.0.0", + "@google-cloud/automl": "^3.0.0", "mathjs": "^11.0.0", "@google-cloud/language": "^5.0.1", "@google-cloud/storage": "^6.0.0", From f1e95c4b198560a6175d96ad54278c0a68c331a1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 20:20:21 +0000 Subject: [PATCH 477/488] chore: remove unused proto imports (#682) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: https://github.com/googleapis/googleapis/commit/cfa1b3782da7ccae31673d45401a0b79d2d4a84b Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b7666656510f5b00b893f003a0ba5766f9e250 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9 --- .../language/v1beta2/language_service.proto | 1 - .../google-cloud-language/protos/protos.d.ts | 96 -------- .../google-cloud-language/protos/protos.js | 224 ------------------ .../google-cloud-language/protos/protos.json | 12 - 4 files changed, 333 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto index bd4167a301d..7d77376e985 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -20,7 +20,6 @@ package google.cloud.language.v1beta2; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/language/v1beta2;language"; option java_multiple_files = true; diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index f4d5a07c1e0..767a2063dbe 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -9101,101 +9101,5 @@ export namespace google { public toJSON(): { [k: string]: any }; } } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } } diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 306c5c83c96..3a902aff087 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -24957,230 +24957,6 @@ return GeneratedCodeInfo; })(); - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Timestamp; - })(); - return protobuf; })(); diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index 7c597946cec..8b9cda30601 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -2741,18 +2741,6 @@ } } } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } } } } From b8b9feafa016fa876b5343db1cb64b92d516d73c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:04:20 +0000 Subject: [PATCH 478/488] fix: better support for fallback mode (#683) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../v1/language_service.analyze_entities.js | 3 + ...nguage_service.analyze_entity_sentiment.js | 3 + .../v1/language_service.analyze_sentiment.js | 3 + .../v1/language_service.analyze_syntax.js | 3 + .../v1/language_service.annotate_text.js | 3 + .../v1/language_service.classify_text.js | 3 + ...pet_metadata.google.cloud.language.v1.json | 12 +- .../language_service.analyze_entities.js | 3 + ...nguage_service.analyze_entity_sentiment.js | 3 + .../language_service.analyze_sentiment.js | 3 + .../language_service.analyze_syntax.js | 3 + .../v1beta2/language_service.annotate_text.js | 3 + .../v1beta2/language_service.classify_text.js | 3 + ...etadata.google.cloud.language.v1beta2.json | 12 +- .../src/v1/language_service_client.ts | 3 +- .../src/v1beta2/language_service_client.ts | 3 +- .../test/gapic_language_service_v1.ts | 164 +++++++++--------- .../test/gapic_language_service_v1beta2.ts | 164 +++++++++--------- 18 files changed, 218 insertions(+), 176 deletions(-) diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js index c51b14831dc..5bc14a05ef7 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1_generated_LanguageService_AnalyzeEntities_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js index 59d0340906d..b005b23992c 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1_generated_LanguageService_AnalyzeEntitySentiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js index e16a69be3fa..cf8c1b63199 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1_generated_LanguageService_AnalyzeSentiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js index 89bc540ec7e..5d32c85b6b6 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1_generated_LanguageService_AnalyzeSyntax_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js index fb978dde245..b17c4a774d4 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js @@ -23,6 +23,9 @@ function main(document, features) { // [START language_v1_generated_LanguageService_AnnotateText_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js index 81a04f8cd99..befda5943f4 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1_generated_LanguageService_ClassifyText_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index 80c0fd38934..0d407c6c11c 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -66,7 +66,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -154,7 +154,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -198,7 +198,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -238,7 +238,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js index 61da1c26131..dc4f7a1bee0 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1beta2_generated_LanguageService_AnalyzeEntities_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js index f7fbf3b4d56..86b5cd381b1 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js index 8bf110baa0a..77bf2ffe86d 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1beta2_generated_LanguageService_AnalyzeSentiment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js index 2d928214fb6..e96c0865bba 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1beta2_generated_LanguageService_AnalyzeSyntax_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js index b8b0239aed2..96ab5ea0913 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js @@ -23,6 +23,9 @@ function main(document, features) { // [START language_v1beta2_generated_LanguageService_AnnotateText_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js index e7b868ca67c..cbb8e1e70a0 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js @@ -23,6 +23,9 @@ function main(document) { // [START language_v1beta2_generated_LanguageService_ClassifyText_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index 94e3d4d93d2..441db929ca6 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -66,7 +66,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -154,7 +154,7 @@ "segments": [ { "start": 25, - "end": 54, + "end": 57, "type": "FULL" } ], @@ -198,7 +198,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -238,7 +238,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 37a8960fa35..a599e7007fd 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -226,7 +226,8 @@ export class LanguageServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 9116a66b835..7589d3b2e0a 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -226,7 +226,8 @@ export class LanguageServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index e109c2e543c..64650cef39c 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -50,101 +50,103 @@ function stubSimpleCallWithCallback( } describe('v1.LanguageServiceClient', () => { - it('has servicePath', () => { - const servicePath = - languageserviceModule.v1.LanguageServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - languageserviceModule.v1.LanguageServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = languageserviceModule.v1.LanguageServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + languageserviceModule.v1.LanguageServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new languageserviceModule.v1.LanguageServiceClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + languageserviceModule.v1.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - fallback: true, + it('has port', () => { + const port = languageserviceModule.v1.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new languageserviceModule.v1.LanguageServiceClient(); + assert(client); }); - assert.strictEqual(client.languageServiceStub, undefined); - await client.initialize(); - assert(client.languageServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.languageServiceStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.languageServiceStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.languageServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); }); describe('analyzeSentiment', () => { diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 75993cffeed..b5d374b89f5 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -50,101 +50,103 @@ function stubSimpleCallWithCallback( } describe('v1beta2.LanguageServiceClient', () => { - it('has servicePath', () => { - const servicePath = - languageserviceModule.v1beta2.LanguageServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - languageserviceModule.v1beta2.LanguageServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = languageserviceModule.v1beta2.LanguageServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + languageserviceModule.v1beta2.LanguageServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + languageserviceModule.v1beta2.LanguageServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - fallback: true, + it('has port', () => { + const port = languageserviceModule.v1beta2.LanguageServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient(); + assert(client); }); - assert.strictEqual(client.languageServiceStub, undefined); - await client.initialize(); - assert(client.languageServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.languageServiceStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + await client.initialize(); + assert(client.languageServiceStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.languageServiceStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.languageServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.languageServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new languageserviceModule.v1beta2.LanguageServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new languageserviceModule.v1beta2.LanguageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); }); describe('analyzeSentiment', () => { From eb3f9fb2f6c727a303ec85580c4fb48e2b4eb33a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 07:38:12 +0000 Subject: [PATCH 479/488] fix: change import long to require (#684) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../google-cloud-language/protos/protos.d.ts | 586 ++- .../google-cloud-language/protos/protos.js | 3671 ++++++++++++----- .../google-cloud-language/protos/protos.json | 24 + 3 files changed, 3199 insertions(+), 1082 deletions(-) diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index 767a2063dbe..f03276aa560 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -134,42 +134,42 @@ export namespace google { namespace LanguageService { /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeSentiment}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|analyzeSentiment}. * @param error Error, if any * @param [response] AnalyzeSentimentResponse */ type AnalyzeSentimentCallback = (error: (Error|null), response?: google.cloud.language.v1.AnalyzeSentimentResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeEntities}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|analyzeEntities}. * @param error Error, if any * @param [response] AnalyzeEntitiesResponse */ type AnalyzeEntitiesCallback = (error: (Error|null), response?: google.cloud.language.v1.AnalyzeEntitiesResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeEntitySentiment}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|analyzeEntitySentiment}. * @param error Error, if any * @param [response] AnalyzeEntitySentimentResponse */ type AnalyzeEntitySentimentCallback = (error: (Error|null), response?: google.cloud.language.v1.AnalyzeEntitySentimentResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeSyntax}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|analyzeSyntax}. * @param error Error, if any * @param [response] AnalyzeSyntaxResponse */ type AnalyzeSyntaxCallback = (error: (Error|null), response?: google.cloud.language.v1.AnalyzeSyntaxResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#classifyText}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|classifyText}. * @param error Error, if any * @param [response] ClassifyTextResponse */ type ClassifyTextCallback = (error: (Error|null), response?: google.cloud.language.v1.ClassifyTextResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#annotateText}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|annotateText}. * @param error Error, if any * @param [response] AnnotateTextResponse */ @@ -285,6 +285,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Document + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Document { @@ -391,6 +398,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sentence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Entity. */ @@ -511,6 +525,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Entity { @@ -647,6 +668,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Token + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Sentiment. */ @@ -743,6 +771,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sentiment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartOfSpeech. */ @@ -899,6 +934,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartOfSpeech + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PartOfSpeech { @@ -1128,6 +1170,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DependencyEdge + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DependencyEdge { @@ -1320,6 +1369,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityMention + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EntityMention { @@ -1426,6 +1482,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextSpan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ClassificationCategory. */ @@ -1522,6 +1585,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClassificationCategory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeSentimentRequest. */ @@ -1618,6 +1688,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeSentimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeSentimentResponse. */ @@ -1720,6 +1797,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeSentimentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeEntitySentimentRequest. */ @@ -1816,6 +1900,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeEntitySentimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeEntitySentimentResponse. */ @@ -1912,6 +2003,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeEntitySentimentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeEntitiesRequest. */ @@ -2008,6 +2106,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeEntitiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeEntitiesResponse. */ @@ -2104,6 +2209,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeEntitiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeSyntaxRequest. */ @@ -2200,6 +2312,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeSyntaxRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeSyntaxResponse. */ @@ -2302,6 +2421,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeSyntaxResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ClassifyTextRequest. */ @@ -2392,6 +2518,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClassifyTextRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ClassifyTextResponse. */ @@ -2482,6 +2615,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClassifyTextResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnnotateTextRequest. */ @@ -2584,6 +2724,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnnotateTextRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AnnotateTextRequest { @@ -2700,6 +2847,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Features + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2821,6 +2975,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnnotateTextResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2935,42 +3096,42 @@ export namespace google { namespace LanguageService { /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeSentiment}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeSentiment}. * @param error Error, if any * @param [response] AnalyzeSentimentResponse */ type AnalyzeSentimentCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.AnalyzeSentimentResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeEntities}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeEntities}. * @param error Error, if any * @param [response] AnalyzeEntitiesResponse */ type AnalyzeEntitiesCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.AnalyzeEntitiesResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeEntitySentiment}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeEntitySentiment}. * @param error Error, if any * @param [response] AnalyzeEntitySentimentResponse */ type AnalyzeEntitySentimentCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeSyntax}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeSyntax}. * @param error Error, if any * @param [response] AnalyzeSyntaxResponse */ type AnalyzeSyntaxCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.AnalyzeSyntaxResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#classifyText}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|classifyText}. * @param error Error, if any * @param [response] ClassifyTextResponse */ type ClassifyTextCallback = (error: (Error|null), response?: google.cloud.language.v1beta2.ClassifyTextResponse) => void; /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#annotateText}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|annotateText}. * @param error Error, if any * @param [response] AnnotateTextResponse */ @@ -3086,6 +3247,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Document + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Document { @@ -3192,6 +3360,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sentence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Entity. */ @@ -3312,6 +3487,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Entity { @@ -3440,6 +3622,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Token + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** EncodingType enum. */ @@ -3544,6 +3733,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sentiment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartOfSpeech. */ @@ -3700,6 +3896,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartOfSpeech + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PartOfSpeech { @@ -3929,6 +4132,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DependencyEdge + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DependencyEdge { @@ -4121,6 +4331,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityMention + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EntityMention { @@ -4227,6 +4444,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextSpan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ClassificationCategory. */ @@ -4323,6 +4547,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClassificationCategory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeSentimentRequest. */ @@ -4419,6 +4650,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeSentimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeSentimentResponse. */ @@ -4521,6 +4759,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeSentimentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeEntitySentimentRequest. */ @@ -4617,6 +4862,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeEntitySentimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeEntitySentimentResponse. */ @@ -4713,6 +4965,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeEntitySentimentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeEntitiesRequest. */ @@ -4809,6 +5068,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeEntitiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeEntitiesResponse. */ @@ -4905,6 +5171,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeEntitiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeSyntaxRequest. */ @@ -5001,6 +5274,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeSyntaxRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnalyzeSyntaxResponse. */ @@ -5103,6 +5383,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeSyntaxResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ClassifyTextRequest. */ @@ -5193,6 +5480,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClassifyTextRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ClassifyTextResponse. */ @@ -5283,6 +5577,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClassifyTextResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnnotateTextRequest. */ @@ -5385,6 +5686,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnnotateTextRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AnnotateTextRequest { @@ -5501,6 +5809,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Features + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -5622,6 +5937,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnnotateTextResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -5724,6 +6046,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -5871,6 +6200,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -5967,6 +6303,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** FieldBehavior enum. */ @@ -6073,6 +6416,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -6113,6 +6463,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -6160,6 +6513,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -6229,6 +6585,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -6373,6 +6736,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -6477,6 +6847,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -6573,6 +6950,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -6664,6 +7048,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -6814,6 +7205,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -6942,6 +7340,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -7056,6 +7461,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -7154,6 +7566,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -7257,6 +7676,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -7359,6 +7785,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -7479,6 +7912,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -7689,6 +8129,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -7813,6 +8260,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -7830,6 +8284,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -7864,6 +8321,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -7942,6 +8402,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -8049,6 +8516,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -8151,6 +8625,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -8247,6 +8728,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -8349,6 +8837,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -8457,6 +8952,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -8593,6 +9095,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -8691,6 +9200,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -8782,6 +9298,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -8898,6 +9421,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -8989,6 +9519,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -9007,6 +9544,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -9030,6 +9570,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -9099,6 +9642,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } } diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index 3a902aff087..bcb5dda16ab 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -99,7 +99,7 @@ }; /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeSentiment}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|analyzeSentiment}. * @memberof google.cloud.language.v1.LanguageService * @typedef AnalyzeSentimentCallback * @type {function} @@ -132,7 +132,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeEntities}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|analyzeEntities}. * @memberof google.cloud.language.v1.LanguageService * @typedef AnalyzeEntitiesCallback * @type {function} @@ -165,7 +165,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeEntitySentiment}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|analyzeEntitySentiment}. * @memberof google.cloud.language.v1.LanguageService * @typedef AnalyzeEntitySentimentCallback * @type {function} @@ -198,7 +198,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#analyzeSyntax}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|analyzeSyntax}. * @memberof google.cloud.language.v1.LanguageService * @typedef AnalyzeSyntaxCallback * @type {function} @@ -231,7 +231,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#classifyText}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|classifyText}. * @memberof google.cloud.language.v1.LanguageService * @typedef ClassifyTextCallback * @type {function} @@ -264,7 +264,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1.LanguageService#annotateText}. + * Callback as used by {@link google.cloud.language.v1.LanguageService|annotateText}. * @memberof google.cloud.language.v1.LanguageService * @typedef AnnotateTextCallback * @type {function} @@ -438,18 +438,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.content = reader.string(); - break; - case 3: - message.gcsContentUri = reader.string(); - break; - case 4: - message.language = reader.string(); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.content = reader.string(); + break; + } + case 3: { + message.gcsContentUri = reader.string(); + break; + } + case 4: { + message.language = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -593,6 +597,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Document + * @function getTypeUrl + * @memberof google.cloud.language.v1.Document + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.Document"; + }; + /** * Type enum. * @name google.cloud.language.v1.Document.Type @@ -715,12 +734,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = $root.google.cloud.language.v1.TextSpan.decode(reader, reader.uint32()); - break; - case 2: - message.sentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); - break; + case 1: { + message.text = $root.google.cloud.language.v1.TextSpan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.sentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -829,6 +850,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Sentence + * @function getTypeUrl + * @memberof google.cloud.language.v1.Sentence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sentence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.Sentence"; + }; + return Sentence; })(); @@ -983,45 +1019,51 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.metadata[key] = value; + break; + } + case 4: { + message.salience = reader.float(); + break; + } + case 5: { + if (!(message.mentions && message.mentions.length)) + message.mentions = []; + message.mentions.push($root.google.cloud.language.v1.EntityMention.decode(reader, reader.uint32())); + break; + } + case 6: { + message.sentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; } - message.metadata[key] = value; - break; - case 4: - message.salience = reader.float(); - break; - case 5: - if (!(message.mentions && message.mentions.length)) - message.mentions = []; - message.mentions.push($root.google.cloud.language.v1.EntityMention.decode(reader, reader.uint32())); - break; - case 6: - message.sentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -1258,6 +1300,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Entity + * @function getTypeUrl + * @memberof google.cloud.language.v1.Entity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.Entity"; + }; + /** * Type enum. * @name google.cloud.language.v1.Entity.Type @@ -1440,18 +1497,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = $root.google.cloud.language.v1.TextSpan.decode(reader, reader.uint32()); - break; - case 2: - message.partOfSpeech = $root.google.cloud.language.v1.PartOfSpeech.decode(reader, reader.uint32()); - break; - case 3: - message.dependencyEdge = $root.google.cloud.language.v1.DependencyEdge.decode(reader, reader.uint32()); - break; - case 4: - message.lemma = reader.string(); - break; + case 1: { + message.text = $root.google.cloud.language.v1.TextSpan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.partOfSpeech = $root.google.cloud.language.v1.PartOfSpeech.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dependencyEdge = $root.google.cloud.language.v1.DependencyEdge.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lemma = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1581,6 +1642,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Token + * @function getTypeUrl + * @memberof google.cloud.language.v1.Token + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Token.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.Token"; + }; + return Token; })(); @@ -1687,12 +1763,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.magnitude = reader.float(); - break; - case 3: - message.score = reader.float(); - break; + case 2: { + message.magnitude = reader.float(); + break; + } + case 3: { + message.score = reader.float(); + break; + } default: reader.skipType(tag & 7); break; @@ -1791,6 +1869,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Sentiment + * @function getTypeUrl + * @memberof google.cloud.language.v1.Sentiment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sentiment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.Sentiment"; + }; + return Sentiment; })(); @@ -2007,42 +2100,54 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tag = reader.int32(); - break; - case 2: - message.aspect = reader.int32(); - break; - case 3: - message["case"] = reader.int32(); - break; - case 4: - message.form = reader.int32(); - break; - case 5: - message.gender = reader.int32(); - break; - case 6: - message.mood = reader.int32(); - break; - case 7: - message.number = reader.int32(); - break; - case 8: - message.person = reader.int32(); - break; - case 9: - message.proper = reader.int32(); - break; - case 10: - message.reciprocity = reader.int32(); - break; - case 11: - message.tense = reader.int32(); - break; - case 12: - message.voice = reader.int32(); - break; + case 1: { + message.tag = reader.int32(); + break; + } + case 2: { + message.aspect = reader.int32(); + break; + } + case 3: { + message["case"] = reader.int32(); + break; + } + case 4: { + message.form = reader.int32(); + break; + } + case 5: { + message.gender = reader.int32(); + break; + } + case 6: { + message.mood = reader.int32(); + break; + } + case 7: { + message.number = reader.int32(); + break; + } + case 8: { + message.person = reader.int32(); + break; + } + case 9: { + message.proper = reader.int32(); + break; + } + case 10: { + message.reciprocity = reader.int32(); + break; + } + case 11: { + message.tense = reader.int32(); + break; + } + case 12: { + message.voice = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2667,6 +2772,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PartOfSpeech + * @function getTypeUrl + * @memberof google.cloud.language.v1.PartOfSpeech + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartOfSpeech.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.PartOfSpeech"; + }; + /** * Tag enum. * @name google.cloud.language.v1.PartOfSpeech.Tag @@ -3057,12 +3177,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.headTokenIndex = reader.int32(); - break; - case 2: - message.label = reader.int32(); - break; + case 1: { + message.headTokenIndex = reader.int32(); + break; + } + case 2: { + message.label = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3579,6 +3701,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DependencyEdge + * @function getTypeUrl + * @memberof google.cloud.language.v1.DependencyEdge + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DependencyEdge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.DependencyEdge"; + }; + /** * Label enum. * @name google.cloud.language.v1.DependencyEdge.Label @@ -3872,15 +4009,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = $root.google.cloud.language.v1.TextSpan.decode(reader, reader.uint32()); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - message.sentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); - break; + case 1: { + message.text = $root.google.cloud.language.v1.TextSpan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.sentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4015,6 +4155,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EntityMention + * @function getTypeUrl + * @memberof google.cloud.language.v1.EntityMention + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityMention.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.EntityMention"; + }; + /** * Type enum. * @name google.cloud.language.v1.EntityMention.Type @@ -4137,12 +4292,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.content = reader.string(); - break; - case 2: - message.beginOffset = reader.int32(); - break; + case 1: { + message.content = reader.string(); + break; + } + case 2: { + message.beginOffset = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4241,6 +4398,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TextSpan + * @function getTypeUrl + * @memberof google.cloud.language.v1.TextSpan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextSpan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.TextSpan"; + }; + return TextSpan; })(); @@ -4347,12 +4519,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.confidence = reader.float(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.confidence = reader.float(); + break; + } default: reader.skipType(tag & 7); break; @@ -4451,6 +4625,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClassificationCategory + * @function getTypeUrl + * @memberof google.cloud.language.v1.ClassificationCategory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClassificationCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.ClassificationCategory"; + }; + return ClassificationCategory; })(); @@ -4557,12 +4746,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); - break; - case 2: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4689,6 +4880,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeSentimentRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeSentimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSentimentRequest"; + }; + return AnalyzeSentimentRequest; })(); @@ -4808,17 +5014,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); - break; - case 2: - message.language = reader.string(); - break; - case 3: - if (!(message.sentences && message.sentences.length)) - message.sentences = []; - message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); - break; + case 1: { + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.language = reader.string(); + break; + } + case 3: { + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -4948,6 +5157,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeSentimentResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeSentimentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSentimentResponse"; + }; + return AnalyzeSentimentResponse; })(); @@ -5054,12 +5278,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); - break; - case 2: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5186,6 +5412,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeEntitySentimentRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeEntitySentimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitySentimentRequest"; + }; + return AnalyzeEntitySentimentRequest; })(); @@ -5294,14 +5535,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); - break; - case 2: - message.language = reader.string(); - break; + case 1: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); + break; + } + case 2: { + message.language = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5417,6 +5660,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeEntitySentimentResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeEntitySentimentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitySentimentResponse"; + }; + return AnalyzeEntitySentimentResponse; })(); @@ -5523,12 +5781,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); - break; - case 2: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5655,6 +5915,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeEntitiesRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitiesRequest"; + }; + return AnalyzeEntitiesRequest; })(); @@ -5763,14 +6038,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); - break; - case 2: - message.language = reader.string(); - break; + case 1: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); + break; + } + case 2: { + message.language = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5886,6 +6163,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeEntitiesResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitiesResponse"; + }; + return AnalyzeEntitiesResponse; })(); @@ -5992,12 +6284,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); - break; - case 2: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -6124,6 +6418,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeSyntaxRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeSyntaxRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSyntaxRequest"; + }; + return AnalyzeSyntaxRequest; })(); @@ -6245,19 +6554,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sentences && message.sentences.length)) - message.sentences = []; - message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); - break; - case 3: - message.language = reader.string(); - break; + case 1: { + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); + break; + } + case 3: { + message.language = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6399,6 +6711,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeSyntaxResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeSyntaxResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSyntaxResponse"; + }; + return AnalyzeSyntaxResponse; })(); @@ -6494,9 +6821,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); - break; + case 1: { + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6591,6 +6919,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClassifyTextRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1.ClassifyTextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClassifyTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.ClassifyTextRequest"; + }; + return ClassifyTextRequest; })(); @@ -6688,11 +7031,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -6799,6 +7143,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClassifyTextResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClassifyTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.ClassifyTextResponse"; + }; + return ClassifyTextResponse; })(); @@ -6916,15 +7275,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); - break; - case 2: - message.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.decode(reader, reader.uint32()); - break; - case 3: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.decode(reader, reader.uint32()); + break; + } + case 3: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7064,6 +7426,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnnotateTextRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnnotateTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnnotateTextRequest"; + }; + AnnotateTextRequest.Features = (function() { /** @@ -7200,21 +7577,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.extractSyntax = reader.bool(); - break; - case 2: - message.extractEntities = reader.bool(); - break; - case 3: - message.extractDocumentSentiment = reader.bool(); - break; - case 4: - message.extractEntitySentiment = reader.bool(); - break; - case 6: - message.classifyText = reader.bool(); - break; + case 1: { + message.extractSyntax = reader.bool(); + break; + } + case 2: { + message.extractEntities = reader.bool(); + break; + } + case 3: { + message.extractDocumentSentiment = reader.bool(); + break; + } + case 4: { + message.extractEntitySentiment = reader.bool(); + break; + } + case 6: { + message.classifyText = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7337,6 +7719,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Features + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Features.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnnotateTextRequest.Features"; + }; + return Features; })(); @@ -7498,32 +7895,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sentences && message.sentences.length)) - message.sentences = []; - message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); - break; - case 4: - message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); - break; - case 5: - message.language = reader.string(); - break; - case 6: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); + break; + } + case 4: { + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + } + case 5: { + message.language = reader.string(); + break; + } + case 6: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7729,6 +8132,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnnotateTextResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnnotateTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnnotateTextResponse"; + }; + return AnnotateTextResponse; })(); @@ -7777,7 +8195,7 @@ }; /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeSentiment}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeSentiment}. * @memberof google.cloud.language.v1beta2.LanguageService * @typedef AnalyzeSentimentCallback * @type {function} @@ -7810,7 +8228,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeEntities}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeEntities}. * @memberof google.cloud.language.v1beta2.LanguageService * @typedef AnalyzeEntitiesCallback * @type {function} @@ -7843,7 +8261,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeEntitySentiment}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeEntitySentiment}. * @memberof google.cloud.language.v1beta2.LanguageService * @typedef AnalyzeEntitySentimentCallback * @type {function} @@ -7876,7 +8294,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#analyzeSyntax}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeSyntax}. * @memberof google.cloud.language.v1beta2.LanguageService * @typedef AnalyzeSyntaxCallback * @type {function} @@ -7909,7 +8327,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#classifyText}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|classifyText}. * @memberof google.cloud.language.v1beta2.LanguageService * @typedef ClassifyTextCallback * @type {function} @@ -7942,7 +8360,7 @@ */ /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService#annotateText}. + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|annotateText}. * @memberof google.cloud.language.v1beta2.LanguageService * @typedef AnnotateTextCallback * @type {function} @@ -8116,18 +8534,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.content = reader.string(); - break; - case 3: - message.gcsContentUri = reader.string(); - break; - case 4: - message.language = reader.string(); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.content = reader.string(); + break; + } + case 3: { + message.gcsContentUri = reader.string(); + break; + } + case 4: { + message.language = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8271,6 +8693,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Document + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.Document + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.Document"; + }; + /** * Type enum. * @name google.cloud.language.v1beta2.Document.Type @@ -8393,12 +8830,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); - break; - case 2: - message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); - break; + case 1: { + message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8507,6 +8946,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Sentence + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.Sentence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sentence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.Sentence"; + }; + return Sentence; })(); @@ -8661,47 +9115,53 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.metadata[key] = value; + break; + } + case 4: { + message.salience = reader.float(); + break; + } + case 5: { + if (!(message.mentions && message.mentions.length)) + message.mentions = []; + message.mentions.push($root.google.cloud.language.v1beta2.EntityMention.decode(reader, reader.uint32())); + break; + } + case 6: { + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; } - message.metadata[key] = value; - break; - case 4: - message.salience = reader.float(); - break; - case 5: - if (!(message.mentions && message.mentions.length)) - message.mentions = []; - message.mentions.push($root.google.cloud.language.v1beta2.EntityMention.decode(reader, reader.uint32())); - break; - case 6: - message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + default: + reader.skipType(tag & 7); break; } } @@ -8936,6 +9396,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Entity + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.Entity"; + }; + /** * Type enum. * @name google.cloud.language.v1beta2.Entity.Type @@ -9100,18 +9575,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); - break; - case 2: - message.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.decode(reader, reader.uint32()); - break; - case 3: - message.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.decode(reader, reader.uint32()); - break; - case 4: - message.lemma = reader.string(); - break; + case 1: { + message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lemma = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9241,6 +9720,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Token + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.Token + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Token.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.Token"; + }; + return Token; })(); @@ -9365,12 +9859,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.magnitude = reader.float(); - break; - case 3: - message.score = reader.float(); - break; + case 2: { + message.magnitude = reader.float(); + break; + } + case 3: { + message.score = reader.float(); + break; + } default: reader.skipType(tag & 7); break; @@ -9469,6 +9965,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Sentiment + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sentiment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.Sentiment"; + }; + return Sentiment; })(); @@ -9685,42 +10196,54 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tag = reader.int32(); - break; - case 2: - message.aspect = reader.int32(); - break; - case 3: - message["case"] = reader.int32(); - break; - case 4: - message.form = reader.int32(); - break; - case 5: - message.gender = reader.int32(); - break; - case 6: - message.mood = reader.int32(); - break; - case 7: - message.number = reader.int32(); - break; - case 8: - message.person = reader.int32(); - break; - case 9: - message.proper = reader.int32(); - break; - case 10: - message.reciprocity = reader.int32(); - break; - case 11: - message.tense = reader.int32(); - break; - case 12: - message.voice = reader.int32(); - break; + case 1: { + message.tag = reader.int32(); + break; + } + case 2: { + message.aspect = reader.int32(); + break; + } + case 3: { + message["case"] = reader.int32(); + break; + } + case 4: { + message.form = reader.int32(); + break; + } + case 5: { + message.gender = reader.int32(); + break; + } + case 6: { + message.mood = reader.int32(); + break; + } + case 7: { + message.number = reader.int32(); + break; + } + case 8: { + message.person = reader.int32(); + break; + } + case 9: { + message.proper = reader.int32(); + break; + } + case 10: { + message.reciprocity = reader.int32(); + break; + } + case 11: { + message.tense = reader.int32(); + break; + } + case 12: { + message.voice = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -10345,6 +10868,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PartOfSpeech + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartOfSpeech.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.PartOfSpeech"; + }; + /** * Tag enum. * @name google.cloud.language.v1beta2.PartOfSpeech.Tag @@ -10735,12 +11273,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.headTokenIndex = reader.int32(); - break; - case 2: - message.label = reader.int32(); - break; + case 1: { + message.headTokenIndex = reader.int32(); + break; + } + case 2: { + message.label = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -11257,6 +11797,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DependencyEdge + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DependencyEdge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.DependencyEdge"; + }; + /** * Label enum. * @name google.cloud.language.v1beta2.DependencyEdge.Label @@ -11550,15 +12105,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); - break; + case 1: { + message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -11693,6 +12251,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EntityMention + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityMention.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.EntityMention"; + }; + /** * Type enum. * @name google.cloud.language.v1beta2.EntityMention.Type @@ -11815,12 +12388,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.content = reader.string(); - break; - case 2: - message.beginOffset = reader.int32(); - break; + case 1: { + message.content = reader.string(); + break; + } + case 2: { + message.beginOffset = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -11919,6 +12494,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TextSpan + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextSpan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.TextSpan"; + }; + return TextSpan; })(); @@ -12025,12 +12615,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.confidence = reader.float(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.confidence = reader.float(); + break; + } default: reader.skipType(tag & 7); break; @@ -12129,6 +12721,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClassificationCategory + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.ClassificationCategory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClassificationCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.ClassificationCategory"; + }; + return ClassificationCategory; })(); @@ -12235,12 +12842,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); - break; - case 2: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12367,6 +12976,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeSentimentRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeSentimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnalyzeSentimentRequest"; + }; + return AnalyzeSentimentRequest; })(); @@ -12486,17 +13110,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); - break; - case 2: - message.language = reader.string(); - break; - case 3: - if (!(message.sentences && message.sentences.length)) - message.sentences = []; - message.sentences.push($root.google.cloud.language.v1beta2.Sentence.decode(reader, reader.uint32())); - break; + case 1: { + message.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.language = reader.string(); + break; + } + case 3: { + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1beta2.Sentence.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -12626,6 +13253,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeSentimentResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnalyzeSentimentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeSentimentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnalyzeSentimentResponse"; + }; + return AnalyzeSentimentResponse; })(); @@ -12732,12 +13374,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); - break; - case 2: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12864,6 +13508,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeEntitySentimentRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeEntitySentimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest"; + }; + return AnalyzeEntitySentimentRequest; })(); @@ -12972,14 +13631,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.language.v1beta2.Entity.decode(reader, reader.uint32())); - break; - case 2: - message.language = reader.string(); - break; + case 1: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1beta2.Entity.decode(reader, reader.uint32())); + break; + } + case 2: { + message.language = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13095,6 +13756,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeEntitySentimentResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeEntitySentimentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse"; + }; + return AnalyzeEntitySentimentResponse; })(); @@ -13201,12 +13877,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); - break; - case 2: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -13333,6 +14011,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeEntitiesRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnalyzeEntitiesRequest"; + }; + return AnalyzeEntitiesRequest; })(); @@ -13441,15 +14134,17 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.language.v1beta2.Entity.decode(reader, reader.uint32())); - break; - case 2: - message.language = reader.string(); - break; - default: + case 1: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1beta2.Entity.decode(reader, reader.uint32())); + break; + } + case 2: { + message.language = reader.string(); + break; + } + default: reader.skipType(tag & 7); break; } @@ -13564,6 +14259,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeEntitiesResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnalyzeEntitiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnalyzeEntitiesResponse"; + }; + return AnalyzeEntitiesResponse; })(); @@ -13670,12 +14380,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); - break; - case 2: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -13802,6 +14514,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeSyntaxRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeSyntaxRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnalyzeSyntaxRequest"; + }; + return AnalyzeSyntaxRequest; })(); @@ -13923,19 +14650,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sentences && message.sentences.length)) - message.sentences = []; - message.sentences.push($root.google.cloud.language.v1beta2.Sentence.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.google.cloud.language.v1beta2.Token.decode(reader, reader.uint32())); - break; - case 3: - message.language = reader.string(); - break; + case 1: { + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1beta2.Sentence.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1beta2.Token.decode(reader, reader.uint32())); + break; + } + case 3: { + message.language = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14077,6 +14807,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnalyzeSyntaxResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnalyzeSyntaxResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeSyntaxResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnalyzeSyntaxResponse"; + }; + return AnalyzeSyntaxResponse; })(); @@ -14172,9 +14917,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); - break; + case 1: { + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14269,6 +15015,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClassifyTextRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClassifyTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.ClassifyTextRequest"; + }; + return ClassifyTextRequest; })(); @@ -14366,11 +15127,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.language.v1beta2.ClassificationCategory.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1beta2.ClassificationCategory.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -14477,6 +15239,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClassifyTextResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.ClassifyTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClassifyTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.ClassifyTextResponse"; + }; + return ClassifyTextResponse; })(); @@ -14594,15 +15371,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); - break; - case 2: - message.features = $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features.decode(reader, reader.uint32()); - break; - case 3: - message.encodingType = reader.int32(); - break; + case 1: { + message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); + break; + } + case 2: { + message.features = $root.google.cloud.language.v1beta2.AnnotateTextRequest.Features.decode(reader, reader.uint32()); + break; + } + case 3: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -14742,6 +15522,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnnotateTextRequest + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnnotateTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnnotateTextRequest"; + }; + AnnotateTextRequest.Features = (function() { /** @@ -14878,21 +15673,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.extractSyntax = reader.bool(); - break; - case 2: - message.extractEntities = reader.bool(); - break; - case 3: - message.extractDocumentSentiment = reader.bool(); - break; - case 4: - message.extractEntitySentiment = reader.bool(); - break; - case 6: - message.classifyText = reader.bool(); - break; + case 1: { + message.extractSyntax = reader.bool(); + break; + } + case 2: { + message.extractEntities = reader.bool(); + break; + } + case 3: { + message.extractDocumentSentiment = reader.bool(); + break; + } + case 4: { + message.extractEntitySentiment = reader.bool(); + break; + } + case 6: { + message.classifyText = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -15015,6 +15815,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Features + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Features.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnnotateTextRequest.Features"; + }; + return Features; })(); @@ -15176,32 +15991,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sentences && message.sentences.length)) - message.sentences = []; - message.sentences.push($root.google.cloud.language.v1beta2.Sentence.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.google.cloud.language.v1beta2.Token.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.language.v1beta2.Entity.decode(reader, reader.uint32())); - break; - case 4: - message.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); - break; - case 5: - message.language = reader.string(); - break; - case 6: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.language.v1beta2.ClassificationCategory.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1beta2.Sentence.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1beta2.Token.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1beta2.Entity.decode(reader, reader.uint32())); + break; + } + case 4: { + message.documentSentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + } + case 5: { + message.language = reader.string(); + break; + } + case 6: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1beta2.ClassificationCategory.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -15407,6 +16228,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnnotateTextResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.AnnotateTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnnotateTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.AnnotateTextResponse"; + }; + return AnnotateTextResponse; })(); @@ -15533,14 +16369,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -15656,6 +16494,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -15866,38 +16719,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -16119,6 +16982,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -16225,12 +17103,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16329,6 +17209,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -16464,11 +17359,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -16575,6 +17471,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -16596,6 +17507,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -16716,6 +17628,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -16771,6 +17691,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -16805,66 +17727,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16976,6 +17914,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -17068,6 +18009,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -17099,6 +18042,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -17145,6 +18089,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -17159,6 +18105,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -17369,52 +18330,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -17715,6 +18686,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -17829,15 +18815,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17949,6 +18938,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -18055,12 +19059,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -18159,6 +19165,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -18259,11 +19280,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -18370,6 +19392,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + return ExtensionRangeOptions; })(); @@ -18575,39 +19612,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -18894,6 +19942,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -19062,12 +20125,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19171,6 +20236,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -19316,27 +20396,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -19512,6 +20597,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -19615,12 +20715,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -19719,6 +20821,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -19839,15 +20956,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19959,6 +21079,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -20078,17 +21213,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20218,6 +21356,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -20368,24 +21521,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -20521,6 +21680,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -20838,71 +22012,92 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -21189,6 +22384,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -21346,23 +22556,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -21503,6 +22718,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -21516,6 +22746,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -21571,6 +22802,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -21639,6 +22878,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -21682,39 +22923,51 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -21774,6 +23027,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -21854,6 +23110,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -21936,6 +23194,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; } if (message.ctype != null && message.hasOwnProperty("ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; @@ -21949,6 +23208,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -21973,6 +23234,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -22102,11 +23378,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -22213,6 +23490,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -22332,17 +23624,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -22467,6 +23762,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -22575,14 +23885,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -22698,6 +24010,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -22828,20 +24155,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22974,6 +24305,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + return ServiceOptions; })(); @@ -23117,25 +24463,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -23312,6 +24663,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -23491,29 +24857,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23626,7 +24999,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -23707,6 +25080,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -23808,12 +25196,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -23914,6 +25304,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -24014,11 +25419,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -24125,6 +25531,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -24273,37 +25694,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -24464,6 +25890,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -24564,11 +26005,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -24675,6 +26117,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -24685,6 +26142,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -24735,6 +26193,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -24771,6 +26237,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -24805,25 +26273,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -24875,6 +26351,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -24903,6 +26388,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -24925,6 +26424,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -24937,6 +26437,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -24951,6 +26453,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index 8b9cda30601..70a8291cf94 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -1917,6 +1917,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -2445,6 +2449,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -2737,6 +2748,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From f350c9e970f9603f2edd3644b9422578f1408aa4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 04:58:24 +0000 Subject: [PATCH 480/488] fix: do not import the whole google-gax from proto JS (#1553) (#687) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-cloud-language/package.json | 2 +- packages/google-cloud-language/protos/protos.d.ts | 2 +- packages/google-cloud-language/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6da42b34c3e..6c00cdc6d3b 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -46,7 +46,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index f03276aa560..d90d7662743 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index bcb5dda16ab..fa011976e9a 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From 5028b0b97b94d57eb375a403abe3d02af6f21daf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:58:18 +0000 Subject: [PATCH 481/488] fix: allow passing gax instance to client constructor (#688) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1/language_service_client.ts | 31 +++++++++++++++---- .../src/v1beta2/language_service_client.ts | 31 +++++++++++++++---- 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index a599e7007fd..04e488f1e98 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -17,8 +17,13 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -28,7 +33,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './language_service_client_config.json'; - const version = require('../../../package.json').version; /** @@ -88,8 +92,18 @@ export class LanguageServiceClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new LanguageServiceClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof LanguageServiceClient; const servicePath = @@ -109,8 +123,13 @@ export class LanguageServiceClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -164,7 +183,7 @@ export class LanguageServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 7589d3b2e0a..56e2b76b802 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -17,8 +17,13 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -28,7 +33,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './language_service_client_config.json'; - const version = require('../../../package.json').version; /** @@ -88,8 +92,18 @@ export class LanguageServiceClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new LanguageServiceClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof LanguageServiceClient; const servicePath = @@ -109,8 +123,13 @@ export class LanguageServiceClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -164,7 +183,7 @@ export class LanguageServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** From cddb0bacbaf30dac421229efc3343bcc13548d57 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 16:45:18 -0400 Subject: [PATCH 482/488] chore(main): release 5.0.2 (#681) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 5.0.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-language/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-language/package.json | 2 +- .../snippet_metadata.google.cloud.language.v1.json | 2 +- ...ppet_metadata.google.cloud.language.v1beta2.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index dedc840c080..8d21b0ceb40 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [5.0.2](https://github.com/googleapis/nodejs-language/compare/v5.0.1...v5.0.2) (2022-09-01) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#688](https://github.com/googleapis/nodejs-language/issues/688)) ([a6427f0](https://github.com/googleapis/nodejs-language/commit/a6427f0b488ff09172b0dd3303f26a58b2d9cfde)) +* Better support for fallback mode ([#683](https://github.com/googleapis/nodejs-language/issues/683)) ([f97d4ec](https://github.com/googleapis/nodejs-language/commit/f97d4ec5197cb4571235d28cca13eda2c5ad1243)) +* Change import long to require ([#684](https://github.com/googleapis/nodejs-language/issues/684)) ([dfa3ad2](https://github.com/googleapis/nodejs-language/commit/dfa3ad26f1090aac180406dfd8692b5e15fa87f5)) +* **deps:** Update dependency @google-cloud/automl to v3 ([#672](https://github.com/googleapis/nodejs-language/issues/672)) ([4385333](https://github.com/googleapis/nodejs-language/commit/4385333ed516e98cf5ea44bb1aa133cc7eebb203)) +* **deps:** Update dependency mathjs to v11 ([#679](https://github.com/googleapis/nodejs-language/issues/679)) ([ba23db6](https://github.com/googleapis/nodejs-language/commit/ba23db66808c202b2494019264a6246e66d5f58a)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-language/issues/1553)) ([#687](https://github.com/googleapis/nodejs-language/issues/687)) ([f3c627d](https://github.com/googleapis/nodejs-language/commit/f3c627d25b3a25ac20ae8b61f44ec236202cfb53)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-language/issues/1546)) ([#686](https://github.com/googleapis/nodejs-language/issues/686)) ([9a47a8d](https://github.com/googleapis/nodejs-language/commit/9a47a8d29f4df3a6ba428b462ac6a255eab28ab1)) + ## [5.0.1](https://github.com/googleapis/nodejs-language/compare/v5.0.0...v5.0.1) (2022-06-30) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 6c00cdc6d3b..f9165e5d05d 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "5.0.1", + "version": "5.0.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index 0d407c6c11c..79fdbdeebee 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "5.0.1", + "version": "5.0.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index 441db929ca6..0a84af81ff7 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "5.0.1", + "version": "5.0.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index ba60becb949..a1514060dd0 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^3.0.0", "mathjs": "^11.0.0", - "@google-cloud/language": "^5.0.1", + "@google-cloud/language": "^5.0.2", "@google-cloud/storage": "^6.0.0", "yargs": "^16.0.0" }, From db74023ec7d2260c856e6df9b8502c9b8ef80245 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Sep 2022 01:12:23 +0200 Subject: [PATCH 483/488] chore(deps): update dependency uuid to v9 (#690) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [uuid](https://togithub.com/uuidjs/uuid) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/uuid/8.3.2/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/compatibility-slim/8.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/confidence-slim/8.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
uuidjs/uuid ### [`v9.0.0`](https://togithub.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#​900-httpsgithubcomuuidjsuuidcomparev832v900-2022-09-05) [Compare Source](https://togithub.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) ##### ⚠ BREAKING CHANGES - Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022. - Remove the minified UMD build from the package. Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays. For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished. - Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015. This also removes the fallback on msCrypto instead of the crypto API. Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack. ##### Features - optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#​597](https://togithub.com/uuidjs/uuid/issues/597)) ([3a033f6](https://togithub.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc)) - remove UMD build ([#​645](https://togithub.com/uuidjs/uuid/issues/645)) ([e948a0f](https://togithub.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#​620](https://togithub.com/uuidjs/uuid/issues/620) - use native crypto.randomUUID when available ([#​600](https://togithub.com/uuidjs/uuid/issues/600)) ([c9e076c](https://togithub.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4)) ##### Bug Fixes - add Jest/jsdom compatibility ([#​642](https://togithub.com/uuidjs/uuid/issues/642)) ([16f9c46](https://togithub.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd)) - change default export to named function ([#​545](https://togithub.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://togithub.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a)) - handle error when parameter is not set in v3 and v5 ([#​622](https://togithub.com/uuidjs/uuid/issues/622)) ([fcd7388](https://togithub.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091)) - run npm audit fix ([#​644](https://togithub.com/uuidjs/uuid/issues/644)) ([04686f5](https://togithub.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353)) - upgrading from uuid3 broken link ([#​568](https://togithub.com/uuidjs/uuid/issues/568)) ([1c849da](https://togithub.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6)) ##### build - drop Node.js 8.x from babel transpile target ([#​603](https://togithub.com/uuidjs/uuid/issues/603)) ([aa11485](https://togithub.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5)) - drop support for legacy browsers (IE11, Safari 10) ([#​604](https://togithub.com/uuidjs/uuid/issues/604)) ([0f433e5](https://togithub.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148)) - drop node 10.x to upgrade dev dependencies ([#​653](https://togithub.com/uuidjs/uuid/issues/653)) ([28a5712](https://togithub.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#​643](https://togithub.com/uuidjs/uuid/issues/643) ##### [8.3.2](https://togithub.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) ##### Bug Fixes - lazy load getRandomValues ([#​537](https://togithub.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://togithub.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#​536](https://togithub.com/uuidjs/uuid/issues/536) ##### [8.3.1](https://togithub.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) ##### Bug Fixes - support expo>=39.0.0 ([#​515](https://togithub.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://togithub.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#​375](https://togithub.com/uuidjs/uuid/issues/375)
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language). --- packages/google-cloud-language/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index a1514060dd0..ac3b46af053 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -24,6 +24,6 @@ "devDependencies": { "chai": "^4.2.0", "mocha": "^8.0.0", - "uuid": "^8.0.0" + "uuid": "^9.0.0" } } \ No newline at end of file From d1910457bcd7064d63d33671b3a50fc9b3e93b87 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:32:11 +0000 Subject: [PATCH 484/488] fix: preserve default values in x-goog-request-params header (#691) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../test/gapic_language_service_v1.ts | 123 +++--------------- .../test/gapic_language_service_v1beta2.ts | 123 +++--------------- 2 files changed, 30 insertions(+), 216 deletions(-) diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index 64650cef39c..17d06cbccb6 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -25,6 +25,21 @@ import * as languageserviceModule from '../src'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -159,18 +174,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentResponse() ); client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); const [response] = await client.analyzeSentiment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeSentiment without error using callback', async () => { @@ -182,7 +191,6 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentResponse() ); @@ -205,11 +213,6 @@ describe('v1.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes analyzeSentiment with error', async () => { @@ -221,18 +224,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeSentiment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.analyzeSentiment(request), expectedError); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeSentiment with closed client', async () => { @@ -260,18 +257,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() ); client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); const [response] = await client.analyzeEntities(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeEntities without error using callback', async () => { @@ -283,7 +274,6 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesResponse() ); @@ -306,11 +296,6 @@ describe('v1.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes analyzeEntities with error', async () => { @@ -322,18 +307,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeEntities = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.analyzeEntities(request), expectedError); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeEntities with closed client', async () => { @@ -361,7 +340,6 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() ); @@ -369,11 +347,6 @@ describe('v1.LanguageServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.analyzeEntitySentiment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeEntitySentiment without error using callback', async () => { @@ -385,7 +358,6 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentResponse() ); @@ -408,11 +380,6 @@ describe('v1.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes analyzeEntitySentiment with error', async () => { @@ -424,7 +391,6 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( undefined, @@ -434,11 +400,6 @@ describe('v1.LanguageServiceClient', () => { client.analyzeEntitySentiment(request), expectedError ); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeEntitySentiment with closed client', async () => { @@ -469,18 +430,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() ); client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); const [response] = await client.analyzeSyntax(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeSyntax without error using callback', async () => { @@ -492,7 +447,6 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxResponse() ); @@ -515,11 +469,6 @@ describe('v1.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes analyzeSyntax with error', async () => { @@ -531,18 +480,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeSyntax = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.analyzeSyntax(request), expectedError); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeSyntax with closed client', async () => { @@ -570,18 +513,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextResponse() ); client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); const [response] = await client.classifyText(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes classifyText without error using callback', async () => { @@ -593,7 +530,6 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextResponse() ); @@ -616,11 +552,6 @@ describe('v1.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes classifyText with error', async () => { @@ -632,18 +563,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.classifyText = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.classifyText(request), expectedError); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes classifyText with closed client', async () => { @@ -671,18 +596,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextResponse() ); client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); const [response] = await client.annotateText(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes annotateText without error using callback', async () => { @@ -694,7 +613,6 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextResponse() ); @@ -717,11 +635,6 @@ describe('v1.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes annotateText with error', async () => { @@ -733,18 +646,12 @@ describe('v1.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.annotateText = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.annotateText(request), expectedError); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes annotateText with closed client', async () => { diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index b5d374b89f5..2be35ca9796 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -25,6 +25,21 @@ import * as languageserviceModule from '../src'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -159,18 +174,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() ); client.innerApiCalls.analyzeSentiment = stubSimpleCall(expectedResponse); const [response] = await client.analyzeSentiment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeSentiment without error using callback', async () => { @@ -182,7 +191,6 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentResponse() ); @@ -205,11 +213,6 @@ describe('v1beta2.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes analyzeSentiment with error', async () => { @@ -221,18 +224,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeSentiment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.analyzeSentiment(request), expectedError); - assert( - (client.innerApiCalls.analyzeSentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeSentiment with closed client', async () => { @@ -260,18 +257,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() ); client.innerApiCalls.analyzeEntities = stubSimpleCall(expectedResponse); const [response] = await client.analyzeEntities(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeEntities without error using callback', async () => { @@ -283,7 +274,6 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesResponse() ); @@ -306,11 +296,6 @@ describe('v1beta2.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes analyzeEntities with error', async () => { @@ -322,18 +307,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeEntities = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.analyzeEntities(request), expectedError); - assert( - (client.innerApiCalls.analyzeEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeEntities with closed client', async () => { @@ -361,7 +340,6 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() ); @@ -369,11 +347,6 @@ describe('v1beta2.LanguageServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.analyzeEntitySentiment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeEntitySentiment without error using callback', async () => { @@ -385,7 +358,6 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse() ); @@ -408,11 +380,6 @@ describe('v1beta2.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes analyzeEntitySentiment with error', async () => { @@ -424,7 +391,6 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeEntitySentiment = stubSimpleCall( undefined, @@ -434,11 +400,6 @@ describe('v1beta2.LanguageServiceClient', () => { client.analyzeEntitySentiment(request), expectedError ); - assert( - (client.innerApiCalls.analyzeEntitySentiment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeEntitySentiment with closed client', async () => { @@ -469,18 +430,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() ); client.innerApiCalls.analyzeSyntax = stubSimpleCall(expectedResponse); const [response] = await client.analyzeSyntax(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeSyntax without error using callback', async () => { @@ -492,7 +447,6 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxResponse() ); @@ -515,11 +469,6 @@ describe('v1beta2.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes analyzeSyntax with error', async () => { @@ -531,18 +480,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.analyzeSyntax = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.analyzeSyntax(request), expectedError); - assert( - (client.innerApiCalls.analyzeSyntax as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes analyzeSyntax with closed client', async () => { @@ -570,18 +513,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextResponse() ); client.innerApiCalls.classifyText = stubSimpleCall(expectedResponse); const [response] = await client.classifyText(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes classifyText without error using callback', async () => { @@ -593,7 +530,6 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextResponse() ); @@ -616,11 +552,6 @@ describe('v1beta2.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes classifyText with error', async () => { @@ -632,18 +563,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.classifyText = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.classifyText(request), expectedError); - assert( - (client.innerApiCalls.classifyText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes classifyText with closed client', async () => { @@ -671,18 +596,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextResponse() ); client.innerApiCalls.annotateText = stubSimpleCall(expectedResponse); const [response] = await client.annotateText(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes annotateText without error using callback', async () => { @@ -694,7 +613,6 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextResponse() ); @@ -717,11 +635,6 @@ describe('v1beta2.LanguageServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes annotateText with error', async () => { @@ -733,18 +646,12 @@ describe('v1beta2.LanguageServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.annotateText = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.annotateText(request), expectedError); - assert( - (client.innerApiCalls.annotateText as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes annotateText with closed client', async () => { From 00b7a2469114286da0a0c849e9bc90bb8dd4043e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 17:33:18 -0700 Subject: [PATCH 485/488] feat: Add support for V1 and V2 classification models for the V1Beta2 API (#697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for V1 and V2 classification models for the V1 API PiperOrigin-RevId: 475599241 Source-Link: https://github.com/googleapis/googleapis/commit/05b99f982df9837c294ea3475a571a9252c68326 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3dcdbed8d968f634be0a2d3107237d232ee8b061 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2RjZGJlZDhkOTY4ZjYzNGJlMGEyZDMxMDcyMzdkMjMyZWU4YjA2MSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Add support for V1 and V2 classification models for the V1Beta2 API PiperOrigin-RevId: 475604619 Source-Link: https://github.com/googleapis/googleapis/commit/044a15c14b1a1939684ad271c13ac84c5ac6a2c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/410020af934c7248f7804770d6f8ec4571bfa551 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDEwMDIwYWY5MzRjNzI0OGY3ODA0NzcwZDZmOGVjNDU3MWJmYTU1MSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../cloud/language/v1/language_service.proto | 233 +- .../language/v1beta2/language_service.proto | 130 +- .../google-cloud-language/protos/protos.d.ts | 689 +- .../google-cloud-language/protos/protos.js | 11194 +++++++++------- .../google-cloud-language/protos/protos.json | 147 +- .../v1/language_service.analyze_entities.js | 2 +- ...nguage_service.analyze_entity_sentiment.js | 2 +- .../v1/language_service.analyze_sentiment.js | 2 +- .../v1/language_service.analyze_syntax.js | 2 +- .../v1/language_service.annotate_text.js | 4 +- .../v1/language_service.classify_text.js | 7 +- ...pet_metadata.google.cloud.language.v1.json | 6 +- .../v1beta2/language_service.classify_text.js | 5 + ...etadata.google.cloud.language.v1beta2.json | 8 +- .../src/v1/language_service_client.ts | 23 +- .../src/v1beta2/language_service_client.ts | 5 +- 16 files changed, 7466 insertions(+), 4993 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index 304eab073a3..06c68a27935 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -26,16 +25,17 @@ option java_multiple_files = true; option java_outer_classname = "LanguageServiceProto"; option java_package = "com.google.cloud.language.v1"; - // Provides text analysis operations such as sentiment analysis and entity // recognition. service LanguageService { option (google.api.default_host) = "language.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-language," - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-language," + "https://www.googleapis.com/auth/cloud-platform"; + // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { + rpc AnalyzeSentiment(AnalyzeSentimentRequest) + returns (AnalyzeSentimentResponse) { option (google.api.http) = { post: "/v1/documents:analyzeSentiment" body: "*" @@ -47,7 +47,8 @@ service LanguageService { // Finds named entities (currently proper names and common nouns) in the text // along with entity types, salience, mentions for each entity, and // other properties. - rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { + rpc AnalyzeEntities(AnalyzeEntitiesRequest) + returns (AnalyzeEntitiesResponse) { option (google.api.http) = { post: "/v1/documents:analyzeEntities" body: "*" @@ -56,9 +57,12 @@ service LanguageService { option (google.api.method_signature) = "document"; } - // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes - // sentiment associated with each entity and its mentions. - rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { + // Finds entities, similar to + // [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] + // in the text and analyzes sentiment associated with each entity and its + // mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) + returns (AnalyzeEntitySentimentResponse) { option (google.api.http) = { post: "/v1/documents:analyzeEntitySentiment" body: "*" @@ -100,7 +104,7 @@ service LanguageService { } } - +// ################################################################ # // // Represents the input to API methods. message Document { @@ -151,11 +155,37 @@ message Sentence { TextSpan text = 1; // For calls to [AnalyzeSentiment][] or if - // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to - // true, this field will contain the sentiment for the sentence. + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] + // is set to true, this field will contain the sentiment for the sentence. Sentiment sentiment = 2; } +// Represents the text encoding that the caller uses to process the output. +// Providing an `EncodingType` is recommended because the API provides the +// beginning offsets for various outputs, such as tokens and mentions, and +// languages that natively use different text encodings may access offsets +// differently. +enum EncodingType { + // If `EncodingType` is not specified, encoding-dependent information (such as + // `begin_offset`) will be set at `-1`. + NONE = 0; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-8 encoding of the input. C++ and Go are examples of languages + // that use this encoding natively. + UTF8 = 1; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-16 encoding of the input. Java and JavaScript are examples of + // languages that use this encoding natively. + UTF16 = 2; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-32 encoding of the input. Python is an example of a language + // that uses this encoding natively. + UTF32 = 3; +} + // Represents a phrase in the text that is a known entity, such as // a person, an organization, or location. The API associates information, such // as salience and mentions, with entities. @@ -189,44 +219,53 @@ message Entity { // Other types of entities OTHER = 7; - // Phone number

+ // Phone number + // // The metadata lists the phone number, formatted according to local - // convention, plus whichever additional elements appear in the text:
    - //
  • number – the actual number, broken down into - // sections as per local convention
  • national_prefix - // – country code, if detected
  • area_code – - // region or area code, if detected
  • extension – - // phone extension (to be dialed after connection), if detected
+ // convention, plus whichever additional elements appear in the text: + // + // * `number` - the actual number, broken down into sections as per local + // convention + // * `national_prefix` - country code, if detected + // * `area_code` - region or area code, if detected + // * `extension` - phone extension (to be dialed after connection), if + // detected PHONE_NUMBER = 9; - // Address

+ // Address + // // The metadata identifies the street number and locality plus whichever - // additional elements appear in the text:
    - //
  • street_number – street number
  • - //
  • locality – city or town
  • - //
  • street_name – street/route name, if detected
  • - //
  • postal_code – postal code, if detected
  • - //
  • country – country, if detected
  • - //
  • broad_region – administrative area, such as the - // state, if detected
  • narrow_region – smaller - // administrative area, such as county, if detected
  • - //
  • sublocality – used in Asian addresses to demark a - // district within a city, if detected
+ // additional elements appear in the text: + // + // * `street_number` - street number + // * `locality` - city or town + // * `street_name` - street/route name, if detected + // * `postal_code` - postal code, if detected + // * `country` - country, if detected< + // * `broad_region` - administrative area, such as the state, if detected + // * `narrow_region` - smaller administrative area, such as county, if + // detected + // * `sublocality` - used in Asian addresses to demark a district within a + // city, if detected ADDRESS = 10; - // Date

- // The metadata identifies the components of the date:
    - //
  • year – four digit year, if detected
  • - //
  • month – two digit month number, if detected
  • - //
  • day – two digit day number, if detected
+ // Date + // + // The metadata identifies the components of the date: + // + // * `year` - four digit year, if detected + // * `month` - two digit month number, if detected + // * `day` - two digit day number, if detected DATE = 11; - // Number

+ // Number + // // The metadata is the number itself. NUMBER = 12; - // Price

- // The metadata identifies the value and currency. + // Price + // + // The metadata identifies the `value` and `currency`. PRICE = 13; } @@ -256,38 +295,12 @@ message Entity { repeated EntityMention mentions = 5; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - // true, this field will contain the aggregate sentiment expressed for this - // entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] + // is set to true, this field will contain the aggregate sentiment expressed + // for this entity in the provided document. Sentiment sentiment = 6; } -// Represents the text encoding that the caller uses to process the output. -// Providing an `EncodingType` is recommended because the API provides the -// beginning offsets for various outputs, such as tokens and mentions, and -// languages that natively use different text encodings may access offsets -// differently. -enum EncodingType { - // If `EncodingType` is not specified, encoding-dependent information (such as - // `begin_offset`) will be set at `-1`. - NONE = 0; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-8 encoding of the input. C++ and Go are examples of languages - // that use this encoding natively. - UTF8 = 1; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-16 encoding of the input. Java and JavaScript are examples of - // languages that use this encoding natively. - UTF16 = 2; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-32 encoding of the input. Python is an example of a language - // that uses this encoding natively. - UTF32 = 3; -} - // Represents the smallest syntactic building block of the text. message Token { // The token text. @@ -935,9 +948,9 @@ message EntityMention { Type type = 2; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - // true, this field will contain the sentiment expressed for this mention of - // the entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] + // is set to true, this field will contain the sentiment expressed for this + // mention of the entity in the provided document. Sentiment sentiment = 3; } @@ -947,7 +960,9 @@ message TextSpan { string content = 1; // The API calculates the beginning offset of the content in the original - // document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. + // document according to the + // [EncodingType][google.cloud.language.v1.EncodingType] specified in the API + // request. int32 begin_offset = 2; } @@ -962,9 +977,46 @@ message ClassificationCategory { float confidence = 2; } +// Model options available for classification requests. +message ClassificationModelOptions { + // Options for the V1 model. + message V1Model {} + + // Options for the V2 model. + message V2Model { + // The content categories used for classification. + enum ContentCategoriesVersion { + // If `ContentCategoriesVersion` is not specified, this option will + // default to `V1`. + CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; + + // Legacy content categories of our initial launch in 2017. + V1 = 1; + + // Updated content categories in 2022. + V2 = 2; + } + + // The content categories used for classification. + ContentCategoriesVersion content_categories_version = 1; + } + + // If this field is not set, then the `v1_model` will be used by default. + oneof model_type { + // Setting this field will use the V1 model and V1 content categories + // version. The V1 model is a legacy model; support for this will be + // discontinued in the future. + V1Model v1_model = 1; + + // Setting this field will use the V2 model with the appropriate content + // categories version. The V2 model is a better performing model. + V2Model v2_model = 2; + } +} + // The sentiment analysis request message. message AnalyzeSentimentRequest { - // Input document. + // Required. Input document. Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate sentence offsets. @@ -978,7 +1030,8 @@ message AnalyzeSentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 2; // The sentiment for all the sentences in the document. @@ -987,7 +1040,7 @@ message AnalyzeSentimentResponse { // The entity-level sentiment analysis request message. message AnalyzeEntitySentimentRequest { - // Input document. + // Required. Input document. Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. @@ -1001,13 +1054,14 @@ message AnalyzeEntitySentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 2; } // The entity analysis request message. message AnalyzeEntitiesRequest { - // Input document. + // Required. Input document. Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. @@ -1021,13 +1075,14 @@ message AnalyzeEntitiesResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 2; } // The syntax analysis request message. message AnalyzeSyntaxRequest { - // Input document. + // Required. Input document. Document document = 1 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. @@ -1044,14 +1099,19 @@ message AnalyzeSyntaxResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 3; } // The document classification request message. message ClassifyTextRequest { - // Input document. + // Required. Input document. Document document = 1 [(google.api.field_behavior) = REQUIRED]; + + // Model options to use for classification. Defaults to v1 options if not + // specified. + ClassificationModelOptions classification_model_options = 3; } // The document classification response message. @@ -1080,12 +1140,16 @@ message AnnotateTextRequest { // Classify the full document into categories. bool classify_text = 6; + + // The model options to use for classification. Defaults to v1 options + // if not specified. Only used if `classify_text` is set to true. + ClassificationModelOptions classification_model_options = 10; } - // Input document. + // Required. Input document. Document document = 1 [(google.api.field_behavior) = REQUIRED]; - // The enabled features. + // Required. The enabled features. Features features = 2 [(google.api.field_behavior) = REQUIRED]; // The encoding type used by the API to calculate offsets. @@ -1114,7 +1178,8 @@ message AnnotateTextResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 5; // Categories identified in the input document. diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto index 7d77376e985..fd51d48652d 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -68,7 +67,7 @@ service LanguageService { } // Analyzes the syntax of the text and provides sentence boundaries and - // tokenization along with part-of-speech tags, dependency trees, and other + // tokenization along with part of speech tags, dependency trees, and other // properties. rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) { option (google.api.http) = { @@ -100,7 +99,7 @@ service LanguageService { } } - +// ################################################################ # // // Represents the input to API methods. message Document { @@ -116,6 +115,19 @@ message Document { HTML = 2; } + // Ways of handling boilerplate detected in the document + enum BoilerplateHandling { + // The boilerplate handling is not specified. + BOILERPLATE_HANDLING_UNSPECIFIED = 0; + + // Do not analyze detected boilerplate. Reference web URI is required for + // detecting boilerplate. + SKIP_BOILERPLATE = 1; + + // Treat boilerplate the same as content. + KEEP_BOILERPLATE = 2; + } + // Required. If the type is not set or is `TYPE_UNSPECIFIED`, // returns an `INVALID_ARGUMENT` error. Type type = 1; @@ -143,6 +155,15 @@ message Document { // specified by the caller or automatically detected) is not supported by the // called API method, an `INVALID_ARGUMENT` error is returned. string language = 4; + + // The web URI where the document comes from. This URI is not used for + // fetching the content, but as a hint for analyzing the document. + string reference_web_uri = 5; + + // Indicates how detected boilerplate(e.g. advertisements, copyright + // declarations, banners) should be handled for this document. If not + // specified, boilerplate will be treated the same as content. + BoilerplateHandling boilerplate_handling = 6; } // Represents a sentence in the input document. @@ -156,6 +177,32 @@ message Sentence { Sentiment sentiment = 2; } +// Represents the text encoding that the caller uses to process the output. +// Providing an `EncodingType` is recommended because the API provides the +// beginning offsets for various outputs, such as tokens and mentions, and +// languages that natively use different text encodings may access offsets +// differently. +enum EncodingType { + // If `EncodingType` is not specified, encoding-dependent information (such as + // `begin_offset`) will be set at `-1`. + NONE = 0; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-8 encoding of the input. C++ and Go are examples of languages + // that use this encoding natively. + UTF8 = 1; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-16 encoding of the input. Java and JavaScript are examples of + // languages that use this encoding natively. + UTF16 = 2; + + // Encoding-dependent information (such as `begin_offset`) is calculated based + // on the UTF-32 encoding of the input. Python is an example of a language + // that uses this encoding natively. + UTF32 = 3; +} + // Represents a phrase in the text that is a known entity, such as // a person, an organization, or location. The API associates information, such // as salience and mentions, with entities. @@ -286,32 +333,6 @@ message Token { string lemma = 4; } -// Represents the text encoding that the caller uses to process the output. -// Providing an `EncodingType` is recommended because the API provides the -// beginning offsets for various outputs, such as tokens and mentions, and -// languages that natively use different text encodings may access offsets -// differently. -enum EncodingType { - // If `EncodingType` is not specified, encoding-dependent information (such as - // `begin_offset`) will be set at `-1`. - NONE = 0; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-8 encoding of the input. C++ and Go are examples of languages - // that use this encoding natively. - UTF8 = 1; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-16 encoding of the input. Java and JavaScript are examples of - // languages that use this encoding natively. - UTF16 = 2; - - // Encoding-dependent information (such as `begin_offset`) is calculated based - // on the UTF-32 encoding of the input. Python is an example of a language - // that uses this encoding natively. - UTF32 = 3; -} - // Represents the feeling associated with the entire text or entities in // the text. // Next ID: 6 @@ -968,6 +989,45 @@ message ClassificationCategory { float confidence = 2; } +// Model options available for classification requests. +message ClassificationModelOptions { + // Options for the V1 model. + message V1Model { + + } + + // Options for the V2 model. + message V2Model { + // The content categories used for classification. + enum ContentCategoriesVersion { + // If `ContentCategoriesVersion` is not specified, this option will + // default to `V1`. + CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; + + // Legacy content categories of our initial launch in 2017. + V1 = 1; + + // Updated content categories in 2022. + V2 = 2; + } + + // The content categories used for classification. + ContentCategoriesVersion content_categories_version = 1; + } + + // If this field is not set, then the `v1_model` will be used by default. + oneof model_type { + // Setting this field will use the V1 model and V1 content categories + // version. The V1 model is a legacy model; support for this will be + // discontinued in the future. + V1Model v1_model = 1; + + // Setting this field will use the V2 model with the appropriate content + // categories version. The V2 model is a better performing model. + V2Model v2_model = 2; + } +} + // The sentiment analysis request message. message AnalyzeSentimentRequest { // Required. Input document. @@ -1059,6 +1119,10 @@ message AnalyzeSyntaxResponse { message ClassifyTextRequest { // Required. Input document. Document document = 1 [(google.api.field_behavior) = REQUIRED]; + + // Model options to use for classification. Defaults to v1 options if not + // specified. + ClassificationModelOptions classification_model_options = 3; } // The document classification response message. @@ -1072,7 +1136,7 @@ message ClassifyTextResponse { message AnnotateTextRequest { // All available features for sentiment, syntax, and semantic analysis. // Setting each one to true will enable that specific analysis for the input. - // Next ID: 10 + // Next ID: 11 message Features { // Extract syntax information. bool extract_syntax = 1; @@ -1091,6 +1155,10 @@ message AnnotateTextRequest { // [predefined // taxonomy](https://cloud.google.com/natural-language/docs/categories). bool classify_text = 6; + + // The model options to use for classification. Defaults to v1 options + // if not specified. Only used if `classify_text` is set to true. + ClassificationModelOptions classification_model_options = 10; } // Required. Input document. diff --git a/packages/google-cloud-language/protos/protos.d.ts b/packages/google-cloud-language/protos/protos.d.ts index d90d7662743..2783b9278ae 100644 --- a/packages/google-cloud-language/protos/protos.d.ts +++ b/packages/google-cloud-language/protos/protos.d.ts @@ -407,6 +407,14 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** EncodingType enum. */ + enum EncodingType { + NONE = 0, + UTF8 = 1, + UTF16 = 2, + UTF32 = 3 + } + /** Properties of an Entity. */ interface IEntity { @@ -554,14 +562,6 @@ export namespace google { } } - /** EncodingType enum. */ - enum EncodingType { - NONE = 0, - UTF8 = 1, - UTF16 = 2, - UTF32 = 3 - } - /** Properties of a Token. */ interface IToken { @@ -1594,6 +1594,313 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ClassificationModelOptions. */ + interface IClassificationModelOptions { + + /** ClassificationModelOptions v1Model */ + v1Model?: (google.cloud.language.v1.ClassificationModelOptions.IV1Model|null); + + /** ClassificationModelOptions v2Model */ + v2Model?: (google.cloud.language.v1.ClassificationModelOptions.IV2Model|null); + } + + /** Represents a ClassificationModelOptions. */ + class ClassificationModelOptions implements IClassificationModelOptions { + + /** + * Constructs a new ClassificationModelOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.IClassificationModelOptions); + + /** ClassificationModelOptions v1Model. */ + public v1Model?: (google.cloud.language.v1.ClassificationModelOptions.IV1Model|null); + + /** ClassificationModelOptions v2Model. */ + public v2Model?: (google.cloud.language.v1.ClassificationModelOptions.IV2Model|null); + + /** ClassificationModelOptions modelType. */ + public modelType?: ("v1Model"|"v2Model"); + + /** + * Creates a new ClassificationModelOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ClassificationModelOptions instance + */ + public static create(properties?: google.cloud.language.v1.IClassificationModelOptions): google.cloud.language.v1.ClassificationModelOptions; + + /** + * Encodes the specified ClassificationModelOptions message. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.verify|verify} messages. + * @param message ClassificationModelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.IClassificationModelOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClassificationModelOptions message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.verify|verify} messages. + * @param message ClassificationModelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.IClassificationModelOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClassificationModelOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClassificationModelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.ClassificationModelOptions; + + /** + * Decodes a ClassificationModelOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClassificationModelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.ClassificationModelOptions; + + /** + * Verifies a ClassificationModelOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClassificationModelOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClassificationModelOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.ClassificationModelOptions; + + /** + * Creates a plain object from a ClassificationModelOptions message. Also converts values to other types if specified. + * @param message ClassificationModelOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.ClassificationModelOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClassificationModelOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClassificationModelOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClassificationModelOptions { + + /** Properties of a V1Model. */ + interface IV1Model { + } + + /** Represents a V1Model. */ + class V1Model implements IV1Model { + + /** + * Constructs a new V1Model. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.ClassificationModelOptions.IV1Model); + + /** + * Creates a new V1Model instance using the specified properties. + * @param [properties] Properties to set + * @returns V1Model instance + */ + public static create(properties?: google.cloud.language.v1.ClassificationModelOptions.IV1Model): google.cloud.language.v1.ClassificationModelOptions.V1Model; + + /** + * Encodes the specified V1Model message. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.V1Model.verify|verify} messages. + * @param message V1Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.ClassificationModelOptions.IV1Model, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified V1Model message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.V1Model.verify|verify} messages. + * @param message V1Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.ClassificationModelOptions.IV1Model, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a V1Model message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns V1Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.ClassificationModelOptions.V1Model; + + /** + * Decodes a V1Model message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns V1Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.ClassificationModelOptions.V1Model; + + /** + * Verifies a V1Model message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a V1Model message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns V1Model + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.ClassificationModelOptions.V1Model; + + /** + * Creates a plain object from a V1Model message. Also converts values to other types if specified. + * @param message V1Model + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.ClassificationModelOptions.V1Model, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this V1Model to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for V1Model + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a V2Model. */ + interface IV2Model { + + /** V2Model contentCategoriesVersion */ + contentCategoriesVersion?: (google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion|keyof typeof google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion|null); + } + + /** Represents a V2Model. */ + class V2Model implements IV2Model { + + /** + * Constructs a new V2Model. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1.ClassificationModelOptions.IV2Model); + + /** V2Model contentCategoriesVersion. */ + public contentCategoriesVersion: (google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion|keyof typeof google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion); + + /** + * Creates a new V2Model instance using the specified properties. + * @param [properties] Properties to set + * @returns V2Model instance + */ + public static create(properties?: google.cloud.language.v1.ClassificationModelOptions.IV2Model): google.cloud.language.v1.ClassificationModelOptions.V2Model; + + /** + * Encodes the specified V2Model message. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.V2Model.verify|verify} messages. + * @param message V2Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1.ClassificationModelOptions.IV2Model, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified V2Model message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.V2Model.verify|verify} messages. + * @param message V2Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1.ClassificationModelOptions.IV2Model, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a V2Model message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns V2Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1.ClassificationModelOptions.V2Model; + + /** + * Decodes a V2Model message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns V2Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1.ClassificationModelOptions.V2Model; + + /** + * Verifies a V2Model message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a V2Model message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns V2Model + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1.ClassificationModelOptions.V2Model; + + /** + * Creates a plain object from a V2Model message. Also converts values to other types if specified. + * @param message V2Model + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1.ClassificationModelOptions.V2Model, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this V2Model to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for V2Model + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace V2Model { + + /** ContentCategoriesVersion enum. */ + enum ContentCategoriesVersion { + CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0, + V1 = 1, + V2 = 2 + } + } + } + /** Properties of an AnalyzeSentimentRequest. */ interface IAnalyzeSentimentRequest { @@ -2435,6 +2742,9 @@ export namespace google { /** ClassifyTextRequest document */ document?: (google.cloud.language.v1.IDocument|null); + + /** ClassifyTextRequest classificationModelOptions */ + classificationModelOptions?: (google.cloud.language.v1.IClassificationModelOptions|null); } /** Represents a ClassifyTextRequest. */ @@ -2449,6 +2759,9 @@ export namespace google { /** ClassifyTextRequest document. */ public document?: (google.cloud.language.v1.IDocument|null); + /** ClassifyTextRequest classificationModelOptions. */ + public classificationModelOptions?: (google.cloud.language.v1.IClassificationModelOptions|null); + /** * Creates a new ClassifyTextRequest instance using the specified properties. * @param [properties] Properties to set @@ -2752,6 +3065,9 @@ export namespace google { /** Features classifyText */ classifyText?: (boolean|null); + + /** Features classificationModelOptions */ + classificationModelOptions?: (google.cloud.language.v1.IClassificationModelOptions|null); } /** Represents a Features. */ @@ -2778,6 +3094,9 @@ export namespace google { /** Features classifyText. */ public classifyText: boolean; + /** Features classificationModelOptions. */ + public classificationModelOptions?: (google.cloud.language.v1.IClassificationModelOptions|null); + /** * Creates a new Features instance using the specified properties. * @param [properties] Properties to set @@ -3152,6 +3471,12 @@ export namespace google { /** Document language */ language?: (string|null); + + /** Document referenceWebUri */ + referenceWebUri?: (string|null); + + /** Document boilerplateHandling */ + boilerplateHandling?: (google.cloud.language.v1beta2.Document.BoilerplateHandling|keyof typeof google.cloud.language.v1beta2.Document.BoilerplateHandling|null); } /** Represents a Document. */ @@ -3175,6 +3500,12 @@ export namespace google { /** Document language. */ public language: string; + /** Document referenceWebUri. */ + public referenceWebUri: string; + + /** Document boilerplateHandling. */ + public boilerplateHandling: (google.cloud.language.v1beta2.Document.BoilerplateHandling|keyof typeof google.cloud.language.v1beta2.Document.BoilerplateHandling); + /** Document source. */ public source?: ("content"|"gcsContentUri"); @@ -3264,6 +3595,13 @@ export namespace google { PLAIN_TEXT = 1, HTML = 2 } + + /** BoilerplateHandling enum. */ + enum BoilerplateHandling { + BOILERPLATE_HANDLING_UNSPECIFIED = 0, + SKIP_BOILERPLATE = 1, + KEEP_BOILERPLATE = 2 + } } /** Properties of a Sentence. */ @@ -3369,6 +3707,14 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** EncodingType enum. */ + enum EncodingType { + NONE = 0, + UTF8 = 1, + UTF16 = 2, + UTF32 = 3 + } + /** Properties of an Entity. */ interface IEntity { @@ -3631,14 +3977,6 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** EncodingType enum. */ - enum EncodingType { - NONE = 0, - UTF8 = 1, - UTF16 = 2, - UTF32 = 3 - } - /** Properties of a Sentiment. */ interface ISentiment { @@ -4556,6 +4894,313 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ClassificationModelOptions. */ + interface IClassificationModelOptions { + + /** ClassificationModelOptions v1Model */ + v1Model?: (google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model|null); + + /** ClassificationModelOptions v2Model */ + v2Model?: (google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model|null); + } + + /** Represents a ClassificationModelOptions. */ + class ClassificationModelOptions implements IClassificationModelOptions { + + /** + * Constructs a new ClassificationModelOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.IClassificationModelOptions); + + /** ClassificationModelOptions v1Model. */ + public v1Model?: (google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model|null); + + /** ClassificationModelOptions v2Model. */ + public v2Model?: (google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model|null); + + /** ClassificationModelOptions modelType. */ + public modelType?: ("v1Model"|"v2Model"); + + /** + * Creates a new ClassificationModelOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ClassificationModelOptions instance + */ + public static create(properties?: google.cloud.language.v1beta2.IClassificationModelOptions): google.cloud.language.v1beta2.ClassificationModelOptions; + + /** + * Encodes the specified ClassificationModelOptions message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.verify|verify} messages. + * @param message ClassificationModelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.IClassificationModelOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClassificationModelOptions message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.verify|verify} messages. + * @param message ClassificationModelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.IClassificationModelOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClassificationModelOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClassificationModelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.ClassificationModelOptions; + + /** + * Decodes a ClassificationModelOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClassificationModelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.ClassificationModelOptions; + + /** + * Verifies a ClassificationModelOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClassificationModelOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClassificationModelOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.ClassificationModelOptions; + + /** + * Creates a plain object from a ClassificationModelOptions message. Also converts values to other types if specified. + * @param message ClassificationModelOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.ClassificationModelOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClassificationModelOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClassificationModelOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClassificationModelOptions { + + /** Properties of a V1Model. */ + interface IV1Model { + } + + /** Represents a V1Model. */ + class V1Model implements IV1Model { + + /** + * Constructs a new V1Model. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model); + + /** + * Creates a new V1Model instance using the specified properties. + * @param [properties] Properties to set + * @returns V1Model instance + */ + public static create(properties?: google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model): google.cloud.language.v1beta2.ClassificationModelOptions.V1Model; + + /** + * Encodes the specified V1Model message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.V1Model.verify|verify} messages. + * @param message V1Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified V1Model message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.V1Model.verify|verify} messages. + * @param message V1Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a V1Model message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns V1Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.ClassificationModelOptions.V1Model; + + /** + * Decodes a V1Model message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns V1Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.ClassificationModelOptions.V1Model; + + /** + * Verifies a V1Model message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a V1Model message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns V1Model + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.ClassificationModelOptions.V1Model; + + /** + * Creates a plain object from a V1Model message. Also converts values to other types if specified. + * @param message V1Model + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.ClassificationModelOptions.V1Model, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this V1Model to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for V1Model + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a V2Model. */ + interface IV2Model { + + /** V2Model contentCategoriesVersion */ + contentCategoriesVersion?: (google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion|keyof typeof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion|null); + } + + /** Represents a V2Model. */ + class V2Model implements IV2Model { + + /** + * Constructs a new V2Model. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model); + + /** V2Model contentCategoriesVersion. */ + public contentCategoriesVersion: (google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion|keyof typeof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion); + + /** + * Creates a new V2Model instance using the specified properties. + * @param [properties] Properties to set + * @returns V2Model instance + */ + public static create(properties?: google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model): google.cloud.language.v1beta2.ClassificationModelOptions.V2Model; + + /** + * Encodes the specified V2Model message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.verify|verify} messages. + * @param message V2Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified V2Model message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.verify|verify} messages. + * @param message V2Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a V2Model message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns V2Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.ClassificationModelOptions.V2Model; + + /** + * Decodes a V2Model message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns V2Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.ClassificationModelOptions.V2Model; + + /** + * Verifies a V2Model message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a V2Model message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns V2Model + */ + public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.ClassificationModelOptions.V2Model; + + /** + * Creates a plain object from a V2Model message. Also converts values to other types if specified. + * @param message V2Model + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.language.v1beta2.ClassificationModelOptions.V2Model, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this V2Model to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for V2Model + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace V2Model { + + /** ContentCategoriesVersion enum. */ + enum ContentCategoriesVersion { + CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0, + V1 = 1, + V2 = 2 + } + } + } + /** Properties of an AnalyzeSentimentRequest. */ interface IAnalyzeSentimentRequest { @@ -5397,6 +6042,9 @@ export namespace google { /** ClassifyTextRequest document */ document?: (google.cloud.language.v1beta2.IDocument|null); + + /** ClassifyTextRequest classificationModelOptions */ + classificationModelOptions?: (google.cloud.language.v1beta2.IClassificationModelOptions|null); } /** Represents a ClassifyTextRequest. */ @@ -5411,6 +6059,9 @@ export namespace google { /** ClassifyTextRequest document. */ public document?: (google.cloud.language.v1beta2.IDocument|null); + /** ClassifyTextRequest classificationModelOptions. */ + public classificationModelOptions?: (google.cloud.language.v1beta2.IClassificationModelOptions|null); + /** * Creates a new ClassifyTextRequest instance using the specified properties. * @param [properties] Properties to set @@ -5714,6 +6365,9 @@ export namespace google { /** Features classifyText */ classifyText?: (boolean|null); + + /** Features classificationModelOptions */ + classificationModelOptions?: (google.cloud.language.v1beta2.IClassificationModelOptions|null); } /** Represents a Features. */ @@ -5740,6 +6394,9 @@ export namespace google { /** Features classifyText. */ public classifyText: boolean; + /** Features classificationModelOptions. */ + public classificationModelOptions?: (google.cloud.language.v1beta2.IClassificationModelOptions|null); + /** * Creates a new Features instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-language/protos/protos.js b/packages/google-cloud-language/protos/protos.js index fa011976e9a..e50960bb002 100644 --- a/packages/google-cloud-language/protos/protos.js +++ b/packages/google-cloud-language/protos/protos.js @@ -868,6 +868,24 @@ return Sentence; })(); + /** + * EncodingType enum. + * @name google.cloud.language.v1.EncodingType + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} UTF8=1 UTF8 value + * @property {number} UTF16=2 UTF16 value + * @property {number} UTF32=3 UTF32 value + */ + v1.EncodingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "UTF8"] = 1; + values[valuesById[2] = "UTF16"] = 2; + values[valuesById[3] = "UTF32"] = 3; + return values; + })(); + v1.Entity = (function() { /** @@ -1354,24 +1372,6 @@ return Entity; })(); - /** - * EncodingType enum. - * @name google.cloud.language.v1.EncodingType - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} UTF8=1 UTF8 value - * @property {number} UTF16=2 UTF16 value - * @property {number} UTF32=3 UTF32 value - */ - v1.EncodingType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "UTF8"] = 1; - values[valuesById[2] = "UTF16"] = 2; - values[valuesById[3] = "UTF32"] = 3; - return values; - })(); - v1.Token = (function() { /** @@ -4643,25 +4643,25 @@ return ClassificationCategory; })(); - v1.AnalyzeSentimentRequest = (function() { + v1.ClassificationModelOptions = (function() { /** - * Properties of an AnalyzeSentimentRequest. + * Properties of a ClassificationModelOptions. * @memberof google.cloud.language.v1 - * @interface IAnalyzeSentimentRequest - * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeSentimentRequest document - * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeSentimentRequest encodingType + * @interface IClassificationModelOptions + * @property {google.cloud.language.v1.ClassificationModelOptions.IV1Model|null} [v1Model] ClassificationModelOptions v1Model + * @property {google.cloud.language.v1.ClassificationModelOptions.IV2Model|null} [v2Model] ClassificationModelOptions v2Model */ /** - * Constructs a new AnalyzeSentimentRequest. + * Constructs a new ClassificationModelOptions. * @memberof google.cloud.language.v1 - * @classdesc Represents an AnalyzeSentimentRequest. - * @implements IAnalyzeSentimentRequest + * @classdesc Represents a ClassificationModelOptions. + * @implements IClassificationModelOptions * @constructor - * @param {google.cloud.language.v1.IAnalyzeSentimentRequest=} [properties] Properties to set + * @param {google.cloud.language.v1.IClassificationModelOptions=} [properties] Properties to set */ - function AnalyzeSentimentRequest(properties) { + function ClassificationModelOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4669,89 +4669,103 @@ } /** - * AnalyzeSentimentRequest document. - * @member {google.cloud.language.v1.IDocument|null|undefined} document - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * ClassificationModelOptions v1Model. + * @member {google.cloud.language.v1.ClassificationModelOptions.IV1Model|null|undefined} v1Model + * @memberof google.cloud.language.v1.ClassificationModelOptions * @instance */ - AnalyzeSentimentRequest.prototype.document = null; + ClassificationModelOptions.prototype.v1Model = null; /** - * AnalyzeSentimentRequest encodingType. - * @member {google.cloud.language.v1.EncodingType} encodingType - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * ClassificationModelOptions v2Model. + * @member {google.cloud.language.v1.ClassificationModelOptions.IV2Model|null|undefined} v2Model + * @memberof google.cloud.language.v1.ClassificationModelOptions * @instance */ - AnalyzeSentimentRequest.prototype.encodingType = 0; + ClassificationModelOptions.prototype.v2Model = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new AnalyzeSentimentRequest instance using the specified properties. + * ClassificationModelOptions modelType. + * @member {"v1Model"|"v2Model"|undefined} modelType + * @memberof google.cloud.language.v1.ClassificationModelOptions + * @instance + */ + Object.defineProperty(ClassificationModelOptions.prototype, "modelType", { + get: $util.oneOfGetter($oneOfFields = ["v1Model", "v2Model"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ClassificationModelOptions instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @static - * @param {google.cloud.language.v1.IAnalyzeSentimentRequest=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest instance + * @param {google.cloud.language.v1.IClassificationModelOptions=} [properties] Properties to set + * @returns {google.cloud.language.v1.ClassificationModelOptions} ClassificationModelOptions instance */ - AnalyzeSentimentRequest.create = function create(properties) { - return new AnalyzeSentimentRequest(properties); + ClassificationModelOptions.create = function create(properties) { + return new ClassificationModelOptions(properties); }; /** - * Encodes the specified AnalyzeSentimentRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentRequest.verify|verify} messages. + * Encodes the specified ClassificationModelOptions message. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @static - * @param {google.cloud.language.v1.IAnalyzeSentimentRequest} message AnalyzeSentimentRequest message or plain object to encode + * @param {google.cloud.language.v1.IClassificationModelOptions} message ClassificationModelOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeSentimentRequest.encode = function encode(message, writer) { + ClassificationModelOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && Object.hasOwnProperty.call(message, "document")) - $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); + if (message.v1Model != null && Object.hasOwnProperty.call(message, "v1Model")) + $root.google.cloud.language.v1.ClassificationModelOptions.V1Model.encode(message.v1Model, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.v2Model != null && Object.hasOwnProperty.call(message, "v2Model")) + $root.google.cloud.language.v1.ClassificationModelOptions.V2Model.encode(message.v2Model, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnalyzeSentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentRequest.verify|verify} messages. + * Encodes the specified ClassificationModelOptions message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @static - * @param {google.cloud.language.v1.IAnalyzeSentimentRequest} message AnalyzeSentimentRequest message or plain object to encode + * @param {google.cloud.language.v1.IClassificationModelOptions} message ClassificationModelOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeSentimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ClassificationModelOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer. + * Decodes a ClassificationModelOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest + * @returns {google.cloud.language.v1.ClassificationModelOptions} ClassificationModelOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeSentimentRequest.decode = function decode(reader, length) { + ClassificationModelOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSentimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassificationModelOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); + message.v1Model = $root.google.cloud.language.v1.ClassificationModelOptions.V1Model.decode(reader, reader.uint32()); break; } case 2: { - message.encodingType = reader.int32(); + message.v2Model = $root.google.cloud.language.v1.ClassificationModelOptions.V2Model.decode(reader, reader.uint32()); break; } default: @@ -4763,437 +4777,565 @@ }; /** - * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer, length delimited. + * Decodes a ClassificationModelOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest + * @returns {google.cloud.language.v1.ClassificationModelOptions} ClassificationModelOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeSentimentRequest.decodeDelimited = function decodeDelimited(reader) { + ClassificationModelOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalyzeSentimentRequest message. + * Verifies a ClassificationModelOptions message. * @function verify - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalyzeSentimentRequest.verify = function verify(message) { + ClassificationModelOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.document != null && message.hasOwnProperty("document")) { - var error = $root.google.cloud.language.v1.Document.verify(message.document); - if (error) - return "document." + error; + var properties = {}; + if (message.v1Model != null && message.hasOwnProperty("v1Model")) { + properties.modelType = 1; + { + var error = $root.google.cloud.language.v1.ClassificationModelOptions.V1Model.verify(message.v1Model); + if (error) + return "v1Model." + error; + } } - if (message.encodingType != null && message.hasOwnProperty("encodingType")) - switch (message.encodingType) { - default: - return "encodingType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + if (message.v2Model != null && message.hasOwnProperty("v2Model")) { + if (properties.modelType === 1) + return "modelType: multiple values"; + properties.modelType = 1; + { + var error = $root.google.cloud.language.v1.ClassificationModelOptions.V2Model.verify(message.v2Model); + if (error) + return "v2Model." + error; } + } return null; }; /** - * Creates an AnalyzeSentimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ClassificationModelOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest + * @returns {google.cloud.language.v1.ClassificationModelOptions} ClassificationModelOptions */ - AnalyzeSentimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnalyzeSentimentRequest) + ClassificationModelOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.ClassificationModelOptions) return object; - var message = new $root.google.cloud.language.v1.AnalyzeSentimentRequest(); - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeSentimentRequest.document: object expected"); - message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); + var message = new $root.google.cloud.language.v1.ClassificationModelOptions(); + if (object.v1Model != null) { + if (typeof object.v1Model !== "object") + throw TypeError(".google.cloud.language.v1.ClassificationModelOptions.v1Model: object expected"); + message.v1Model = $root.google.cloud.language.v1.ClassificationModelOptions.V1Model.fromObject(object.v1Model); } - switch (object.encodingType) { - case "NONE": - case 0: - message.encodingType = 0; - break; - case "UTF8": - case 1: - message.encodingType = 1; - break; - case "UTF16": - case 2: - message.encodingType = 2; - break; - case "UTF32": - case 3: - message.encodingType = 3; - break; + if (object.v2Model != null) { + if (typeof object.v2Model !== "object") + throw TypeError(".google.cloud.language.v1.ClassificationModelOptions.v2Model: object expected"); + message.v2Model = $root.google.cloud.language.v1.ClassificationModelOptions.V2Model.fromObject(object.v2Model); } return message; }; /** - * Creates a plain object from an AnalyzeSentimentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ClassificationModelOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @static - * @param {google.cloud.language.v1.AnalyzeSentimentRequest} message AnalyzeSentimentRequest + * @param {google.cloud.language.v1.ClassificationModelOptions} message ClassificationModelOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalyzeSentimentRequest.toObject = function toObject(message, options) { + ClassificationModelOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.document = null; - object.encodingType = options.enums === String ? "NONE" : 0; + if (message.v1Model != null && message.hasOwnProperty("v1Model")) { + object.v1Model = $root.google.cloud.language.v1.ClassificationModelOptions.V1Model.toObject(message.v1Model, options); + if (options.oneofs) + object.modelType = "v1Model"; + } + if (message.v2Model != null && message.hasOwnProperty("v2Model")) { + object.v2Model = $root.google.cloud.language.v1.ClassificationModelOptions.V2Model.toObject(message.v2Model, options); + if (options.oneofs) + object.modelType = "v2Model"; } - if (message.document != null && message.hasOwnProperty("document")) - object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) - object.encodingType = options.enums === String ? $root.google.cloud.language.v1.EncodingType[message.encodingType] : message.encodingType; return object; }; /** - * Converts this AnalyzeSentimentRequest to JSON. + * Converts this ClassificationModelOptions to JSON. * @function toJSON - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @instance * @returns {Object.} JSON object */ - AnalyzeSentimentRequest.prototype.toJSON = function toJSON() { + ClassificationModelOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalyzeSentimentRequest + * Gets the default type url for ClassificationModelOptions * @function getTypeUrl - * @memberof google.cloud.language.v1.AnalyzeSentimentRequest + * @memberof google.cloud.language.v1.ClassificationModelOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalyzeSentimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClassificationModelOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSentimentRequest"; + return typeUrlPrefix + "/google.cloud.language.v1.ClassificationModelOptions"; }; - return AnalyzeSentimentRequest; - })(); - - v1.AnalyzeSentimentResponse = (function() { - - /** - * Properties of an AnalyzeSentimentResponse. - * @memberof google.cloud.language.v1 - * @interface IAnalyzeSentimentResponse - * @property {google.cloud.language.v1.ISentiment|null} [documentSentiment] AnalyzeSentimentResponse documentSentiment - * @property {string|null} [language] AnalyzeSentimentResponse language - * @property {Array.|null} [sentences] AnalyzeSentimentResponse sentences - */ + ClassificationModelOptions.V1Model = (function() { - /** - * Constructs a new AnalyzeSentimentResponse. - * @memberof google.cloud.language.v1 - * @classdesc Represents an AnalyzeSentimentResponse. - * @implements IAnalyzeSentimentResponse - * @constructor - * @param {google.cloud.language.v1.IAnalyzeSentimentResponse=} [properties] Properties to set - */ - function AnalyzeSentimentResponse(properties) { - this.sentences = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a V1Model. + * @memberof google.cloud.language.v1.ClassificationModelOptions + * @interface IV1Model + */ - /** - * AnalyzeSentimentResponse documentSentiment. - * @member {google.cloud.language.v1.ISentiment|null|undefined} documentSentiment - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @instance - */ - AnalyzeSentimentResponse.prototype.documentSentiment = null; + /** + * Constructs a new V1Model. + * @memberof google.cloud.language.v1.ClassificationModelOptions + * @classdesc Represents a V1Model. + * @implements IV1Model + * @constructor + * @param {google.cloud.language.v1.ClassificationModelOptions.IV1Model=} [properties] Properties to set + */ + function V1Model(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * AnalyzeSentimentResponse language. - * @member {string} language - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @instance - */ - AnalyzeSentimentResponse.prototype.language = ""; + /** + * Creates a new V1Model instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @static + * @param {google.cloud.language.v1.ClassificationModelOptions.IV1Model=} [properties] Properties to set + * @returns {google.cloud.language.v1.ClassificationModelOptions.V1Model} V1Model instance + */ + V1Model.create = function create(properties) { + return new V1Model(properties); + }; - /** - * AnalyzeSentimentResponse sentences. - * @member {Array.} sentences - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @instance - */ - AnalyzeSentimentResponse.prototype.sentences = $util.emptyArray; + /** + * Encodes the specified V1Model message. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.V1Model.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @static + * @param {google.cloud.language.v1.ClassificationModelOptions.IV1Model} message V1Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + V1Model.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Creates a new AnalyzeSentimentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @static - * @param {google.cloud.language.v1.IAnalyzeSentimentResponse=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse instance - */ - AnalyzeSentimentResponse.create = function create(properties) { - return new AnalyzeSentimentResponse(properties); - }; + /** + * Encodes the specified V1Model message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.V1Model.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @static + * @param {google.cloud.language.v1.ClassificationModelOptions.IV1Model} message V1Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + V1Model.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified AnalyzeSentimentResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @static - * @param {google.cloud.language.v1.IAnalyzeSentimentResponse} message AnalyzeSentimentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnalyzeSentimentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.documentSentiment != null && Object.hasOwnProperty.call(message, "documentSentiment")) - $root.google.cloud.language.v1.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.language != null && Object.hasOwnProperty.call(message, "language")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); - if (message.sentences != null && message.sentences.length) - for (var i = 0; i < message.sentences.length; ++i) - $root.google.cloud.language.v1.Sentence.encode(message.sentences[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AnalyzeSentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @static - * @param {google.cloud.language.v1.IAnalyzeSentimentResponse} message AnalyzeSentimentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnalyzeSentimentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnalyzeSentimentResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSentimentResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); - break; - } - case 2: { - message.language = reader.string(); - break; - } - case 3: { - if (!(message.sentences && message.sentences.length)) - message.sentences = []; - message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + /** + * Decodes a V1Model message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.ClassificationModelOptions.V1Model} V1Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + V1Model.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassificationModelOptions.V1Model(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnalyzeSentimentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a V1Model message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.ClassificationModelOptions.V1Model} V1Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + V1Model.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an AnalyzeSentimentResponse message. - * @function verify - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnalyzeSentimentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) { - var error = $root.google.cloud.language.v1.Sentiment.verify(message.documentSentiment); - if (error) - return "documentSentiment." + error; - } - if (message.language != null && message.hasOwnProperty("language")) - if (!$util.isString(message.language)) - return "language: string expected"; - if (message.sentences != null && message.hasOwnProperty("sentences")) { - if (!Array.isArray(message.sentences)) - return "sentences: array expected"; - for (var i = 0; i < message.sentences.length; ++i) { - var error = $root.google.cloud.language.v1.Sentence.verify(message.sentences[i]); - if (error) - return "sentences." + error; - } - } - return null; - }; + /** + * Verifies a V1Model message. + * @function verify + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + V1Model.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Creates an AnalyzeSentimentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse - */ - AnalyzeSentimentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnalyzeSentimentResponse) - return object; - var message = new $root.google.cloud.language.v1.AnalyzeSentimentResponse(); - if (object.documentSentiment != null) { - if (typeof object.documentSentiment !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeSentimentResponse.documentSentiment: object expected"); - message.documentSentiment = $root.google.cloud.language.v1.Sentiment.fromObject(object.documentSentiment); - } - if (object.language != null) - message.language = String(object.language); - if (object.sentences) { - if (!Array.isArray(object.sentences)) - throw TypeError(".google.cloud.language.v1.AnalyzeSentimentResponse.sentences: array expected"); - message.sentences = []; - for (var i = 0; i < object.sentences.length; ++i) { - if (typeof object.sentences[i] !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeSentimentResponse.sentences: object expected"); - message.sentences[i] = $root.google.cloud.language.v1.Sentence.fromObject(object.sentences[i]); + /** + * Creates a V1Model message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.ClassificationModelOptions.V1Model} V1Model + */ + V1Model.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.ClassificationModelOptions.V1Model) + return object; + return new $root.google.cloud.language.v1.ClassificationModelOptions.V1Model(); + }; + + /** + * Creates a plain object from a V1Model message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @static + * @param {google.cloud.language.v1.ClassificationModelOptions.V1Model} message V1Model + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + V1Model.toObject = function toObject() { + return {}; + }; + + /** + * Converts this V1Model to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @instance + * @returns {Object.} JSON object + */ + V1Model.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for V1Model + * @function getTypeUrl + * @memberof google.cloud.language.v1.ClassificationModelOptions.V1Model + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + V1Model.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - return message; - }; + return typeUrlPrefix + "/google.cloud.language.v1.ClassificationModelOptions.V1Model"; + }; - /** - * Creates a plain object from an AnalyzeSentimentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @static - * @param {google.cloud.language.v1.AnalyzeSentimentResponse} message AnalyzeSentimentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnalyzeSentimentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sentences = []; - if (options.defaults) { - object.documentSentiment = null; - object.language = ""; - } - if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) - object.documentSentiment = $root.google.cloud.language.v1.Sentiment.toObject(message.documentSentiment, options); - if (message.language != null && message.hasOwnProperty("language")) - object.language = message.language; - if (message.sentences && message.sentences.length) { - object.sentences = []; - for (var j = 0; j < message.sentences.length; ++j) - object.sentences[j] = $root.google.cloud.language.v1.Sentence.toObject(message.sentences[j], options); - } - return object; - }; + return V1Model; + })(); - /** - * Converts this AnalyzeSentimentResponse to JSON. - * @function toJSON - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @instance - * @returns {Object.} JSON object - */ - AnalyzeSentimentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ClassificationModelOptions.V2Model = (function() { - /** - * Gets the default type url for AnalyzeSentimentResponse - * @function getTypeUrl - * @memberof google.cloud.language.v1.AnalyzeSentimentResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AnalyzeSentimentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Properties of a V2Model. + * @memberof google.cloud.language.v1.ClassificationModelOptions + * @interface IV2Model + * @property {google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion|null} [contentCategoriesVersion] V2Model contentCategoriesVersion + */ + + /** + * Constructs a new V2Model. + * @memberof google.cloud.language.v1.ClassificationModelOptions + * @classdesc Represents a V2Model. + * @implements IV2Model + * @constructor + * @param {google.cloud.language.v1.ClassificationModelOptions.IV2Model=} [properties] Properties to set + */ + function V2Model(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSentimentResponse"; - }; - return AnalyzeSentimentResponse; + /** + * V2Model contentCategoriesVersion. + * @member {google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion} contentCategoriesVersion + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @instance + */ + V2Model.prototype.contentCategoriesVersion = 0; + + /** + * Creates a new V2Model instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @static + * @param {google.cloud.language.v1.ClassificationModelOptions.IV2Model=} [properties] Properties to set + * @returns {google.cloud.language.v1.ClassificationModelOptions.V2Model} V2Model instance + */ + V2Model.create = function create(properties) { + return new V2Model(properties); + }; + + /** + * Encodes the specified V2Model message. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.V2Model.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @static + * @param {google.cloud.language.v1.ClassificationModelOptions.IV2Model} message V2Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + V2Model.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contentCategoriesVersion != null && Object.hasOwnProperty.call(message, "contentCategoriesVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.contentCategoriesVersion); + return writer; + }; + + /** + * Encodes the specified V2Model message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassificationModelOptions.V2Model.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @static + * @param {google.cloud.language.v1.ClassificationModelOptions.IV2Model} message V2Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + V2Model.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a V2Model message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.ClassificationModelOptions.V2Model} V2Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + V2Model.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassificationModelOptions.V2Model(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.contentCategoriesVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a V2Model message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.ClassificationModelOptions.V2Model} V2Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + V2Model.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a V2Model message. + * @function verify + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + V2Model.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contentCategoriesVersion != null && message.hasOwnProperty("contentCategoriesVersion")) + switch (message.contentCategoriesVersion) { + default: + return "contentCategoriesVersion: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a V2Model message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.ClassificationModelOptions.V2Model} V2Model + */ + V2Model.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.ClassificationModelOptions.V2Model) + return object; + var message = new $root.google.cloud.language.v1.ClassificationModelOptions.V2Model(); + switch (object.contentCategoriesVersion) { + case "CONTENT_CATEGORIES_VERSION_UNSPECIFIED": + case 0: + message.contentCategoriesVersion = 0; + break; + case "V1": + case 1: + message.contentCategoriesVersion = 1; + break; + case "V2": + case 2: + message.contentCategoriesVersion = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a V2Model message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @static + * @param {google.cloud.language.v1.ClassificationModelOptions.V2Model} message V2Model + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + V2Model.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.contentCategoriesVersion = options.enums === String ? "CONTENT_CATEGORIES_VERSION_UNSPECIFIED" : 0; + if (message.contentCategoriesVersion != null && message.hasOwnProperty("contentCategoriesVersion")) + object.contentCategoriesVersion = options.enums === String ? $root.google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion[message.contentCategoriesVersion] : message.contentCategoriesVersion; + return object; + }; + + /** + * Converts this V2Model to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @instance + * @returns {Object.} JSON object + */ + V2Model.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for V2Model + * @function getTypeUrl + * @memberof google.cloud.language.v1.ClassificationModelOptions.V2Model + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + V2Model.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.ClassificationModelOptions.V2Model"; + }; + + /** + * ContentCategoriesVersion enum. + * @name google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion + * @enum {number} + * @property {number} CONTENT_CATEGORIES_VERSION_UNSPECIFIED=0 CONTENT_CATEGORIES_VERSION_UNSPECIFIED value + * @property {number} V1=1 V1 value + * @property {number} V2=2 V2 value + */ + V2Model.ContentCategoriesVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_CATEGORIES_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "V1"] = 1; + values[valuesById[2] = "V2"] = 2; + return values; + })(); + + return V2Model; + })(); + + return ClassificationModelOptions; })(); - v1.AnalyzeEntitySentimentRequest = (function() { + v1.AnalyzeSentimentRequest = (function() { /** - * Properties of an AnalyzeEntitySentimentRequest. + * Properties of an AnalyzeSentimentRequest. * @memberof google.cloud.language.v1 - * @interface IAnalyzeEntitySentimentRequest - * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeEntitySentimentRequest document - * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeEntitySentimentRequest encodingType + * @interface IAnalyzeSentimentRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeSentimentRequest document + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeSentimentRequest encodingType */ /** - * Constructs a new AnalyzeEntitySentimentRequest. + * Constructs a new AnalyzeSentimentRequest. * @memberof google.cloud.language.v1 - * @classdesc Represents an AnalyzeEntitySentimentRequest. - * @implements IAnalyzeEntitySentimentRequest + * @classdesc Represents an AnalyzeSentimentRequest. + * @implements IAnalyzeSentimentRequest * @constructor - * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest=} [properties] Properties to set + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest=} [properties] Properties to set */ - function AnalyzeEntitySentimentRequest(properties) { + function AnalyzeSentimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5201,43 +5343,43 @@ } /** - * AnalyzeEntitySentimentRequest document. + * AnalyzeSentimentRequest document. * @member {google.cloud.language.v1.IDocument|null|undefined} document - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @instance */ - AnalyzeEntitySentimentRequest.prototype.document = null; + AnalyzeSentimentRequest.prototype.document = null; /** - * AnalyzeEntitySentimentRequest encodingType. + * AnalyzeSentimentRequest encodingType. * @member {google.cloud.language.v1.EncodingType} encodingType - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @instance */ - AnalyzeEntitySentimentRequest.prototype.encodingType = 0; + AnalyzeSentimentRequest.prototype.encodingType = 0; /** - * Creates a new AnalyzeEntitySentimentRequest instance using the specified properties. + * Creates a new AnalyzeSentimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @static - * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest instance + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest instance */ - AnalyzeEntitySentimentRequest.create = function create(properties) { - return new AnalyzeEntitySentimentRequest(properties); + AnalyzeSentimentRequest.create = function create(properties) { + return new AnalyzeSentimentRequest(properties); }; /** - * Encodes the specified AnalyzeEntitySentimentRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentRequest.verify|verify} messages. + * Encodes the specified AnalyzeSentimentRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @static - * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest} message AnalyzeSentimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeEntitySentimentRequest.encode = function encode(message, writer) { + AnalyzeSentimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.document != null && Object.hasOwnProperty.call(message, "document")) @@ -5248,33 +5390,33 @@ }; /** - * Encodes the specified AnalyzeEntitySentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentRequest.verify|verify} messages. + * Encodes the specified AnalyzeSentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @static - * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeSentimentRequest} message AnalyzeSentimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeEntitySentimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeSentimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer. + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest + * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeEntitySentimentRequest.decode = function decode(reader, length) { + AnalyzeSentimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSentimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5295,30 +5437,30 @@ }; /** - * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeSentimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest + * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeEntitySentimentRequest.decodeDelimited = function decodeDelimited(reader) { + AnalyzeSentimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalyzeEntitySentimentRequest message. + * Verifies an AnalyzeSentimentRequest message. * @function verify - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalyzeEntitySentimentRequest.verify = function verify(message) { + AnalyzeSentimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.document != null && message.hasOwnProperty("document")) { @@ -5340,20 +5482,20 @@ }; /** - * Creates an AnalyzeEntitySentimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeSentimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest + * @returns {google.cloud.language.v1.AnalyzeSentimentRequest} AnalyzeSentimentRequest */ - AnalyzeEntitySentimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest) + AnalyzeSentimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeSentimentRequest) return object; - var message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest(); + var message = new $root.google.cloud.language.v1.AnalyzeSentimentRequest(); if (object.document != null) { if (typeof object.document !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeEntitySentimentRequest.document: object expected"); + throw TypeError(".google.cloud.language.v1.AnalyzeSentimentRequest.document: object expected"); message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); } switch (object.encodingType) { @@ -5378,15 +5520,15 @@ }; /** - * Creates a plain object from an AnalyzeEntitySentimentRequest message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeSentimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @static - * @param {google.cloud.language.v1.AnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest + * @param {google.cloud.language.v1.AnalyzeSentimentRequest} message AnalyzeSentimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalyzeEntitySentimentRequest.toObject = function toObject(message, options) { + AnalyzeSentimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -5402,54 +5544,55 @@ }; /** - * Converts this AnalyzeEntitySentimentRequest to JSON. + * Converts this AnalyzeSentimentRequest to JSON. * @function toJSON - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @instance * @returns {Object.} JSON object */ - AnalyzeEntitySentimentRequest.prototype.toJSON = function toJSON() { + AnalyzeSentimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalyzeEntitySentimentRequest + * Gets the default type url for AnalyzeSentimentRequest * @function getTypeUrl - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest + * @memberof google.cloud.language.v1.AnalyzeSentimentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalyzeEntitySentimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalyzeSentimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitySentimentRequest"; + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSentimentRequest"; }; - return AnalyzeEntitySentimentRequest; + return AnalyzeSentimentRequest; })(); - v1.AnalyzeEntitySentimentResponse = (function() { + v1.AnalyzeSentimentResponse = (function() { /** - * Properties of an AnalyzeEntitySentimentResponse. + * Properties of an AnalyzeSentimentResponse. * @memberof google.cloud.language.v1 - * @interface IAnalyzeEntitySentimentResponse - * @property {Array.|null} [entities] AnalyzeEntitySentimentResponse entities - * @property {string|null} [language] AnalyzeEntitySentimentResponse language + * @interface IAnalyzeSentimentResponse + * @property {google.cloud.language.v1.ISentiment|null} [documentSentiment] AnalyzeSentimentResponse documentSentiment + * @property {string|null} [language] AnalyzeSentimentResponse language + * @property {Array.|null} [sentences] AnalyzeSentimentResponse sentences */ /** - * Constructs a new AnalyzeEntitySentimentResponse. + * Constructs a new AnalyzeSentimentResponse. * @memberof google.cloud.language.v1 - * @classdesc Represents an AnalyzeEntitySentimentResponse. - * @implements IAnalyzeEntitySentimentResponse + * @classdesc Represents an AnalyzeSentimentResponse. + * @implements IAnalyzeSentimentResponse * @constructor - * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse=} [properties] Properties to set + * @param {google.cloud.language.v1.IAnalyzeSentimentResponse=} [properties] Properties to set */ - function AnalyzeEntitySentimentResponse(properties) { - this.entities = []; + function AnalyzeSentimentResponse(properties) { + this.sentences = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5457,94 +5600,108 @@ } /** - * AnalyzeEntitySentimentResponse entities. - * @member {Array.} entities - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * AnalyzeSentimentResponse documentSentiment. + * @member {google.cloud.language.v1.ISentiment|null|undefined} documentSentiment + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @instance */ - AnalyzeEntitySentimentResponse.prototype.entities = $util.emptyArray; + AnalyzeSentimentResponse.prototype.documentSentiment = null; /** - * AnalyzeEntitySentimentResponse language. + * AnalyzeSentimentResponse language. * @member {string} language - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @instance */ - AnalyzeEntitySentimentResponse.prototype.language = ""; + AnalyzeSentimentResponse.prototype.language = ""; /** - * Creates a new AnalyzeEntitySentimentResponse instance using the specified properties. + * AnalyzeSentimentResponse sentences. + * @member {Array.} sentences + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse + * @instance + */ + AnalyzeSentimentResponse.prototype.sentences = $util.emptyArray; + + /** + * Creates a new AnalyzeSentimentResponse instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @static - * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse instance + * @param {google.cloud.language.v1.IAnalyzeSentimentResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse instance */ - AnalyzeEntitySentimentResponse.create = function create(properties) { - return new AnalyzeEntitySentimentResponse(properties); + AnalyzeSentimentResponse.create = function create(properties) { + return new AnalyzeSentimentResponse(properties); }; /** - * Encodes the specified AnalyzeEntitySentimentResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentResponse.verify|verify} messages. + * Encodes the specified AnalyzeSentimentResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @static - * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeSentimentResponse} message AnalyzeSentimentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeEntitySentimentResponse.encode = function encode(message, writer) { + AnalyzeSentimentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.documentSentiment != null && Object.hasOwnProperty.call(message, "documentSentiment")) + $root.google.cloud.language.v1.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.language != null && Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); + if (message.sentences != null && message.sentences.length) + for (var i = 0; i < message.sentences.length; ++i) + $root.google.cloud.language.v1.Sentence.encode(message.sentences[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnalyzeEntitySentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentResponse.verify|verify} messages. + * Encodes the specified AnalyzeSentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSentimentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @static - * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeSentimentResponse} message AnalyzeSentimentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeEntitySentimentResponse.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeSentimentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer. + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse + * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeEntitySentimentResponse.decode = function decode(reader, length) { + AnalyzeSentimentResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSentimentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); break; } case 2: { message.language = reader.string(); break; } + case 3: { + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -5554,149 +5711,163 @@ }; /** - * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeSentimentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse + * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeEntitySentimentResponse.decodeDelimited = function decodeDelimited(reader) { + AnalyzeSentimentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalyzeEntitySentimentResponse message. + * Verifies an AnalyzeSentimentResponse message. * @function verify - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalyzeEntitySentimentResponse.verify = function verify(message) { + AnalyzeSentimentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.language.v1.Entity.verify(message.entities[i]); - if (error) - return "entities." + error; - } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) { + var error = $root.google.cloud.language.v1.Sentiment.verify(message.documentSentiment); + if (error) + return "documentSentiment." + error; } if (message.language != null && message.hasOwnProperty("language")) if (!$util.isString(message.language)) return "language: string expected"; + if (message.sentences != null && message.hasOwnProperty("sentences")) { + if (!Array.isArray(message.sentences)) + return "sentences: array expected"; + for (var i = 0; i < message.sentences.length; ++i) { + var error = $root.google.cloud.language.v1.Sentence.verify(message.sentences[i]); + if (error) + return "sentences." + error; + } + } return null; }; /** - * Creates an AnalyzeEntitySentimentResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeSentimentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse + * @returns {google.cloud.language.v1.AnalyzeSentimentResponse} AnalyzeSentimentResponse */ - AnalyzeEntitySentimentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse) + AnalyzeSentimentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeSentimentResponse) return object; - var message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse(); - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.language.v1.AnalyzeEntitySentimentResponse.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeEntitySentimentResponse.entities: object expected"); - message.entities[i] = $root.google.cloud.language.v1.Entity.fromObject(object.entities[i]); - } + var message = new $root.google.cloud.language.v1.AnalyzeSentimentResponse(); + if (object.documentSentiment != null) { + if (typeof object.documentSentiment !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSentimentResponse.documentSentiment: object expected"); + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.fromObject(object.documentSentiment); } if (object.language != null) message.language = String(object.language); + if (object.sentences) { + if (!Array.isArray(object.sentences)) + throw TypeError(".google.cloud.language.v1.AnalyzeSentimentResponse.sentences: array expected"); + message.sentences = []; + for (var i = 0; i < object.sentences.length; ++i) { + if (typeof object.sentences[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSentimentResponse.sentences: object expected"); + message.sentences[i] = $root.google.cloud.language.v1.Sentence.fromObject(object.sentences[i]); + } + } return message; }; /** - * Creates a plain object from an AnalyzeEntitySentimentResponse message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeSentimentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @static - * @param {google.cloud.language.v1.AnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse + * @param {google.cloud.language.v1.AnalyzeSentimentResponse} message AnalyzeSentimentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalyzeEntitySentimentResponse.toObject = function toObject(message, options) { + AnalyzeSentimentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.entities = []; - if (options.defaults) + object.sentences = []; + if (options.defaults) { + object.documentSentiment = null; object.language = ""; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.language.v1.Entity.toObject(message.entities[j], options); } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + object.documentSentiment = $root.google.cloud.language.v1.Sentiment.toObject(message.documentSentiment, options); if (message.language != null && message.hasOwnProperty("language")) object.language = message.language; + if (message.sentences && message.sentences.length) { + object.sentences = []; + for (var j = 0; j < message.sentences.length; ++j) + object.sentences[j] = $root.google.cloud.language.v1.Sentence.toObject(message.sentences[j], options); + } return object; }; /** - * Converts this AnalyzeEntitySentimentResponse to JSON. + * Converts this AnalyzeSentimentResponse to JSON. * @function toJSON - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @instance * @returns {Object.} JSON object */ - AnalyzeEntitySentimentResponse.prototype.toJSON = function toJSON() { + AnalyzeSentimentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalyzeEntitySentimentResponse + * Gets the default type url for AnalyzeSentimentResponse * @function getTypeUrl - * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse + * @memberof google.cloud.language.v1.AnalyzeSentimentResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalyzeEntitySentimentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalyzeSentimentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitySentimentResponse"; + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSentimentResponse"; }; - return AnalyzeEntitySentimentResponse; + return AnalyzeSentimentResponse; })(); - v1.AnalyzeEntitiesRequest = (function() { + v1.AnalyzeEntitySentimentRequest = (function() { /** - * Properties of an AnalyzeEntitiesRequest. + * Properties of an AnalyzeEntitySentimentRequest. * @memberof google.cloud.language.v1 - * @interface IAnalyzeEntitiesRequest - * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeEntitiesRequest document - * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeEntitiesRequest encodingType + * @interface IAnalyzeEntitySentimentRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeEntitySentimentRequest document + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeEntitySentimentRequest encodingType */ /** - * Constructs a new AnalyzeEntitiesRequest. + * Constructs a new AnalyzeEntitySentimentRequest. * @memberof google.cloud.language.v1 - * @classdesc Represents an AnalyzeEntitiesRequest. - * @implements IAnalyzeEntitiesRequest + * @classdesc Represents an AnalyzeEntitySentimentRequest. + * @implements IAnalyzeEntitySentimentRequest * @constructor - * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest=} [properties] Properties to set + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest=} [properties] Properties to set */ - function AnalyzeEntitiesRequest(properties) { + function AnalyzeEntitySentimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5704,43 +5875,43 @@ } /** - * AnalyzeEntitiesRequest document. + * AnalyzeEntitySentimentRequest document. * @member {google.cloud.language.v1.IDocument|null|undefined} document - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @instance */ - AnalyzeEntitiesRequest.prototype.document = null; + AnalyzeEntitySentimentRequest.prototype.document = null; /** - * AnalyzeEntitiesRequest encodingType. + * AnalyzeEntitySentimentRequest encodingType. * @member {google.cloud.language.v1.EncodingType} encodingType - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @instance */ - AnalyzeEntitiesRequest.prototype.encodingType = 0; + AnalyzeEntitySentimentRequest.prototype.encodingType = 0; /** - * Creates a new AnalyzeEntitiesRequest instance using the specified properties. + * Creates a new AnalyzeEntitySentimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @static - * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest instance + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest instance */ - AnalyzeEntitiesRequest.create = function create(properties) { - return new AnalyzeEntitiesRequest(properties); + AnalyzeEntitySentimentRequest.create = function create(properties) { + return new AnalyzeEntitySentimentRequest(properties); }; /** - * Encodes the specified AnalyzeEntitiesRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesRequest.verify|verify} messages. + * Encodes the specified AnalyzeEntitySentimentRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @static - * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest} message AnalyzeEntitiesRequest message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeEntitiesRequest.encode = function encode(message, writer) { + AnalyzeEntitySentimentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.document != null && Object.hasOwnProperty.call(message, "document")) @@ -5751,33 +5922,33 @@ }; /** - * Encodes the specified AnalyzeEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesRequest.verify|verify} messages. + * Encodes the specified AnalyzeEntitySentimentRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @static - * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest} message AnalyzeEntitiesRequest message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeEntitySentimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer. + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeEntitiesRequest.decode = function decode(reader, length) { + AnalyzeEntitySentimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitiesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5798,30 +5969,30 @@ }; /** - * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { + AnalyzeEntitySentimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalyzeEntitiesRequest message. + * Verifies an AnalyzeEntitySentimentRequest message. * @function verify - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalyzeEntitiesRequest.verify = function verify(message) { + AnalyzeEntitySentimentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.document != null && message.hasOwnProperty("document")) { @@ -5843,20 +6014,20 @@ }; /** - * Creates an AnalyzeEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeEntitySentimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentRequest} AnalyzeEntitySentimentRequest */ - AnalyzeEntitiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitiesRequest) + AnalyzeEntitySentimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest) return object; - var message = new $root.google.cloud.language.v1.AnalyzeEntitiesRequest(); + var message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentRequest(); if (object.document != null) { if (typeof object.document !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeEntitiesRequest.document: object expected"); + throw TypeError(".google.cloud.language.v1.AnalyzeEntitySentimentRequest.document: object expected"); message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); } switch (object.encodingType) { @@ -5881,15 +6052,15 @@ }; /** - * Creates a plain object from an AnalyzeEntitiesRequest message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeEntitySentimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @static - * @param {google.cloud.language.v1.AnalyzeEntitiesRequest} message AnalyzeEntitiesRequest + * @param {google.cloud.language.v1.AnalyzeEntitySentimentRequest} message AnalyzeEntitySentimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalyzeEntitiesRequest.toObject = function toObject(message, options) { + AnalyzeEntitySentimentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -5905,53 +6076,53 @@ }; /** - * Converts this AnalyzeEntitiesRequest to JSON. + * Converts this AnalyzeEntitySentimentRequest to JSON. * @function toJSON - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @instance * @returns {Object.} JSON object */ - AnalyzeEntitiesRequest.prototype.toJSON = function toJSON() { + AnalyzeEntitySentimentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalyzeEntitiesRequest + * Gets the default type url for AnalyzeEntitySentimentRequest * @function getTypeUrl - * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalyzeEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalyzeEntitySentimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitiesRequest"; + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitySentimentRequest"; }; - return AnalyzeEntitiesRequest; + return AnalyzeEntitySentimentRequest; })(); - v1.AnalyzeEntitiesResponse = (function() { + v1.AnalyzeEntitySentimentResponse = (function() { /** - * Properties of an AnalyzeEntitiesResponse. + * Properties of an AnalyzeEntitySentimentResponse. * @memberof google.cloud.language.v1 - * @interface IAnalyzeEntitiesResponse - * @property {Array.|null} [entities] AnalyzeEntitiesResponse entities - * @property {string|null} [language] AnalyzeEntitiesResponse language + * @interface IAnalyzeEntitySentimentResponse + * @property {Array.|null} [entities] AnalyzeEntitySentimentResponse entities + * @property {string|null} [language] AnalyzeEntitySentimentResponse language */ /** - * Constructs a new AnalyzeEntitiesResponse. + * Constructs a new AnalyzeEntitySentimentResponse. * @memberof google.cloud.language.v1 - * @classdesc Represents an AnalyzeEntitiesResponse. - * @implements IAnalyzeEntitiesResponse + * @classdesc Represents an AnalyzeEntitySentimentResponse. + * @implements IAnalyzeEntitySentimentResponse * @constructor - * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse=} [properties] Properties to set + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse=} [properties] Properties to set */ - function AnalyzeEntitiesResponse(properties) { + function AnalyzeEntitySentimentResponse(properties) { this.entities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -5960,43 +6131,43 @@ } /** - * AnalyzeEntitiesResponse entities. + * AnalyzeEntitySentimentResponse entities. * @member {Array.} entities - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @instance */ - AnalyzeEntitiesResponse.prototype.entities = $util.emptyArray; + AnalyzeEntitySentimentResponse.prototype.entities = $util.emptyArray; /** - * AnalyzeEntitiesResponse language. + * AnalyzeEntitySentimentResponse language. * @member {string} language - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @instance */ - AnalyzeEntitiesResponse.prototype.language = ""; + AnalyzeEntitySentimentResponse.prototype.language = ""; /** - * Creates a new AnalyzeEntitiesResponse instance using the specified properties. + * Creates a new AnalyzeEntitySentimentResponse instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @static - * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse instance + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse instance */ - AnalyzeEntitiesResponse.create = function create(properties) { - return new AnalyzeEntitiesResponse(properties); + AnalyzeEntitySentimentResponse.create = function create(properties) { + return new AnalyzeEntitySentimentResponse(properties); }; /** - * Encodes the specified AnalyzeEntitiesResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesResponse.verify|verify} messages. + * Encodes the specified AnalyzeEntitySentimentResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @static - * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse} message AnalyzeEntitiesResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeEntitiesResponse.encode = function encode(message, writer) { + AnalyzeEntitySentimentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.entities != null && message.entities.length) @@ -6008,33 +6179,33 @@ }; /** - * Encodes the specified AnalyzeEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesResponse.verify|verify} messages. + * Encodes the specified AnalyzeEntitySentimentResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitySentimentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @static - * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse} message AnalyzeEntitiesResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeEntitySentimentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer. + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeEntitiesResponse.decode = function decode(reader, length) { + AnalyzeEntitySentimentResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitiesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6057,30 +6228,30 @@ }; /** - * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + AnalyzeEntitySentimentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalyzeEntitiesResponse message. + * Verifies an AnalyzeEntitySentimentResponse message. * @function verify - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalyzeEntitiesResponse.verify = function verify(message) { + AnalyzeEntitySentimentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.entities != null && message.hasOwnProperty("entities")) { @@ -6099,24 +6270,24 @@ }; /** - * Creates an AnalyzeEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeEntitySentimentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse + * @returns {google.cloud.language.v1.AnalyzeEntitySentimentResponse} AnalyzeEntitySentimentResponse */ - AnalyzeEntitiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitiesResponse) + AnalyzeEntitySentimentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse) return object; - var message = new $root.google.cloud.language.v1.AnalyzeEntitiesResponse(); + var message = new $root.google.cloud.language.v1.AnalyzeEntitySentimentResponse(); if (object.entities) { if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.language.v1.AnalyzeEntitiesResponse.entities: array expected"); + throw TypeError(".google.cloud.language.v1.AnalyzeEntitySentimentResponse.entities: array expected"); message.entities = []; for (var i = 0; i < object.entities.length; ++i) { if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeEntitiesResponse.entities: object expected"); + throw TypeError(".google.cloud.language.v1.AnalyzeEntitySentimentResponse.entities: object expected"); message.entities[i] = $root.google.cloud.language.v1.Entity.fromObject(object.entities[i]); } } @@ -6126,15 +6297,15 @@ }; /** - * Creates a plain object from an AnalyzeEntitiesResponse message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeEntitySentimentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @static - * @param {google.cloud.language.v1.AnalyzeEntitiesResponse} message AnalyzeEntitiesResponse + * @param {google.cloud.language.v1.AnalyzeEntitySentimentResponse} message AnalyzeEntitySentimentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalyzeEntitiesResponse.toObject = function toObject(message, options) { + AnalyzeEntitySentimentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -6153,53 +6324,53 @@ }; /** - * Converts this AnalyzeEntitiesResponse to JSON. + * Converts this AnalyzeEntitySentimentResponse to JSON. * @function toJSON - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @instance * @returns {Object.} JSON object */ - AnalyzeEntitiesResponse.prototype.toJSON = function toJSON() { + AnalyzeEntitySentimentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalyzeEntitiesResponse + * Gets the default type url for AnalyzeEntitySentimentResponse * @function getTypeUrl - * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse + * @memberof google.cloud.language.v1.AnalyzeEntitySentimentResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalyzeEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalyzeEntitySentimentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitiesResponse"; + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitySentimentResponse"; }; - return AnalyzeEntitiesResponse; + return AnalyzeEntitySentimentResponse; })(); - v1.AnalyzeSyntaxRequest = (function() { + v1.AnalyzeEntitiesRequest = (function() { /** - * Properties of an AnalyzeSyntaxRequest. + * Properties of an AnalyzeEntitiesRequest. * @memberof google.cloud.language.v1 - * @interface IAnalyzeSyntaxRequest - * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeSyntaxRequest document - * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeSyntaxRequest encodingType + * @interface IAnalyzeEntitiesRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeEntitiesRequest document + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeEntitiesRequest encodingType */ /** - * Constructs a new AnalyzeSyntaxRequest. + * Constructs a new AnalyzeEntitiesRequest. * @memberof google.cloud.language.v1 - * @classdesc Represents an AnalyzeSyntaxRequest. - * @implements IAnalyzeSyntaxRequest + * @classdesc Represents an AnalyzeEntitiesRequest. + * @implements IAnalyzeEntitiesRequest * @constructor - * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest=} [properties] Properties to set + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest=} [properties] Properties to set */ - function AnalyzeSyntaxRequest(properties) { + function AnalyzeEntitiesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6207,43 +6378,43 @@ } /** - * AnalyzeSyntaxRequest document. + * AnalyzeEntitiesRequest document. * @member {google.cloud.language.v1.IDocument|null|undefined} document - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @instance */ - AnalyzeSyntaxRequest.prototype.document = null; + AnalyzeEntitiesRequest.prototype.document = null; /** - * AnalyzeSyntaxRequest encodingType. + * AnalyzeEntitiesRequest encodingType. * @member {google.cloud.language.v1.EncodingType} encodingType - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @instance */ - AnalyzeSyntaxRequest.prototype.encodingType = 0; + AnalyzeEntitiesRequest.prototype.encodingType = 0; /** - * Creates a new AnalyzeSyntaxRequest instance using the specified properties. + * Creates a new AnalyzeEntitiesRequest instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @static - * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest instance + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest instance */ - AnalyzeSyntaxRequest.create = function create(properties) { - return new AnalyzeSyntaxRequest(properties); + AnalyzeEntitiesRequest.create = function create(properties) { + return new AnalyzeEntitiesRequest(properties); }; /** - * Encodes the specified AnalyzeSyntaxRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxRequest.verify|verify} messages. + * Encodes the specified AnalyzeEntitiesRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @static - * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest} message AnalyzeSyntaxRequest message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest} message AnalyzeEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeSyntaxRequest.encode = function encode(message, writer) { + AnalyzeEntitiesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.document != null && Object.hasOwnProperty.call(message, "document")) @@ -6254,33 +6425,33 @@ }; /** - * Encodes the specified AnalyzeSyntaxRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxRequest.verify|verify} messages. + * Encodes the specified AnalyzeEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @static - * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest} message AnalyzeSyntaxRequest message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeEntitiesRequest} message AnalyzeEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeSyntaxRequest.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer. + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest + * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeSyntaxRequest.decode = function decode(reader, length) { + AnalyzeEntitiesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSyntaxRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitiesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6301,30 +6472,30 @@ }; /** - * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest + * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeSyntaxRequest.decodeDelimited = function decodeDelimited(reader) { + AnalyzeEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalyzeSyntaxRequest message. + * Verifies an AnalyzeEntitiesRequest message. * @function verify - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalyzeSyntaxRequest.verify = function verify(message) { + AnalyzeEntitiesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.document != null && message.hasOwnProperty("document")) { @@ -6346,20 +6517,20 @@ }; /** - * Creates an AnalyzeSyntaxRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeEntitiesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest + * @returns {google.cloud.language.v1.AnalyzeEntitiesRequest} AnalyzeEntitiesRequest */ - AnalyzeSyntaxRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnalyzeSyntaxRequest) + AnalyzeEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitiesRequest) return object; - var message = new $root.google.cloud.language.v1.AnalyzeSyntaxRequest(); + var message = new $root.google.cloud.language.v1.AnalyzeEntitiesRequest(); if (object.document != null) { if (typeof object.document !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxRequest.document: object expected"); + throw TypeError(".google.cloud.language.v1.AnalyzeEntitiesRequest.document: object expected"); message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); } switch (object.encodingType) { @@ -6384,15 +6555,15 @@ }; /** - * Creates a plain object from an AnalyzeSyntaxRequest message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeEntitiesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @static - * @param {google.cloud.language.v1.AnalyzeSyntaxRequest} message AnalyzeSyntaxRequest + * @param {google.cloud.language.v1.AnalyzeEntitiesRequest} message AnalyzeEntitiesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalyzeSyntaxRequest.toObject = function toObject(message, options) { + AnalyzeEntitiesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -6408,56 +6579,54 @@ }; /** - * Converts this AnalyzeSyntaxRequest to JSON. + * Converts this AnalyzeEntitiesRequest to JSON. * @function toJSON - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @instance * @returns {Object.} JSON object */ - AnalyzeSyntaxRequest.prototype.toJSON = function toJSON() { + AnalyzeEntitiesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalyzeSyntaxRequest + * Gets the default type url for AnalyzeEntitiesRequest * @function getTypeUrl - * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @memberof google.cloud.language.v1.AnalyzeEntitiesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalyzeSyntaxRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalyzeEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSyntaxRequest"; + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitiesRequest"; }; - return AnalyzeSyntaxRequest; + return AnalyzeEntitiesRequest; })(); - v1.AnalyzeSyntaxResponse = (function() { + v1.AnalyzeEntitiesResponse = (function() { /** - * Properties of an AnalyzeSyntaxResponse. + * Properties of an AnalyzeEntitiesResponse. * @memberof google.cloud.language.v1 - * @interface IAnalyzeSyntaxResponse - * @property {Array.|null} [sentences] AnalyzeSyntaxResponse sentences - * @property {Array.|null} [tokens] AnalyzeSyntaxResponse tokens - * @property {string|null} [language] AnalyzeSyntaxResponse language + * @interface IAnalyzeEntitiesResponse + * @property {Array.|null} [entities] AnalyzeEntitiesResponse entities + * @property {string|null} [language] AnalyzeEntitiesResponse language */ /** - * Constructs a new AnalyzeSyntaxResponse. + * Constructs a new AnalyzeEntitiesResponse. * @memberof google.cloud.language.v1 - * @classdesc Represents an AnalyzeSyntaxResponse. - * @implements IAnalyzeSyntaxResponse + * @classdesc Represents an AnalyzeEntitiesResponse. + * @implements IAnalyzeEntitiesResponse * @constructor - * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse=} [properties] Properties to set + * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse=} [properties] Properties to set */ - function AnalyzeSyntaxResponse(properties) { - this.sentences = []; - this.tokens = []; + function AnalyzeEntitiesResponse(properties) { + this.entities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6465,108 +6634,91 @@ } /** - * AnalyzeSyntaxResponse sentences. - * @member {Array.} sentences - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse - * @instance - */ - AnalyzeSyntaxResponse.prototype.sentences = $util.emptyArray; - - /** - * AnalyzeSyntaxResponse tokens. - * @member {Array.} tokens - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * AnalyzeEntitiesResponse entities. + * @member {Array.} entities + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @instance */ - AnalyzeSyntaxResponse.prototype.tokens = $util.emptyArray; + AnalyzeEntitiesResponse.prototype.entities = $util.emptyArray; /** - * AnalyzeSyntaxResponse language. + * AnalyzeEntitiesResponse language. * @member {string} language - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @instance */ - AnalyzeSyntaxResponse.prototype.language = ""; + AnalyzeEntitiesResponse.prototype.language = ""; /** - * Creates a new AnalyzeSyntaxResponse instance using the specified properties. + * Creates a new AnalyzeEntitiesResponse instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @static - * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse instance + * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse instance */ - AnalyzeSyntaxResponse.create = function create(properties) { - return new AnalyzeSyntaxResponse(properties); + AnalyzeEntitiesResponse.create = function create(properties) { + return new AnalyzeEntitiesResponse(properties); }; /** - * Encodes the specified AnalyzeSyntaxResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxResponse.verify|verify} messages. + * Encodes the specified AnalyzeEntitiesResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @static - * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse} message AnalyzeSyntaxResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse} message AnalyzeEntitiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeSyntaxResponse.encode = function encode(message, writer) { + AnalyzeEntitiesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sentences != null && message.sentences.length) - for (var i = 0; i < message.sentences.length; ++i) - $root.google.cloud.language.v1.Sentence.encode(message.sentences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tokens != null && message.tokens.length) - for (var i = 0; i < message.tokens.length; ++i) - $root.google.cloud.language.v1.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.language != null && Object.hasOwnProperty.call(message, "language")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.language); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); return writer; }; /** - * Encodes the specified AnalyzeSyntaxResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxResponse.verify|verify} messages. + * Encodes the specified AnalyzeEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeEntitiesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @static - * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse} message AnalyzeSyntaxResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeEntitiesResponse} message AnalyzeEntitiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeSyntaxResponse.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer. + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse + * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeSyntaxResponse.decode = function decode(reader, length) { + AnalyzeEntitiesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSyntaxResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeEntitiesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.sentences && message.sentences.length)) - message.sentences = []; - message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); break; } case 2: { - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); - break; - } - case 3: { message.language = reader.string(); break; } @@ -6579,48 +6731,39 @@ }; /** - * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse + * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeSyntaxResponse.decodeDelimited = function decodeDelimited(reader) { + AnalyzeEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalyzeSyntaxResponse message. + * Verifies an AnalyzeEntitiesResponse message. * @function verify - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalyzeSyntaxResponse.verify = function verify(message) { + AnalyzeEntitiesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sentences != null && message.hasOwnProperty("sentences")) { - if (!Array.isArray(message.sentences)) - return "sentences: array expected"; - for (var i = 0; i < message.sentences.length; ++i) { - var error = $root.google.cloud.language.v1.Sentence.verify(message.sentences[i]); - if (error) - return "sentences." + error; - } - } - if (message.tokens != null && message.hasOwnProperty("tokens")) { - if (!Array.isArray(message.tokens)) - return "tokens: array expected"; - for (var i = 0; i < message.tokens.length; ++i) { - var error = $root.google.cloud.language.v1.Token.verify(message.tokens[i]); + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.language.v1.Entity.verify(message.entities[i]); if (error) - return "tokens." + error; + return "entities." + error; } } if (message.language != null && message.hasOwnProperty("language")) @@ -6630,35 +6773,25 @@ }; /** - * Creates an AnalyzeSyntaxResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeEntitiesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse + * @returns {google.cloud.language.v1.AnalyzeEntitiesResponse} AnalyzeEntitiesResponse */ - AnalyzeSyntaxResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnalyzeSyntaxResponse) + AnalyzeEntitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeEntitiesResponse) return object; - var message = new $root.google.cloud.language.v1.AnalyzeSyntaxResponse(); - if (object.sentences) { - if (!Array.isArray(object.sentences)) - throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.sentences: array expected"); - message.sentences = []; - for (var i = 0; i < object.sentences.length; ++i) { - if (typeof object.sentences[i] !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.sentences: object expected"); - message.sentences[i] = $root.google.cloud.language.v1.Sentence.fromObject(object.sentences[i]); - } - } - if (object.tokens) { - if (!Array.isArray(object.tokens)) - throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.tokens: array expected"); - message.tokens = []; - for (var i = 0; i < object.tokens.length; ++i) { - if (typeof object.tokens[i] !== "object") - throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.tokens: object expected"); - message.tokens[i] = $root.google.cloud.language.v1.Token.fromObject(object.tokens[i]); + var message = new $root.google.cloud.language.v1.AnalyzeEntitiesResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.language.v1.AnalyzeEntitiesResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeEntitiesResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.language.v1.Entity.fromObject(object.entities[i]); } } if (object.language != null) @@ -6667,33 +6800,26 @@ }; /** - * Creates a plain object from an AnalyzeSyntaxResponse message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeEntitiesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @static - * @param {google.cloud.language.v1.AnalyzeSyntaxResponse} message AnalyzeSyntaxResponse + * @param {google.cloud.language.v1.AnalyzeEntitiesResponse} message AnalyzeEntitiesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalyzeSyntaxResponse.toObject = function toObject(message, options) { + AnalyzeEntitiesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sentences = []; - object.tokens = []; - } + if (options.arrays || options.defaults) + object.entities = []; if (options.defaults) object.language = ""; - if (message.sentences && message.sentences.length) { - object.sentences = []; - for (var j = 0; j < message.sentences.length; ++j) - object.sentences[j] = $root.google.cloud.language.v1.Sentence.toObject(message.sentences[j], options); - } - if (message.tokens && message.tokens.length) { - object.tokens = []; - for (var j = 0; j < message.tokens.length; ++j) - object.tokens[j] = $root.google.cloud.language.v1.Token.toObject(message.tokens[j], options); + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.language.v1.Entity.toObject(message.entities[j], options); } if (message.language != null && message.hasOwnProperty("language")) object.language = message.language; @@ -6701,52 +6827,53 @@ }; /** - * Converts this AnalyzeSyntaxResponse to JSON. + * Converts this AnalyzeEntitiesResponse to JSON. * @function toJSON - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @instance * @returns {Object.} JSON object */ - AnalyzeSyntaxResponse.prototype.toJSON = function toJSON() { + AnalyzeEntitiesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalyzeSyntaxResponse + * Gets the default type url for AnalyzeEntitiesResponse * @function getTypeUrl - * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @memberof google.cloud.language.v1.AnalyzeEntitiesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalyzeSyntaxResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalyzeEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSyntaxResponse"; + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeEntitiesResponse"; }; - return AnalyzeSyntaxResponse; + return AnalyzeEntitiesResponse; })(); - v1.ClassifyTextRequest = (function() { + v1.AnalyzeSyntaxRequest = (function() { /** - * Properties of a ClassifyTextRequest. + * Properties of an AnalyzeSyntaxRequest. * @memberof google.cloud.language.v1 - * @interface IClassifyTextRequest - * @property {google.cloud.language.v1.IDocument|null} [document] ClassifyTextRequest document + * @interface IAnalyzeSyntaxRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnalyzeSyntaxRequest document + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnalyzeSyntaxRequest encodingType */ /** - * Constructs a new ClassifyTextRequest. + * Constructs a new AnalyzeSyntaxRequest. * @memberof google.cloud.language.v1 - * @classdesc Represents a ClassifyTextRequest. - * @implements IClassifyTextRequest + * @classdesc Represents an AnalyzeSyntaxRequest. + * @implements IAnalyzeSyntaxRequest * @constructor - * @param {google.cloud.language.v1.IClassifyTextRequest=} [properties] Properties to set + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest=} [properties] Properties to set */ - function ClassifyTextRequest(properties) { + function AnalyzeSyntaxRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6754,70 +6881,80 @@ } /** - * ClassifyTextRequest document. + * AnalyzeSyntaxRequest document. * @member {google.cloud.language.v1.IDocument|null|undefined} document - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @instance */ - ClassifyTextRequest.prototype.document = null; + AnalyzeSyntaxRequest.prototype.document = null; /** - * Creates a new ClassifyTextRequest instance using the specified properties. + * AnalyzeSyntaxRequest encodingType. + * @member {google.cloud.language.v1.EncodingType} encodingType + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest + * @instance + */ + AnalyzeSyntaxRequest.prototype.encodingType = 0; + + /** + * Creates a new AnalyzeSyntaxRequest instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @static - * @param {google.cloud.language.v1.IClassifyTextRequest=} [properties] Properties to set - * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest instance + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest instance */ - ClassifyTextRequest.create = function create(properties) { - return new ClassifyTextRequest(properties); + AnalyzeSyntaxRequest.create = function create(properties) { + return new AnalyzeSyntaxRequest(properties); }; /** - * Encodes the specified ClassifyTextRequest message. Does not implicitly {@link google.cloud.language.v1.ClassifyTextRequest.verify|verify} messages. + * Encodes the specified AnalyzeSyntaxRequest message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @static - * @param {google.cloud.language.v1.IClassifyTextRequest} message ClassifyTextRequest message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest} message AnalyzeSyntaxRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassifyTextRequest.encode = function encode(message, writer) { + AnalyzeSyntaxRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encodingType); return writer; }; /** - * Encodes the specified ClassifyTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassifyTextRequest.verify|verify} messages. + * Encodes the specified AnalyzeSyntaxRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @static - * @param {google.cloud.language.v1.IClassifyTextRequest} message ClassifyTextRequest message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeSyntaxRequest} message AnalyzeSyntaxRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassifyTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeSyntaxRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClassifyTextRequest message from the specified reader or buffer. + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest + * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassifyTextRequest.decode = function decode(reader, length) { + AnalyzeSyntaxRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassifyTextRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSyntaxRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6825,6 +6962,10 @@ message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); break; } + case 2: { + message.encodingType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -6834,30 +6975,30 @@ }; /** - * Decodes a ClassifyTextRequest message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest + * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassifyTextRequest.decodeDelimited = function decodeDelimited(reader) { + AnalyzeSyntaxRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClassifyTextRequest message. + * Verifies an AnalyzeSyntaxRequest message. * @function verify - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClassifyTextRequest.verify = function verify(message) { + AnalyzeSyntaxRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.document != null && message.hasOwnProperty("document")) { @@ -6865,97 +7006,132 @@ if (error) return "document." + error; } + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a ClassifyTextRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeSyntaxRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest + * @returns {google.cloud.language.v1.AnalyzeSyntaxRequest} AnalyzeSyntaxRequest */ - ClassifyTextRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.ClassifyTextRequest) + AnalyzeSyntaxRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeSyntaxRequest) return object; - var message = new $root.google.cloud.language.v1.ClassifyTextRequest(); + var message = new $root.google.cloud.language.v1.AnalyzeSyntaxRequest(); if (object.document != null) { if (typeof object.document !== "object") - throw TypeError(".google.cloud.language.v1.ClassifyTextRequest.document: object expected"); + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxRequest.document: object expected"); message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; + } return message; }; /** - * Creates a plain object from a ClassifyTextRequest message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeSyntaxRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @static - * @param {google.cloud.language.v1.ClassifyTextRequest} message ClassifyTextRequest + * @param {google.cloud.language.v1.AnalyzeSyntaxRequest} message AnalyzeSyntaxRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassifyTextRequest.toObject = function toObject(message, options) { + AnalyzeSyntaxRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.document = null; + object.encodingType = options.enums === String ? "NONE" : 0; + } if (message.document != null && message.hasOwnProperty("document")) object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1.EncodingType[message.encodingType] : message.encodingType; return object; }; /** - * Converts this ClassifyTextRequest to JSON. + * Converts this AnalyzeSyntaxRequest to JSON. * @function toJSON - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @instance * @returns {Object.} JSON object */ - ClassifyTextRequest.prototype.toJSON = function toJSON() { + AnalyzeSyntaxRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClassifyTextRequest + * Gets the default type url for AnalyzeSyntaxRequest * @function getTypeUrl - * @memberof google.cloud.language.v1.ClassifyTextRequest + * @memberof google.cloud.language.v1.AnalyzeSyntaxRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClassifyTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalyzeSyntaxRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.ClassifyTextRequest"; + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSyntaxRequest"; }; - return ClassifyTextRequest; + return AnalyzeSyntaxRequest; })(); - v1.ClassifyTextResponse = (function() { + v1.AnalyzeSyntaxResponse = (function() { /** - * Properties of a ClassifyTextResponse. + * Properties of an AnalyzeSyntaxResponse. * @memberof google.cloud.language.v1 - * @interface IClassifyTextResponse - * @property {Array.|null} [categories] ClassifyTextResponse categories + * @interface IAnalyzeSyntaxResponse + * @property {Array.|null} [sentences] AnalyzeSyntaxResponse sentences + * @property {Array.|null} [tokens] AnalyzeSyntaxResponse tokens + * @property {string|null} [language] AnalyzeSyntaxResponse language */ /** - * Constructs a new ClassifyTextResponse. + * Constructs a new AnalyzeSyntaxResponse. * @memberof google.cloud.language.v1 - * @classdesc Represents a ClassifyTextResponse. - * @implements IClassifyTextResponse + * @classdesc Represents an AnalyzeSyntaxResponse. + * @implements IAnalyzeSyntaxResponse * @constructor - * @param {google.cloud.language.v1.IClassifyTextResponse=} [properties] Properties to set + * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse=} [properties] Properties to set */ - function ClassifyTextResponse(properties) { - this.categories = []; + function AnalyzeSyntaxResponse(properties) { + this.sentences = []; + this.tokens = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6963,78 +7139,109 @@ } /** - * ClassifyTextResponse categories. - * @member {Array.} categories - * @memberof google.cloud.language.v1.ClassifyTextResponse + * AnalyzeSyntaxResponse sentences. + * @member {Array.} sentences + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @instance */ - ClassifyTextResponse.prototype.categories = $util.emptyArray; + AnalyzeSyntaxResponse.prototype.sentences = $util.emptyArray; /** - * Creates a new ClassifyTextResponse instance using the specified properties. - * @function create - * @memberof google.cloud.language.v1.ClassifyTextResponse - * @static - * @param {google.cloud.language.v1.IClassifyTextResponse=} [properties] Properties to set - * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse instance - */ - ClassifyTextResponse.create = function create(properties) { - return new ClassifyTextResponse(properties); + * AnalyzeSyntaxResponse tokens. + * @member {Array.} tokens + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @instance + */ + AnalyzeSyntaxResponse.prototype.tokens = $util.emptyArray; + + /** + * AnalyzeSyntaxResponse language. + * @member {string} language + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @instance + */ + AnalyzeSyntaxResponse.prototype.language = ""; + + /** + * Creates a new AnalyzeSyntaxResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse + * @static + * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse instance + */ + AnalyzeSyntaxResponse.create = function create(properties) { + return new AnalyzeSyntaxResponse(properties); }; /** - * Encodes the specified ClassifyTextResponse message. Does not implicitly {@link google.cloud.language.v1.ClassifyTextResponse.verify|verify} messages. + * Encodes the specified AnalyzeSyntaxResponse message. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.ClassifyTextResponse + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @static - * @param {google.cloud.language.v1.IClassifyTextResponse} message ClassifyTextResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse} message AnalyzeSyntaxResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassifyTextResponse.encode = function encode(message, writer) { + AnalyzeSyntaxResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.categories != null && message.categories.length) - for (var i = 0; i < message.categories.length; ++i) - $root.google.cloud.language.v1.ClassificationCategory.encode(message.categories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sentences != null && message.sentences.length) + for (var i = 0; i < message.sentences.length; ++i) + $root.google.cloud.language.v1.Sentence.encode(message.sentences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokens != null && message.tokens.length) + for (var i = 0; i < message.tokens.length; ++i) + $root.google.cloud.language.v1.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.language != null && Object.hasOwnProperty.call(message, "language")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.language); return writer; }; /** - * Encodes the specified ClassifyTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassifyTextResponse.verify|verify} messages. + * Encodes the specified AnalyzeSyntaxResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnalyzeSyntaxResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.ClassifyTextResponse + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @static - * @param {google.cloud.language.v1.IClassifyTextResponse} message ClassifyTextResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnalyzeSyntaxResponse} message AnalyzeSyntaxResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassifyTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeSyntaxResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClassifyTextResponse message from the specified reader or buffer. + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.ClassifyTextResponse + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse + * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassifyTextResponse.decode = function decode(reader, length) { + AnalyzeSyntaxResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassifyTextResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnalyzeSyntaxResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); + break; + } + case 3: { + message.language = reader.string(); break; } default: @@ -7046,141 +7253,175 @@ }; /** - * Decodes a ClassifyTextResponse message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.ClassifyTextResponse + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse + * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClassifyTextResponse.decodeDelimited = function decodeDelimited(reader) { + AnalyzeSyntaxResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClassifyTextResponse message. + * Verifies an AnalyzeSyntaxResponse message. * @function verify - * @memberof google.cloud.language.v1.ClassifyTextResponse + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClassifyTextResponse.verify = function verify(message) { + AnalyzeSyntaxResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) - return "categories: array expected"; - for (var i = 0; i < message.categories.length; ++i) { - var error = $root.google.cloud.language.v1.ClassificationCategory.verify(message.categories[i]); + if (message.sentences != null && message.hasOwnProperty("sentences")) { + if (!Array.isArray(message.sentences)) + return "sentences: array expected"; + for (var i = 0; i < message.sentences.length; ++i) { + var error = $root.google.cloud.language.v1.Sentence.verify(message.sentences[i]); if (error) - return "categories." + error; + return "sentences." + error; + } + } + if (message.tokens != null && message.hasOwnProperty("tokens")) { + if (!Array.isArray(message.tokens)) + return "tokens: array expected"; + for (var i = 0; i < message.tokens.length; ++i) { + var error = $root.google.cloud.language.v1.Token.verify(message.tokens[i]); + if (error) + return "tokens." + error; } } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; return null; }; /** - * Creates a ClassifyTextResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeSyntaxResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.ClassifyTextResponse + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse + * @returns {google.cloud.language.v1.AnalyzeSyntaxResponse} AnalyzeSyntaxResponse */ - ClassifyTextResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.ClassifyTextResponse) + AnalyzeSyntaxResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnalyzeSyntaxResponse) return object; - var message = new $root.google.cloud.language.v1.ClassifyTextResponse(); - if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".google.cloud.language.v1.ClassifyTextResponse.categories: array expected"); - message.categories = []; - for (var i = 0; i < object.categories.length; ++i) { - if (typeof object.categories[i] !== "object") - throw TypeError(".google.cloud.language.v1.ClassifyTextResponse.categories: object expected"); - message.categories[i] = $root.google.cloud.language.v1.ClassificationCategory.fromObject(object.categories[i]); + var message = new $root.google.cloud.language.v1.AnalyzeSyntaxResponse(); + if (object.sentences) { + if (!Array.isArray(object.sentences)) + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.sentences: array expected"); + message.sentences = []; + for (var i = 0; i < object.sentences.length; ++i) { + if (typeof object.sentences[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.sentences: object expected"); + message.sentences[i] = $root.google.cloud.language.v1.Sentence.fromObject(object.sentences[i]); + } + } + if (object.tokens) { + if (!Array.isArray(object.tokens)) + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.tokens: array expected"); + message.tokens = []; + for (var i = 0; i < object.tokens.length; ++i) { + if (typeof object.tokens[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnalyzeSyntaxResponse.tokens: object expected"); + message.tokens[i] = $root.google.cloud.language.v1.Token.fromObject(object.tokens[i]); } } + if (object.language != null) + message.language = String(object.language); return message; }; /** - * Creates a plain object from a ClassifyTextResponse message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeSyntaxResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.ClassifyTextResponse + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @static - * @param {google.cloud.language.v1.ClassifyTextResponse} message ClassifyTextResponse + * @param {google.cloud.language.v1.AnalyzeSyntaxResponse} message AnalyzeSyntaxResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassifyTextResponse.toObject = function toObject(message, options) { + AnalyzeSyntaxResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.categories = []; - if (message.categories && message.categories.length) { - object.categories = []; - for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = $root.google.cloud.language.v1.ClassificationCategory.toObject(message.categories[j], options); + if (options.arrays || options.defaults) { + object.sentences = []; + object.tokens = []; + } + if (options.defaults) + object.language = ""; + if (message.sentences && message.sentences.length) { + object.sentences = []; + for (var j = 0; j < message.sentences.length; ++j) + object.sentences[j] = $root.google.cloud.language.v1.Sentence.toObject(message.sentences[j], options); + } + if (message.tokens && message.tokens.length) { + object.tokens = []; + for (var j = 0; j < message.tokens.length; ++j) + object.tokens[j] = $root.google.cloud.language.v1.Token.toObject(message.tokens[j], options); } + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; return object; }; /** - * Converts this ClassifyTextResponse to JSON. + * Converts this AnalyzeSyntaxResponse to JSON. * @function toJSON - * @memberof google.cloud.language.v1.ClassifyTextResponse + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @instance * @returns {Object.} JSON object */ - ClassifyTextResponse.prototype.toJSON = function toJSON() { + AnalyzeSyntaxResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClassifyTextResponse + * Gets the default type url for AnalyzeSyntaxResponse * @function getTypeUrl - * @memberof google.cloud.language.v1.ClassifyTextResponse + * @memberof google.cloud.language.v1.AnalyzeSyntaxResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClassifyTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalyzeSyntaxResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.ClassifyTextResponse"; + return typeUrlPrefix + "/google.cloud.language.v1.AnalyzeSyntaxResponse"; }; - return ClassifyTextResponse; + return AnalyzeSyntaxResponse; })(); - v1.AnnotateTextRequest = (function() { + v1.ClassifyTextRequest = (function() { /** - * Properties of an AnnotateTextRequest. + * Properties of a ClassifyTextRequest. * @memberof google.cloud.language.v1 - * @interface IAnnotateTextRequest - * @property {google.cloud.language.v1.IDocument|null} [document] AnnotateTextRequest document - * @property {google.cloud.language.v1.AnnotateTextRequest.IFeatures|null} [features] AnnotateTextRequest features - * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnnotateTextRequest encodingType + * @interface IClassifyTextRequest + * @property {google.cloud.language.v1.IDocument|null} [document] ClassifyTextRequest document + * @property {google.cloud.language.v1.IClassificationModelOptions|null} [classificationModelOptions] ClassifyTextRequest classificationModelOptions */ /** - * Constructs a new AnnotateTextRequest. + * Constructs a new ClassifyTextRequest. * @memberof google.cloud.language.v1 - * @classdesc Represents an AnnotateTextRequest. - * @implements IAnnotateTextRequest + * @classdesc Represents a ClassifyTextRequest. + * @implements IClassifyTextRequest * @constructor - * @param {google.cloud.language.v1.IAnnotateTextRequest=} [properties] Properties to set + * @param {google.cloud.language.v1.IClassifyTextRequest=} [properties] Properties to set */ - function AnnotateTextRequest(properties) { + function ClassifyTextRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7188,90 +7429,80 @@ } /** - * AnnotateTextRequest document. + * ClassifyTextRequest document. * @member {google.cloud.language.v1.IDocument|null|undefined} document - * @memberof google.cloud.language.v1.AnnotateTextRequest - * @instance - */ - AnnotateTextRequest.prototype.document = null; - - /** - * AnnotateTextRequest features. - * @member {google.cloud.language.v1.AnnotateTextRequest.IFeatures|null|undefined} features - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @instance */ - AnnotateTextRequest.prototype.features = null; + ClassifyTextRequest.prototype.document = null; /** - * AnnotateTextRequest encodingType. - * @member {google.cloud.language.v1.EncodingType} encodingType - * @memberof google.cloud.language.v1.AnnotateTextRequest + * ClassifyTextRequest classificationModelOptions. + * @member {google.cloud.language.v1.IClassificationModelOptions|null|undefined} classificationModelOptions + * @memberof google.cloud.language.v1.ClassifyTextRequest * @instance */ - AnnotateTextRequest.prototype.encodingType = 0; + ClassifyTextRequest.prototype.classificationModelOptions = null; /** - * Creates a new AnnotateTextRequest instance using the specified properties. + * Creates a new ClassifyTextRequest instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @static - * @param {google.cloud.language.v1.IAnnotateTextRequest=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest instance + * @param {google.cloud.language.v1.IClassifyTextRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest instance */ - AnnotateTextRequest.create = function create(properties) { - return new AnnotateTextRequest(properties); + ClassifyTextRequest.create = function create(properties) { + return new ClassifyTextRequest(properties); }; /** - * Encodes the specified AnnotateTextRequest message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.verify|verify} messages. + * Encodes the specified ClassifyTextRequest message. Does not implicitly {@link google.cloud.language.v1.ClassifyTextRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @static - * @param {google.cloud.language.v1.IAnnotateTextRequest} message AnnotateTextRequest message or plain object to encode + * @param {google.cloud.language.v1.IClassifyTextRequest} message ClassifyTextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotateTextRequest.encode = function encode(message, writer) { + ClassifyTextRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.cloud.language.v1.AnnotateTextRequest.Features.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encodingType); + if (message.classificationModelOptions != null && Object.hasOwnProperty.call(message, "classificationModelOptions")) + $root.google.cloud.language.v1.ClassificationModelOptions.encode(message.classificationModelOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnnotateTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.verify|verify} messages. + * Encodes the specified ClassifyTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassifyTextRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @static - * @param {google.cloud.language.v1.IAnnotateTextRequest} message AnnotateTextRequest message or plain object to encode + * @param {google.cloud.language.v1.IClassifyTextRequest} message ClassifyTextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotateTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + ClassifyTextRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotateTextRequest message from the specified reader or buffer. + * Decodes a ClassifyTextRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest + * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotateTextRequest.decode = function decode(reader, length) { + ClassifyTextRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnnotateTextRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassifyTextRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -7279,12 +7510,8 @@ message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); break; } - case 2: { - message.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.decode(reader, reader.uint32()); - break; - } case 3: { - message.encodingType = reader.int32(); + message.classificationModelOptions = $root.google.cloud.language.v1.ClassificationModelOptions.decode(reader, reader.uint32()); break; } default: @@ -7296,30 +7523,30 @@ }; /** - * Decodes an AnnotateTextRequest message from the specified reader or buffer, length delimited. + * Decodes a ClassifyTextRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest + * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotateTextRequest.decodeDelimited = function decodeDelimited(reader) { + ClassifyTextRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotateTextRequest message. + * Verifies a ClassifyTextRequest message. * @function verify - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotateTextRequest.verify = function verify(message) { + ClassifyTextRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.document != null && message.hasOwnProperty("document")) { @@ -7327,446 +7554,336 @@ if (error) return "document." + error; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.cloud.language.v1.AnnotateTextRequest.Features.verify(message.features); + if (message.classificationModelOptions != null && message.hasOwnProperty("classificationModelOptions")) { + var error = $root.google.cloud.language.v1.ClassificationModelOptions.verify(message.classificationModelOptions); if (error) - return "features." + error; + return "classificationModelOptions." + error; } - if (message.encodingType != null && message.hasOwnProperty("encodingType")) - switch (message.encodingType) { - default: - return "encodingType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } return null; }; /** - * Creates an AnnotateTextRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ClassifyTextRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest + * @returns {google.cloud.language.v1.ClassifyTextRequest} ClassifyTextRequest */ - AnnotateTextRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnnotateTextRequest) + ClassifyTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.ClassifyTextRequest) return object; - var message = new $root.google.cloud.language.v1.AnnotateTextRequest(); + var message = new $root.google.cloud.language.v1.ClassifyTextRequest(); if (object.document != null) { if (typeof object.document !== "object") - throw TypeError(".google.cloud.language.v1.AnnotateTextRequest.document: object expected"); + throw TypeError(".google.cloud.language.v1.ClassifyTextRequest.document: object expected"); message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.cloud.language.v1.AnnotateTextRequest.features: object expected"); - message.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.fromObject(object.features); - } - switch (object.encodingType) { - case "NONE": - case 0: - message.encodingType = 0; - break; - case "UTF8": - case 1: - message.encodingType = 1; - break; - case "UTF16": - case 2: - message.encodingType = 2; - break; - case "UTF32": - case 3: - message.encodingType = 3; - break; + if (object.classificationModelOptions != null) { + if (typeof object.classificationModelOptions !== "object") + throw TypeError(".google.cloud.language.v1.ClassifyTextRequest.classificationModelOptions: object expected"); + message.classificationModelOptions = $root.google.cloud.language.v1.ClassificationModelOptions.fromObject(object.classificationModelOptions); } return message; }; /** - * Creates a plain object from an AnnotateTextRequest message. Also converts values to other types if specified. + * Creates a plain object from a ClassifyTextRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @static - * @param {google.cloud.language.v1.AnnotateTextRequest} message AnnotateTextRequest + * @param {google.cloud.language.v1.ClassifyTextRequest} message ClassifyTextRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotateTextRequest.toObject = function toObject(message, options) { + ClassifyTextRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.document = null; - object.features = null; - object.encodingType = options.enums === String ? "NONE" : 0; + object.classificationModelOptions = null; } if (message.document != null && message.hasOwnProperty("document")) object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.toObject(message.features, options); - if (message.encodingType != null && message.hasOwnProperty("encodingType")) - object.encodingType = options.enums === String ? $root.google.cloud.language.v1.EncodingType[message.encodingType] : message.encodingType; + if (message.classificationModelOptions != null && message.hasOwnProperty("classificationModelOptions")) + object.classificationModelOptions = $root.google.cloud.language.v1.ClassificationModelOptions.toObject(message.classificationModelOptions, options); return object; }; /** - * Converts this AnnotateTextRequest to JSON. + * Converts this ClassifyTextRequest to JSON. * @function toJSON - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @instance * @returns {Object.} JSON object */ - AnnotateTextRequest.prototype.toJSON = function toJSON() { + ClassifyTextRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnnotateTextRequest + * Gets the default type url for ClassifyTextRequest * @function getTypeUrl - * @memberof google.cloud.language.v1.AnnotateTextRequest + * @memberof google.cloud.language.v1.ClassifyTextRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnnotateTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClassifyTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.AnnotateTextRequest"; + return typeUrlPrefix + "/google.cloud.language.v1.ClassifyTextRequest"; }; - AnnotateTextRequest.Features = (function() { - - /** - * Properties of a Features. - * @memberof google.cloud.language.v1.AnnotateTextRequest - * @interface IFeatures - * @property {boolean|null} [extractSyntax] Features extractSyntax - * @property {boolean|null} [extractEntities] Features extractEntities - * @property {boolean|null} [extractDocumentSentiment] Features extractDocumentSentiment - * @property {boolean|null} [extractEntitySentiment] Features extractEntitySentiment - * @property {boolean|null} [classifyText] Features classifyText - */ + return ClassifyTextRequest; + })(); - /** - * Constructs a new Features. - * @memberof google.cloud.language.v1.AnnotateTextRequest - * @classdesc Represents a Features. - * @implements IFeatures - * @constructor - * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures=} [properties] Properties to set - */ - function Features(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.ClassifyTextResponse = (function() { - /** - * Features extractSyntax. - * @member {boolean} extractSyntax - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @instance - */ - Features.prototype.extractSyntax = false; + /** + * Properties of a ClassifyTextResponse. + * @memberof google.cloud.language.v1 + * @interface IClassifyTextResponse + * @property {Array.|null} [categories] ClassifyTextResponse categories + */ - /** - * Features extractEntities. - * @member {boolean} extractEntities - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @instance - */ - Features.prototype.extractEntities = false; + /** + * Constructs a new ClassifyTextResponse. + * @memberof google.cloud.language.v1 + * @classdesc Represents a ClassifyTextResponse. + * @implements IClassifyTextResponse + * @constructor + * @param {google.cloud.language.v1.IClassifyTextResponse=} [properties] Properties to set + */ + function ClassifyTextResponse(properties) { + this.categories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Features extractDocumentSentiment. - * @member {boolean} extractDocumentSentiment - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @instance - */ - Features.prototype.extractDocumentSentiment = false; + /** + * ClassifyTextResponse categories. + * @member {Array.} categories + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @instance + */ + ClassifyTextResponse.prototype.categories = $util.emptyArray; - /** - * Features extractEntitySentiment. - * @member {boolean} extractEntitySentiment - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @instance - */ - Features.prototype.extractEntitySentiment = false; + /** + * Creates a new ClassifyTextResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1.IClassifyTextResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse instance + */ + ClassifyTextResponse.create = function create(properties) { + return new ClassifyTextResponse(properties); + }; - /** - * Features classifyText. - * @member {boolean} classifyText - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @instance - */ - Features.prototype.classifyText = false; + /** + * Encodes the specified ClassifyTextResponse message. Does not implicitly {@link google.cloud.language.v1.ClassifyTextResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1.IClassifyTextResponse} message ClassifyTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.language.v1.ClassificationCategory.encode(message.categories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Creates a new Features instance using the specified properties. - * @function create - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @static - * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features instance - */ - Features.create = function create(properties) { - return new Features(properties); - }; - - /** - * Encodes the specified Features message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.Features.verify|verify} messages. - * @function encode - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @static - * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures} message Features message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Features.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.extractSyntax != null && Object.hasOwnProperty.call(message, "extractSyntax")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.extractSyntax); - if (message.extractEntities != null && Object.hasOwnProperty.call(message, "extractEntities")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.extractEntities); - if (message.extractDocumentSentiment != null && Object.hasOwnProperty.call(message, "extractDocumentSentiment")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.extractDocumentSentiment); - if (message.extractEntitySentiment != null && Object.hasOwnProperty.call(message, "extractEntitySentiment")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.extractEntitySentiment); - if (message.classifyText != null && Object.hasOwnProperty.call(message, "classifyText")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.classifyText); - return writer; - }; - - /** - * Encodes the specified Features message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.Features.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @static - * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures} message Features message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Features.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ClassifyTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.ClassifyTextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1.IClassifyTextResponse} message ClassifyTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClassifyTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Features message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Features.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnnotateTextRequest.Features(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.extractSyntax = reader.bool(); - break; - } - case 2: { - message.extractEntities = reader.bool(); - break; - } - case 3: { - message.extractDocumentSentiment = reader.bool(); - break; - } - case 4: { - message.extractEntitySentiment = reader.bool(); - break; - } - case 6: { - message.classifyText = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.ClassifyTextResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a Features message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Features.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ClassifyTextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClassifyTextResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Features message. - * @function verify - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Features.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) - if (typeof message.extractSyntax !== "boolean") - return "extractSyntax: boolean expected"; - if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) - if (typeof message.extractEntities !== "boolean") - return "extractEntities: boolean expected"; - if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) - if (typeof message.extractDocumentSentiment !== "boolean") - return "extractDocumentSentiment: boolean expected"; - if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) - if (typeof message.extractEntitySentiment !== "boolean") - return "extractEntitySentiment: boolean expected"; - if (message.classifyText != null && message.hasOwnProperty("classifyText")) - if (typeof message.classifyText !== "boolean") - return "classifyText: boolean expected"; - return null; - }; + /** + * Verifies a ClassifyTextResponse message. + * @function verify + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClassifyTextResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.language.v1.ClassificationCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } + return null; + }; - /** - * Creates a Features message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features - */ - Features.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnnotateTextRequest.Features) - return object; - var message = new $root.google.cloud.language.v1.AnnotateTextRequest.Features(); - if (object.extractSyntax != null) - message.extractSyntax = Boolean(object.extractSyntax); - if (object.extractEntities != null) - message.extractEntities = Boolean(object.extractEntities); - if (object.extractDocumentSentiment != null) - message.extractDocumentSentiment = Boolean(object.extractDocumentSentiment); - if (object.extractEntitySentiment != null) - message.extractEntitySentiment = Boolean(object.extractEntitySentiment); - if (object.classifyText != null) - message.classifyText = Boolean(object.classifyText); - return message; - }; + /** + * Creates a ClassifyTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.ClassifyTextResponse} ClassifyTextResponse + */ + ClassifyTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.ClassifyTextResponse) + return object; + var message = new $root.google.cloud.language.v1.ClassifyTextResponse(); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.language.v1.ClassifyTextResponse.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.language.v1.ClassifyTextResponse.categories: object expected"); + message.categories[i] = $root.google.cloud.language.v1.ClassificationCategory.fromObject(object.categories[i]); + } + } + return message; + }; - /** - * Creates a plain object from a Features message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @static - * @param {google.cloud.language.v1.AnnotateTextRequest.Features} message Features - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Features.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.extractSyntax = false; - object.extractEntities = false; - object.extractDocumentSentiment = false; - object.extractEntitySentiment = false; - object.classifyText = false; - } - if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) - object.extractSyntax = message.extractSyntax; - if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) - object.extractEntities = message.extractEntities; - if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) - object.extractDocumentSentiment = message.extractDocumentSentiment; - if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) - object.extractEntitySentiment = message.extractEntitySentiment; - if (message.classifyText != null && message.hasOwnProperty("classifyText")) - object.classifyText = message.classifyText; - return object; - }; - - /** - * Converts this Features to JSON. - * @function toJSON - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @instance - * @returns {Object.} JSON object - */ - Features.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ClassifyTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {google.cloud.language.v1.ClassifyTextResponse} message ClassifyTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClassifyTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.categories = []; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.language.v1.ClassificationCategory.toObject(message.categories[j], options); + } + return object; + }; - /** - * Gets the default type url for Features - * @function getTypeUrl - * @memberof google.cloud.language.v1.AnnotateTextRequest.Features - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Features.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.language.v1.AnnotateTextRequest.Features"; - }; + /** + * Converts this ClassifyTextResponse to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @instance + * @returns {Object.} JSON object + */ + ClassifyTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Features; - })(); + /** + * Gets the default type url for ClassifyTextResponse + * @function getTypeUrl + * @memberof google.cloud.language.v1.ClassifyTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClassifyTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.ClassifyTextResponse"; + }; - return AnnotateTextRequest; + return ClassifyTextResponse; })(); - v1.AnnotateTextResponse = (function() { + v1.AnnotateTextRequest = (function() { /** - * Properties of an AnnotateTextResponse. + * Properties of an AnnotateTextRequest. * @memberof google.cloud.language.v1 - * @interface IAnnotateTextResponse - * @property {Array.|null} [sentences] AnnotateTextResponse sentences - * @property {Array.|null} [tokens] AnnotateTextResponse tokens - * @property {Array.|null} [entities] AnnotateTextResponse entities - * @property {google.cloud.language.v1.ISentiment|null} [documentSentiment] AnnotateTextResponse documentSentiment - * @property {string|null} [language] AnnotateTextResponse language - * @property {Array.|null} [categories] AnnotateTextResponse categories + * @interface IAnnotateTextRequest + * @property {google.cloud.language.v1.IDocument|null} [document] AnnotateTextRequest document + * @property {google.cloud.language.v1.AnnotateTextRequest.IFeatures|null} [features] AnnotateTextRequest features + * @property {google.cloud.language.v1.EncodingType|null} [encodingType] AnnotateTextRequest encodingType */ /** - * Constructs a new AnnotateTextResponse. + * Constructs a new AnnotateTextRequest. * @memberof google.cloud.language.v1 - * @classdesc Represents an AnnotateTextResponse. - * @implements IAnnotateTextResponse + * @classdesc Represents an AnnotateTextRequest. + * @implements IAnnotateTextRequest * @constructor - * @param {google.cloud.language.v1.IAnnotateTextResponse=} [properties] Properties to set + * @param {google.cloud.language.v1.IAnnotateTextRequest=} [properties] Properties to set */ - function AnnotateTextResponse(properties) { - this.sentences = []; - this.tokens = []; - this.entities = []; - this.categories = []; + function AnnotateTextRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7774,157 +7891,103 @@ } /** - * AnnotateTextResponse sentences. - * @member {Array.} sentences - * @memberof google.cloud.language.v1.AnnotateTextResponse - * @instance - */ - AnnotateTextResponse.prototype.sentences = $util.emptyArray; - - /** - * AnnotateTextResponse tokens. - * @member {Array.} tokens - * @memberof google.cloud.language.v1.AnnotateTextResponse - * @instance - */ - AnnotateTextResponse.prototype.tokens = $util.emptyArray; - - /** - * AnnotateTextResponse entities. - * @member {Array.} entities - * @memberof google.cloud.language.v1.AnnotateTextResponse - * @instance - */ - AnnotateTextResponse.prototype.entities = $util.emptyArray; - - /** - * AnnotateTextResponse documentSentiment. - * @member {google.cloud.language.v1.ISentiment|null|undefined} documentSentiment - * @memberof google.cloud.language.v1.AnnotateTextResponse + * AnnotateTextRequest document. + * @member {google.cloud.language.v1.IDocument|null|undefined} document + * @memberof google.cloud.language.v1.AnnotateTextRequest * @instance */ - AnnotateTextResponse.prototype.documentSentiment = null; + AnnotateTextRequest.prototype.document = null; /** - * AnnotateTextResponse language. - * @member {string} language - * @memberof google.cloud.language.v1.AnnotateTextResponse + * AnnotateTextRequest features. + * @member {google.cloud.language.v1.AnnotateTextRequest.IFeatures|null|undefined} features + * @memberof google.cloud.language.v1.AnnotateTextRequest * @instance */ - AnnotateTextResponse.prototype.language = ""; + AnnotateTextRequest.prototype.features = null; /** - * AnnotateTextResponse categories. - * @member {Array.} categories - * @memberof google.cloud.language.v1.AnnotateTextResponse + * AnnotateTextRequest encodingType. + * @member {google.cloud.language.v1.EncodingType} encodingType + * @memberof google.cloud.language.v1.AnnotateTextRequest * @instance */ - AnnotateTextResponse.prototype.categories = $util.emptyArray; + AnnotateTextRequest.prototype.encodingType = 0; /** - * Creates a new AnnotateTextResponse instance using the specified properties. + * Creates a new AnnotateTextRequest instance using the specified properties. * @function create - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @static - * @param {google.cloud.language.v1.IAnnotateTextResponse=} [properties] Properties to set - * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse instance + * @param {google.cloud.language.v1.IAnnotateTextRequest=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest instance */ - AnnotateTextResponse.create = function create(properties) { - return new AnnotateTextResponse(properties); + AnnotateTextRequest.create = function create(properties) { + return new AnnotateTextRequest(properties); }; /** - * Encodes the specified AnnotateTextResponse message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextResponse.verify|verify} messages. + * Encodes the specified AnnotateTextRequest message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @static - * @param {google.cloud.language.v1.IAnnotateTextResponse} message AnnotateTextResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnnotateTextRequest} message AnnotateTextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotateTextResponse.encode = function encode(message, writer) { + AnnotateTextRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sentences != null && message.sentences.length) - for (var i = 0; i < message.sentences.length; ++i) - $root.google.cloud.language.v1.Sentence.encode(message.sentences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tokens != null && message.tokens.length) - for (var i = 0; i < message.tokens.length; ++i) - $root.google.cloud.language.v1.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.documentSentiment != null && Object.hasOwnProperty.call(message, "documentSentiment")) - $root.google.cloud.language.v1.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.language != null && Object.hasOwnProperty.call(message, "language")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.language); - if (message.categories != null && message.categories.length) - for (var i = 0; i < message.categories.length; ++i) - $root.google.cloud.language.v1.ClassificationCategory.encode(message.categories[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.document != null && Object.hasOwnProperty.call(message, "document")) + $root.google.cloud.language.v1.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.cloud.language.v1.AnnotateTextRequest.Features.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.encodingType != null && Object.hasOwnProperty.call(message, "encodingType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encodingType); return writer; }; /** - * Encodes the specified AnnotateTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextResponse.verify|verify} messages. + * Encodes the specified AnnotateTextRequest message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @static - * @param {google.cloud.language.v1.IAnnotateTextResponse} message AnnotateTextResponse message or plain object to encode + * @param {google.cloud.language.v1.IAnnotateTextRequest} message AnnotateTextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotateTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + AnnotateTextRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotateTextResponse message from the specified reader or buffer. + * Decodes an AnnotateTextRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse + * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotateTextResponse.decode = function decode(reader, length) { + AnnotateTextRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnnotateTextResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnnotateTextRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.sentences && message.sentences.length)) - message.sentences = []; - message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); + message.document = $root.google.cloud.language.v1.Document.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); + message.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); - break; - } - case 4: { - message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); - break; - } - case 5: { - message.language = reader.string(); - break; - } - case 6: { - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); + message.encodingType = reader.int32(); break; } default: @@ -7936,620 +7999,665 @@ }; /** - * Decodes an AnnotateTextResponse message from the specified reader or buffer, length delimited. + * Decodes an AnnotateTextRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse + * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotateTextResponse.decodeDelimited = function decodeDelimited(reader) { + AnnotateTextRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotateTextResponse message. + * Verifies an AnnotateTextRequest message. * @function verify - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotateTextResponse.verify = function verify(message) { + AnnotateTextRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sentences != null && message.hasOwnProperty("sentences")) { - if (!Array.isArray(message.sentences)) - return "sentences: array expected"; - for (var i = 0; i < message.sentences.length; ++i) { - var error = $root.google.cloud.language.v1.Sentence.verify(message.sentences[i]); - if (error) - return "sentences." + error; - } - } - if (message.tokens != null && message.hasOwnProperty("tokens")) { - if (!Array.isArray(message.tokens)) - return "tokens: array expected"; - for (var i = 0; i < message.tokens.length; ++i) { - var error = $root.google.cloud.language.v1.Token.verify(message.tokens[i]); - if (error) - return "tokens." + error; - } - } - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.language.v1.Entity.verify(message.entities[i]); - if (error) - return "entities." + error; - } + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.language.v1.Document.verify(message.document); + if (error) + return "document." + error; } - if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) { - var error = $root.google.cloud.language.v1.Sentiment.verify(message.documentSentiment); + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.cloud.language.v1.AnnotateTextRequest.Features.verify(message.features); if (error) - return "documentSentiment." + error; + return "features." + error; } - if (message.language != null && message.hasOwnProperty("language")) - if (!$util.isString(message.language)) - return "language: string expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) - return "categories: array expected"; - for (var i = 0; i < message.categories.length; ++i) { - var error = $root.google.cloud.language.v1.ClassificationCategory.verify(message.categories[i]); - if (error) - return "categories." + error; + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + switch (message.encodingType) { + default: + return "encodingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } return null; }; /** - * Creates an AnnotateTextResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotateTextRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse + * @returns {google.cloud.language.v1.AnnotateTextRequest} AnnotateTextRequest */ - AnnotateTextResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1.AnnotateTextResponse) + AnnotateTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnnotateTextRequest) return object; - var message = new $root.google.cloud.language.v1.AnnotateTextResponse(); - if (object.sentences) { - if (!Array.isArray(object.sentences)) - throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.sentences: array expected"); - message.sentences = []; - for (var i = 0; i < object.sentences.length; ++i) { - if (typeof object.sentences[i] !== "object") - throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.sentences: object expected"); - message.sentences[i] = $root.google.cloud.language.v1.Sentence.fromObject(object.sentences[i]); - } - } - if (object.tokens) { - if (!Array.isArray(object.tokens)) - throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.tokens: array expected"); - message.tokens = []; - for (var i = 0; i < object.tokens.length; ++i) { - if (typeof object.tokens[i] !== "object") - throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.tokens: object expected"); - message.tokens[i] = $root.google.cloud.language.v1.Token.fromObject(object.tokens[i]); - } - } - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.entities: object expected"); - message.entities[i] = $root.google.cloud.language.v1.Entity.fromObject(object.entities[i]); - } + var message = new $root.google.cloud.language.v1.AnnotateTextRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextRequest.document: object expected"); + message.document = $root.google.cloud.language.v1.Document.fromObject(object.document); } - if (object.documentSentiment != null) { - if (typeof object.documentSentiment !== "object") - throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.documentSentiment: object expected"); - message.documentSentiment = $root.google.cloud.language.v1.Sentiment.fromObject(object.documentSentiment); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextRequest.features: object expected"); + message.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.fromObject(object.features); } - if (object.language != null) - message.language = String(object.language); - if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.categories: array expected"); - message.categories = []; - for (var i = 0; i < object.categories.length; ++i) { - if (typeof object.categories[i] !== "object") - throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.categories: object expected"); - message.categories[i] = $root.google.cloud.language.v1.ClassificationCategory.fromObject(object.categories[i]); - } + switch (object.encodingType) { + case "NONE": + case 0: + message.encodingType = 0; + break; + case "UTF8": + case 1: + message.encodingType = 1; + break; + case "UTF16": + case 2: + message.encodingType = 2; + break; + case "UTF32": + case 3: + message.encodingType = 3; + break; } return message; }; /** - * Creates a plain object from an AnnotateTextResponse message. Also converts values to other types if specified. + * Creates a plain object from an AnnotateTextRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @static - * @param {google.cloud.language.v1.AnnotateTextResponse} message AnnotateTextResponse + * @param {google.cloud.language.v1.AnnotateTextRequest} message AnnotateTextRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotateTextResponse.toObject = function toObject(message, options) { + AnnotateTextRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sentences = []; - object.tokens = []; - object.entities = []; - object.categories = []; - } if (options.defaults) { - object.documentSentiment = null; - object.language = ""; - } - if (message.sentences && message.sentences.length) { - object.sentences = []; - for (var j = 0; j < message.sentences.length; ++j) - object.sentences[j] = $root.google.cloud.language.v1.Sentence.toObject(message.sentences[j], options); - } - if (message.tokens && message.tokens.length) { - object.tokens = []; - for (var j = 0; j < message.tokens.length; ++j) - object.tokens[j] = $root.google.cloud.language.v1.Token.toObject(message.tokens[j], options); - } - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.language.v1.Entity.toObject(message.entities[j], options); - } - if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) - object.documentSentiment = $root.google.cloud.language.v1.Sentiment.toObject(message.documentSentiment, options); - if (message.language != null && message.hasOwnProperty("language")) - object.language = message.language; - if (message.categories && message.categories.length) { - object.categories = []; - for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = $root.google.cloud.language.v1.ClassificationCategory.toObject(message.categories[j], options); + object.document = null; + object.features = null; + object.encodingType = options.enums === String ? "NONE" : 0; } + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.language.v1.Document.toObject(message.document, options); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.cloud.language.v1.AnnotateTextRequest.Features.toObject(message.features, options); + if (message.encodingType != null && message.hasOwnProperty("encodingType")) + object.encodingType = options.enums === String ? $root.google.cloud.language.v1.EncodingType[message.encodingType] : message.encodingType; return object; }; /** - * Converts this AnnotateTextResponse to JSON. + * Converts this AnnotateTextRequest to JSON. * @function toJSON - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @instance * @returns {Object.} JSON object */ - AnnotateTextResponse.prototype.toJSON = function toJSON() { + AnnotateTextRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnnotateTextResponse + * Gets the default type url for AnnotateTextRequest * @function getTypeUrl - * @memberof google.cloud.language.v1.AnnotateTextResponse + * @memberof google.cloud.language.v1.AnnotateTextRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnnotateTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnnotateTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1.AnnotateTextResponse"; + return typeUrlPrefix + "/google.cloud.language.v1.AnnotateTextRequest"; }; - return AnnotateTextResponse; - })(); + AnnotateTextRequest.Features = (function() { - return v1; - })(); + /** + * Properties of a Features. + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @interface IFeatures + * @property {boolean|null} [extractSyntax] Features extractSyntax + * @property {boolean|null} [extractEntities] Features extractEntities + * @property {boolean|null} [extractDocumentSentiment] Features extractDocumentSentiment + * @property {boolean|null} [extractEntitySentiment] Features extractEntitySentiment + * @property {boolean|null} [classifyText] Features classifyText + * @property {google.cloud.language.v1.IClassificationModelOptions|null} [classificationModelOptions] Features classificationModelOptions + */ - language.v1beta2 = (function() { + /** + * Constructs a new Features. + * @memberof google.cloud.language.v1.AnnotateTextRequest + * @classdesc Represents a Features. + * @implements IFeatures + * @constructor + * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures=} [properties] Properties to set + */ + function Features(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Namespace v1beta2. - * @memberof google.cloud.language - * @namespace - */ - var v1beta2 = {}; - - v1beta2.LanguageService = (function() { + /** + * Features extractSyntax. + * @member {boolean} extractSyntax + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractSyntax = false; - /** - * Constructs a new LanguageService service. - * @memberof google.cloud.language.v1beta2 - * @classdesc Represents a LanguageService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function LanguageService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * Features extractEntities. + * @member {boolean} extractEntities + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractEntities = false; - (LanguageService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LanguageService; + /** + * Features extractDocumentSentiment. + * @member {boolean} extractDocumentSentiment + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractDocumentSentiment = false; - /** - * Creates new LanguageService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.language.v1beta2.LanguageService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {LanguageService} RPC service. Useful where requests and/or responses are streamed. - */ - LanguageService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Features extractEntitySentiment. + * @member {boolean} extractEntitySentiment + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.extractEntitySentiment = false; - /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeSentiment}. - * @memberof google.cloud.language.v1beta2.LanguageService - * @typedef AnalyzeSentimentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.language.v1beta2.AnalyzeSentimentResponse} [response] AnalyzeSentimentResponse - */ + /** + * Features classifyText. + * @member {boolean} classifyText + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.classifyText = false; - /** - * Calls AnalyzeSentiment. - * @function analyzeSentiment - * @memberof google.cloud.language.v1beta2.LanguageService - * @instance - * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest} request AnalyzeSentimentRequest message or plain object - * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeSentimentCallback} callback Node-style callback called with the error, if any, and AnalyzeSentimentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LanguageService.prototype.analyzeSentiment = function analyzeSentiment(request, callback) { - return this.rpcCall(analyzeSentiment, $root.google.cloud.language.v1beta2.AnalyzeSentimentRequest, $root.google.cloud.language.v1beta2.AnalyzeSentimentResponse, request, callback); - }, "name", { value: "AnalyzeSentiment" }); + /** + * Features classificationModelOptions. + * @member {google.cloud.language.v1.IClassificationModelOptions|null|undefined} classificationModelOptions + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.classificationModelOptions = null; - /** - * Calls AnalyzeSentiment. - * @function analyzeSentiment - * @memberof google.cloud.language.v1beta2.LanguageService - * @instance - * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest} request AnalyzeSentimentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new Features instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features instance + */ + Features.create = function create(properties) { + return new Features(properties); + }; - /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeEntities}. - * @memberof google.cloud.language.v1beta2.LanguageService - * @typedef AnalyzeEntitiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.language.v1beta2.AnalyzeEntitiesResponse} [response] AnalyzeEntitiesResponse - */ + /** + * Encodes the specified Features message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.Features.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures} message Features message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Features.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.extractSyntax != null && Object.hasOwnProperty.call(message, "extractSyntax")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.extractSyntax); + if (message.extractEntities != null && Object.hasOwnProperty.call(message, "extractEntities")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.extractEntities); + if (message.extractDocumentSentiment != null && Object.hasOwnProperty.call(message, "extractDocumentSentiment")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.extractDocumentSentiment); + if (message.extractEntitySentiment != null && Object.hasOwnProperty.call(message, "extractEntitySentiment")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.extractEntitySentiment); + if (message.classifyText != null && Object.hasOwnProperty.call(message, "classifyText")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.classifyText); + if (message.classificationModelOptions != null && Object.hasOwnProperty.call(message, "classificationModelOptions")) + $root.google.cloud.language.v1.ClassificationModelOptions.encode(message.classificationModelOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; - /** - * Calls AnalyzeEntities. - * @function analyzeEntities - * @memberof google.cloud.language.v1beta2.LanguageService - * @instance - * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest} request AnalyzeEntitiesRequest message or plain object - * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeEntitiesCallback} callback Node-style callback called with the error, if any, and AnalyzeEntitiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LanguageService.prototype.analyzeEntities = function analyzeEntities(request, callback) { - return this.rpcCall(analyzeEntities, $root.google.cloud.language.v1beta2.AnalyzeEntitiesRequest, $root.google.cloud.language.v1beta2.AnalyzeEntitiesResponse, request, callback); - }, "name", { value: "AnalyzeEntities" }); + /** + * Encodes the specified Features message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextRequest.Features.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1.AnnotateTextRequest.IFeatures} message Features message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Features.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls AnalyzeEntities. - * @function analyzeEntities - * @memberof google.cloud.language.v1beta2.LanguageService - * @instance - * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest} request AnalyzeEntitiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a Features message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Features.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnnotateTextRequest.Features(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.extractSyntax = reader.bool(); + break; + } + case 2: { + message.extractEntities = reader.bool(); + break; + } + case 3: { + message.extractDocumentSentiment = reader.bool(); + break; + } + case 4: { + message.extractEntitySentiment = reader.bool(); + break; + } + case 6: { + message.classifyText = reader.bool(); + break; + } + case 10: { + message.classificationModelOptions = $root.google.cloud.language.v1.ClassificationModelOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeEntitySentiment}. - * @memberof google.cloud.language.v1beta2.LanguageService - * @typedef AnalyzeEntitySentimentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse} [response] AnalyzeEntitySentimentResponse - */ + /** + * Decodes a Features message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Features.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls AnalyzeEntitySentiment. - * @function analyzeEntitySentiment - * @memberof google.cloud.language.v1beta2.LanguageService - * @instance - * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest} request AnalyzeEntitySentimentRequest message or plain object - * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentimentCallback} callback Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LanguageService.prototype.analyzeEntitySentiment = function analyzeEntitySentiment(request, callback) { - return this.rpcCall(analyzeEntitySentiment, $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest, $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse, request, callback); - }, "name", { value: "AnalyzeEntitySentiment" }); + /** + * Verifies a Features message. + * @function verify + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Features.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + if (typeof message.extractSyntax !== "boolean") + return "extractSyntax: boolean expected"; + if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + if (typeof message.extractEntities !== "boolean") + return "extractEntities: boolean expected"; + if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + if (typeof message.extractDocumentSentiment !== "boolean") + return "extractDocumentSentiment: boolean expected"; + if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + if (typeof message.extractEntitySentiment !== "boolean") + return "extractEntitySentiment: boolean expected"; + if (message.classifyText != null && message.hasOwnProperty("classifyText")) + if (typeof message.classifyText !== "boolean") + return "classifyText: boolean expected"; + if (message.classificationModelOptions != null && message.hasOwnProperty("classificationModelOptions")) { + var error = $root.google.cloud.language.v1.ClassificationModelOptions.verify(message.classificationModelOptions); + if (error) + return "classificationModelOptions." + error; + } + return null; + }; + + /** + * Creates a Features message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1.AnnotateTextRequest.Features} Features + */ + Features.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnnotateTextRequest.Features) + return object; + var message = new $root.google.cloud.language.v1.AnnotateTextRequest.Features(); + if (object.extractSyntax != null) + message.extractSyntax = Boolean(object.extractSyntax); + if (object.extractEntities != null) + message.extractEntities = Boolean(object.extractEntities); + if (object.extractDocumentSentiment != null) + message.extractDocumentSentiment = Boolean(object.extractDocumentSentiment); + if (object.extractEntitySentiment != null) + message.extractEntitySentiment = Boolean(object.extractEntitySentiment); + if (object.classifyText != null) + message.classifyText = Boolean(object.classifyText); + if (object.classificationModelOptions != null) { + if (typeof object.classificationModelOptions !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextRequest.Features.classificationModelOptions: object expected"); + message.classificationModelOptions = $root.google.cloud.language.v1.ClassificationModelOptions.fromObject(object.classificationModelOptions); + } + return message; + }; + + /** + * Creates a plain object from a Features message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {google.cloud.language.v1.AnnotateTextRequest.Features} message Features + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Features.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.extractSyntax = false; + object.extractEntities = false; + object.extractDocumentSentiment = false; + object.extractEntitySentiment = false; + object.classifyText = false; + object.classificationModelOptions = null; + } + if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) + object.extractSyntax = message.extractSyntax; + if (message.extractEntities != null && message.hasOwnProperty("extractEntities")) + object.extractEntities = message.extractEntities; + if (message.extractDocumentSentiment != null && message.hasOwnProperty("extractDocumentSentiment")) + object.extractDocumentSentiment = message.extractDocumentSentiment; + if (message.extractEntitySentiment != null && message.hasOwnProperty("extractEntitySentiment")) + object.extractEntitySentiment = message.extractEntitySentiment; + if (message.classifyText != null && message.hasOwnProperty("classifyText")) + object.classifyText = message.classifyText; + if (message.classificationModelOptions != null && message.hasOwnProperty("classificationModelOptions")) + object.classificationModelOptions = $root.google.cloud.language.v1.ClassificationModelOptions.toObject(message.classificationModelOptions, options); + return object; + }; + + /** + * Converts this Features to JSON. + * @function toJSON + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @instance + * @returns {Object.} JSON object + */ + Features.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Features + * @function getTypeUrl + * @memberof google.cloud.language.v1.AnnotateTextRequest.Features + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Features.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1.AnnotateTextRequest.Features"; + }; + + return Features; + })(); + + return AnnotateTextRequest; + })(); + + v1.AnnotateTextResponse = (function() { /** - * Calls AnalyzeEntitySentiment. - * @function analyzeEntitySentiment - * @memberof google.cloud.language.v1beta2.LanguageService - * @instance - * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest} request AnalyzeEntitySentimentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of an AnnotateTextResponse. + * @memberof google.cloud.language.v1 + * @interface IAnnotateTextResponse + * @property {Array.|null} [sentences] AnnotateTextResponse sentences + * @property {Array.|null} [tokens] AnnotateTextResponse tokens + * @property {Array.|null} [entities] AnnotateTextResponse entities + * @property {google.cloud.language.v1.ISentiment|null} [documentSentiment] AnnotateTextResponse documentSentiment + * @property {string|null} [language] AnnotateTextResponse language + * @property {Array.|null} [categories] AnnotateTextResponse categories */ /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeSyntax}. - * @memberof google.cloud.language.v1beta2.LanguageService - * @typedef AnalyzeSyntaxCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.language.v1beta2.AnalyzeSyntaxResponse} [response] AnalyzeSyntaxResponse + * Constructs a new AnnotateTextResponse. + * @memberof google.cloud.language.v1 + * @classdesc Represents an AnnotateTextResponse. + * @implements IAnnotateTextResponse + * @constructor + * @param {google.cloud.language.v1.IAnnotateTextResponse=} [properties] Properties to set */ + function AnnotateTextResponse(properties) { + this.sentences = []; + this.tokens = []; + this.entities = []; + this.categories = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls AnalyzeSyntax. - * @function analyzeSyntax - * @memberof google.cloud.language.v1beta2.LanguageService + * AnnotateTextResponse sentences. + * @member {Array.} sentences + * @memberof google.cloud.language.v1.AnnotateTextResponse * @instance - * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest} request AnalyzeSyntaxRequest message or plain object - * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeSyntaxCallback} callback Node-style callback called with the error, if any, and AnalyzeSyntaxResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(LanguageService.prototype.analyzeSyntax = function analyzeSyntax(request, callback) { - return this.rpcCall(analyzeSyntax, $root.google.cloud.language.v1beta2.AnalyzeSyntaxRequest, $root.google.cloud.language.v1beta2.AnalyzeSyntaxResponse, request, callback); - }, "name", { value: "AnalyzeSyntax" }); + AnnotateTextResponse.prototype.sentences = $util.emptyArray; /** - * Calls AnalyzeSyntax. - * @function analyzeSyntax - * @memberof google.cloud.language.v1beta2.LanguageService + * AnnotateTextResponse tokens. + * @member {Array.} tokens + * @memberof google.cloud.language.v1.AnnotateTextResponse * @instance - * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest} request AnalyzeSyntaxRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AnnotateTextResponse.prototype.tokens = $util.emptyArray; /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|classifyText}. - * @memberof google.cloud.language.v1beta2.LanguageService - * @typedef ClassifyTextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.language.v1beta2.ClassifyTextResponse} [response] ClassifyTextResponse + * AnnotateTextResponse entities. + * @member {Array.} entities + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @instance */ + AnnotateTextResponse.prototype.entities = $util.emptyArray; /** - * Calls ClassifyText. - * @function classifyText - * @memberof google.cloud.language.v1beta2.LanguageService + * AnnotateTextResponse documentSentiment. + * @member {google.cloud.language.v1.ISentiment|null|undefined} documentSentiment + * @memberof google.cloud.language.v1.AnnotateTextResponse * @instance - * @param {google.cloud.language.v1beta2.IClassifyTextRequest} request ClassifyTextRequest message or plain object - * @param {google.cloud.language.v1beta2.LanguageService.ClassifyTextCallback} callback Node-style callback called with the error, if any, and ClassifyTextResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(LanguageService.prototype.classifyText = function classifyText(request, callback) { - return this.rpcCall(classifyText, $root.google.cloud.language.v1beta2.ClassifyTextRequest, $root.google.cloud.language.v1beta2.ClassifyTextResponse, request, callback); - }, "name", { value: "ClassifyText" }); + AnnotateTextResponse.prototype.documentSentiment = null; /** - * Calls ClassifyText. - * @function classifyText - * @memberof google.cloud.language.v1beta2.LanguageService + * AnnotateTextResponse language. + * @member {string} language + * @memberof google.cloud.language.v1.AnnotateTextResponse * @instance - * @param {google.cloud.language.v1beta2.IClassifyTextRequest} request ClassifyTextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AnnotateTextResponse.prototype.language = ""; /** - * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|annotateText}. - * @memberof google.cloud.language.v1beta2.LanguageService - * @typedef AnnotateTextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.language.v1beta2.AnnotateTextResponse} [response] AnnotateTextResponse + * AnnotateTextResponse categories. + * @member {Array.} categories + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @instance */ + AnnotateTextResponse.prototype.categories = $util.emptyArray; /** - * Calls AnnotateText. - * @function annotateText - * @memberof google.cloud.language.v1beta2.LanguageService - * @instance - * @param {google.cloud.language.v1beta2.IAnnotateTextRequest} request AnnotateTextRequest message or plain object - * @param {google.cloud.language.v1beta2.LanguageService.AnnotateTextCallback} callback Node-style callback called with the error, if any, and AnnotateTextResponse - * @returns {undefined} - * @variation 1 + * Creates a new AnnotateTextResponse instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1.AnnotateTextResponse + * @static + * @param {google.cloud.language.v1.IAnnotateTextResponse=} [properties] Properties to set + * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse instance */ - Object.defineProperty(LanguageService.prototype.annotateText = function annotateText(request, callback) { - return this.rpcCall(annotateText, $root.google.cloud.language.v1beta2.AnnotateTextRequest, $root.google.cloud.language.v1beta2.AnnotateTextResponse, request, callback); - }, "name", { value: "AnnotateText" }); + AnnotateTextResponse.create = function create(properties) { + return new AnnotateTextResponse(properties); + }; /** - * Calls AnnotateText. - * @function annotateText - * @memberof google.cloud.language.v1beta2.LanguageService - * @instance - * @param {google.cloud.language.v1beta2.IAnnotateTextRequest} request AnnotateTextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return LanguageService; - })(); - - v1beta2.Document = (function() { - - /** - * Properties of a Document. - * @memberof google.cloud.language.v1beta2 - * @interface IDocument - * @property {google.cloud.language.v1beta2.Document.Type|null} [type] Document type - * @property {string|null} [content] Document content - * @property {string|null} [gcsContentUri] Document gcsContentUri - * @property {string|null} [language] Document language - */ - - /** - * Constructs a new Document. - * @memberof google.cloud.language.v1beta2 - * @classdesc Represents a Document. - * @implements IDocument - * @constructor - * @param {google.cloud.language.v1beta2.IDocument=} [properties] Properties to set - */ - function Document(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Document type. - * @member {google.cloud.language.v1beta2.Document.Type} type - * @memberof google.cloud.language.v1beta2.Document - * @instance - */ - Document.prototype.type = 0; - - /** - * Document content. - * @member {string|null|undefined} content - * @memberof google.cloud.language.v1beta2.Document - * @instance - */ - Document.prototype.content = null; - - /** - * Document gcsContentUri. - * @member {string|null|undefined} gcsContentUri - * @memberof google.cloud.language.v1beta2.Document - * @instance - */ - Document.prototype.gcsContentUri = null; - - /** - * Document language. - * @member {string} language - * @memberof google.cloud.language.v1beta2.Document - * @instance - */ - Document.prototype.language = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Document source. - * @member {"content"|"gcsContentUri"|undefined} source - * @memberof google.cloud.language.v1beta2.Document - * @instance - */ - Object.defineProperty(Document.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["content", "gcsContentUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Document instance using the specified properties. - * @function create - * @memberof google.cloud.language.v1beta2.Document - * @static - * @param {google.cloud.language.v1beta2.IDocument=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.Document} Document instance - */ - Document.create = function create(properties) { - return new Document(properties); - }; - - /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.language.v1beta2.Document.verify|verify} messages. + * Encodes the specified AnnotateTextResponse message. Does not implicitly {@link google.cloud.language.v1.AnnotateTextResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1beta2.Document + * @memberof google.cloud.language.v1.AnnotateTextResponse * @static - * @param {google.cloud.language.v1beta2.IDocument} message Document message or plain object to encode + * @param {google.cloud.language.v1.IAnnotateTextResponse} message AnnotateTextResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encode = function encode(message, writer) { + AnnotateTextResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); - if (message.gcsContentUri != null && Object.hasOwnProperty.call(message, "gcsContentUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsContentUri); + if (message.sentences != null && message.sentences.length) + for (var i = 0; i < message.sentences.length; ++i) + $root.google.cloud.language.v1.Sentence.encode(message.sentences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokens != null && message.tokens.length) + for (var i = 0; i < message.tokens.length; ++i) + $root.google.cloud.language.v1.Token.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.language.v1.Entity.encode(message.entities[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentSentiment != null && Object.hasOwnProperty.call(message, "documentSentiment")) + $root.google.cloud.language.v1.Sentiment.encode(message.documentSentiment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.language != null && Object.hasOwnProperty.call(message, "language")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.language); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.language); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.cloud.language.v1.ClassificationCategory.encode(message.categories[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Document.verify|verify} messages. + * Encodes the specified AnnotateTextResponse message, length delimited. Does not implicitly {@link google.cloud.language.v1.AnnotateTextResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.Document + * @memberof google.cloud.language.v1.AnnotateTextResponse * @static - * @param {google.cloud.language.v1beta2.IDocument} message Document message or plain object to encode + * @param {google.cloud.language.v1.IAnnotateTextResponse} message AnnotateTextResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encodeDelimited = function encodeDelimited(message, writer) { + AnnotateTextResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes an AnnotateTextResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1beta2.Document + * @memberof google.cloud.language.v1.AnnotateTextResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.Document} Document + * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decode = function decode(reader, length) { + AnnotateTextResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Document(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1.AnnotateTextResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + if (!(message.sentences && message.sentences.length)) + message.sentences = []; + message.sentences.push($root.google.cloud.language.v1.Sentence.decode(reader, reader.uint32())); break; } case 2: { - message.content = reader.string(); + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.google.cloud.language.v1.Token.decode(reader, reader.uint32())); break; } case 3: { - message.gcsContentUri = reader.string(); + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.language.v1.Entity.decode(reader, reader.uint32())); break; } case 4: { + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.decode(reader, reader.uint32()); + break; + } + case 5: { message.language = reader.string(); break; } + case 6: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.cloud.language.v1.ClassificationCategory.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8559,605 +8667,648 @@ }; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes an AnnotateTextResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.Document + * @memberof google.cloud.language.v1.AnnotateTextResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.Document} Document + * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decodeDelimited = function decodeDelimited(reader) { + AnnotateTextResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Document message. + * Verifies an AnnotateTextResponse message. * @function verify - * @memberof google.cloud.language.v1beta2.Document + * @memberof google.cloud.language.v1.AnnotateTextResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Document.verify = function verify(message) { + AnnotateTextResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.sentences != null && message.hasOwnProperty("sentences")) { + if (!Array.isArray(message.sentences)) + return "sentences: array expected"; + for (var i = 0; i < message.sentences.length; ++i) { + var error = $root.google.cloud.language.v1.Sentence.verify(message.sentences[i]); + if (error) + return "sentences." + error; } - if (message.content != null && message.hasOwnProperty("content")) { - properties.source = 1; - if (!$util.isString(message.content)) - return "content: string expected"; } - if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.gcsContentUri)) - return "gcsContentUri: string expected"; + if (message.tokens != null && message.hasOwnProperty("tokens")) { + if (!Array.isArray(message.tokens)) + return "tokens: array expected"; + for (var i = 0; i < message.tokens.length; ++i) { + var error = $root.google.cloud.language.v1.Token.verify(message.tokens[i]); + if (error) + return "tokens." + error; + } + } + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.language.v1.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) { + var error = $root.google.cloud.language.v1.Sentiment.verify(message.documentSentiment); + if (error) + return "documentSentiment." + error; } if (message.language != null && message.hasOwnProperty("language")) if (!$util.isString(message.language)) return "language: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.cloud.language.v1.ClassificationCategory.verify(message.categories[i]); + if (error) + return "categories." + error; + } + } return null; }; /** - * Creates a Document message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotateTextResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1beta2.Document + * @memberof google.cloud.language.v1.AnnotateTextResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.Document} Document + * @returns {google.cloud.language.v1.AnnotateTextResponse} AnnotateTextResponse */ - Document.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.Document) + AnnotateTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1.AnnotateTextResponse) return object; - var message = new $root.google.cloud.language.v1beta2.Document(); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "PLAIN_TEXT": - case 1: - message.type = 1; - break; - case "HTML": - case 2: - message.type = 2; - break; + var message = new $root.google.cloud.language.v1.AnnotateTextResponse(); + if (object.sentences) { + if (!Array.isArray(object.sentences)) + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.sentences: array expected"); + message.sentences = []; + for (var i = 0; i < object.sentences.length; ++i) { + if (typeof object.sentences[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.sentences: object expected"); + message.sentences[i] = $root.google.cloud.language.v1.Sentence.fromObject(object.sentences[i]); + } + } + if (object.tokens) { + if (!Array.isArray(object.tokens)) + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.tokens: array expected"); + message.tokens = []; + for (var i = 0; i < object.tokens.length; ++i) { + if (typeof object.tokens[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.tokens: object expected"); + message.tokens[i] = $root.google.cloud.language.v1.Token.fromObject(object.tokens[i]); + } + } + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.language.v1.Entity.fromObject(object.entities[i]); + } + } + if (object.documentSentiment != null) { + if (typeof object.documentSentiment !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.documentSentiment: object expected"); + message.documentSentiment = $root.google.cloud.language.v1.Sentiment.fromObject(object.documentSentiment); } - if (object.content != null) - message.content = String(object.content); - if (object.gcsContentUri != null) - message.gcsContentUri = String(object.gcsContentUri); if (object.language != null) message.language = String(object.language); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.cloud.language.v1.AnnotateTextResponse.categories: object expected"); + message.categories[i] = $root.google.cloud.language.v1.ClassificationCategory.fromObject(object.categories[i]); + } + } return message; }; /** - * Creates a plain object from a Document message. Also converts values to other types if specified. + * Creates a plain object from an AnnotateTextResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1beta2.Document + * @memberof google.cloud.language.v1.AnnotateTextResponse * @static - * @param {google.cloud.language.v1beta2.Document} message Document + * @param {google.cloud.language.v1.AnnotateTextResponse} message AnnotateTextResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Document.toObject = function toObject(message, options) { + AnnotateTextResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.sentences = []; + object.tokens = []; + object.entities = []; + object.categories = []; + } if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.documentSentiment = null; object.language = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.language.v1beta2.Document.Type[message.type] : message.type; - if (message.content != null && message.hasOwnProperty("content")) { - object.content = message.content; - if (options.oneofs) - object.source = "content"; + if (message.sentences && message.sentences.length) { + object.sentences = []; + for (var j = 0; j < message.sentences.length; ++j) + object.sentences[j] = $root.google.cloud.language.v1.Sentence.toObject(message.sentences[j], options); } - if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) { - object.gcsContentUri = message.gcsContentUri; - if (options.oneofs) - object.source = "gcsContentUri"; + if (message.tokens && message.tokens.length) { + object.tokens = []; + for (var j = 0; j < message.tokens.length; ++j) + object.tokens[j] = $root.google.cloud.language.v1.Token.toObject(message.tokens[j], options); } + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.language.v1.Entity.toObject(message.entities[j], options); + } + if (message.documentSentiment != null && message.hasOwnProperty("documentSentiment")) + object.documentSentiment = $root.google.cloud.language.v1.Sentiment.toObject(message.documentSentiment, options); if (message.language != null && message.hasOwnProperty("language")) object.language = message.language; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.cloud.language.v1.ClassificationCategory.toObject(message.categories[j], options); + } return object; }; /** - * Converts this Document to JSON. + * Converts this AnnotateTextResponse to JSON. * @function toJSON - * @memberof google.cloud.language.v1beta2.Document + * @memberof google.cloud.language.v1.AnnotateTextResponse * @instance * @returns {Object.} JSON object */ - Document.prototype.toJSON = function toJSON() { + AnnotateTextResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Document + * Gets the default type url for AnnotateTextResponse * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.Document + * @memberof google.cloud.language.v1.AnnotateTextResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnnotateTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1beta2.Document"; + return typeUrlPrefix + "/google.cloud.language.v1.AnnotateTextResponse"; }; - /** - * Type enum. - * @name google.cloud.language.v1beta2.Document.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} PLAIN_TEXT=1 PLAIN_TEXT value - * @property {number} HTML=2 HTML value - */ - Document.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PLAIN_TEXT"] = 1; - values[valuesById[2] = "HTML"] = 2; - return values; - })(); - - return Document; + return AnnotateTextResponse; })(); - v1beta2.Sentence = (function() { + return v1; + })(); - /** - * Properties of a Sentence. - * @memberof google.cloud.language.v1beta2 - * @interface ISentence - * @property {google.cloud.language.v1beta2.ITextSpan|null} [text] Sentence text - * @property {google.cloud.language.v1beta2.ISentiment|null} [sentiment] Sentence sentiment - */ + language.v1beta2 = (function() { + + /** + * Namespace v1beta2. + * @memberof google.cloud.language + * @namespace + */ + var v1beta2 = {}; + + v1beta2.LanguageService = (function() { /** - * Constructs a new Sentence. + * Constructs a new LanguageService service. * @memberof google.cloud.language.v1beta2 - * @classdesc Represents a Sentence. - * @implements ISentence + * @classdesc Represents a LanguageService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.language.v1beta2.ISentence=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function Sentence(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function LanguageService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * Sentence text. - * @member {google.cloud.language.v1beta2.ITextSpan|null|undefined} text - * @memberof google.cloud.language.v1beta2.Sentence - * @instance - */ - Sentence.prototype.text = null; - - /** - * Sentence sentiment. - * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} sentiment - * @memberof google.cloud.language.v1beta2.Sentence - * @instance - */ - Sentence.prototype.sentiment = null; + (LanguageService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LanguageService; /** - * Creates a new Sentence instance using the specified properties. + * Creates new LanguageService service using the specified rpc implementation. * @function create - * @memberof google.cloud.language.v1beta2.Sentence + * @memberof google.cloud.language.v1beta2.LanguageService * @static - * @param {google.cloud.language.v1beta2.ISentence=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.Sentence} Sentence instance + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LanguageService} RPC service. Useful where requests and/or responses are streamed. */ - Sentence.create = function create(properties) { - return new Sentence(properties); + LanguageService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified Sentence message. Does not implicitly {@link google.cloud.language.v1beta2.Sentence.verify|verify} messages. - * @function encode - * @memberof google.cloud.language.v1beta2.Sentence - * @static - * @param {google.cloud.language.v1beta2.ISentence} message Sentence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeSentiment}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnalyzeSentimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnalyzeSentimentResponse} [response] AnalyzeSentimentResponse */ - Sentence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) - $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified Sentence message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Sentence.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.Sentence - * @static - * @param {google.cloud.language.v1beta2.ISentence} message Sentence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls AnalyzeSentiment. + * @function analyzeSentiment + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest} request AnalyzeSentimentRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeSentimentCallback} callback Node-style callback called with the error, if any, and AnalyzeSentimentResponse + * @returns {undefined} + * @variation 1 */ - Sentence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(LanguageService.prototype.analyzeSentiment = function analyzeSentiment(request, callback) { + return this.rpcCall(analyzeSentiment, $root.google.cloud.language.v1beta2.AnalyzeSentimentRequest, $root.google.cloud.language.v1beta2.AnalyzeSentimentResponse, request, callback); + }, "name", { value: "AnalyzeSentiment" }); /** - * Decodes a Sentence message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.language.v1beta2.Sentence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.Sentence} Sentence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Sentence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Sentence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); - break; - } - case 2: { - message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Sentence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.Sentence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.Sentence} Sentence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls AnalyzeSentiment. + * @function analyzeSentiment + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeSentimentRequest} request AnalyzeSentimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Sentence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a Sentence message. - * @function verify - * @memberof google.cloud.language.v1beta2.Sentence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeEntities}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnalyzeEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnalyzeEntitiesResponse} [response] AnalyzeEntitiesResponse */ - Sentence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - var error = $root.google.cloud.language.v1beta2.TextSpan.verify(message.text); - if (error) - return "text." + error; - } - if (message.sentiment != null && message.hasOwnProperty("sentiment")) { - var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.sentiment); - if (error) - return "sentiment." + error; - } - return null; - }; /** - * Creates a Sentence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.language.v1beta2.Sentence - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.Sentence} Sentence + * Calls AnalyzeEntities. + * @function analyzeEntities + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest} request AnalyzeEntitiesRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeEntitiesCallback} callback Node-style callback called with the error, if any, and AnalyzeEntitiesResponse + * @returns {undefined} + * @variation 1 */ - Sentence.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.Sentence) - return object; - var message = new $root.google.cloud.language.v1beta2.Sentence(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.language.v1beta2.Sentence.text: object expected"); - message.text = $root.google.cloud.language.v1beta2.TextSpan.fromObject(object.text); - } - if (object.sentiment != null) { - if (typeof object.sentiment !== "object") - throw TypeError(".google.cloud.language.v1beta2.Sentence.sentiment: object expected"); - message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.sentiment); - } - return message; - }; + Object.defineProperty(LanguageService.prototype.analyzeEntities = function analyzeEntities(request, callback) { + return this.rpcCall(analyzeEntities, $root.google.cloud.language.v1beta2.AnalyzeEntitiesRequest, $root.google.cloud.language.v1beta2.AnalyzeEntitiesResponse, request, callback); + }, "name", { value: "AnalyzeEntities" }); /** - * Creates a plain object from a Sentence message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.language.v1beta2.Sentence - * @static - * @param {google.cloud.language.v1beta2.Sentence} message Sentence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls AnalyzeEntities. + * @function analyzeEntities + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeEntitiesRequest} request AnalyzeEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Sentence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = null; - object.sentiment = null; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = $root.google.cloud.language.v1beta2.TextSpan.toObject(message.text, options); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - object.sentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.sentiment, options); - return object; - }; /** - * Converts this Sentence to JSON. - * @function toJSON - * @memberof google.cloud.language.v1beta2.Sentence - * @instance - * @returns {Object.} JSON object + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeEntitySentiment}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnalyzeEntitySentimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse} [response] AnalyzeEntitySentimentResponse */ - Sentence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for Sentence - * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.Sentence - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls AnalyzeEntitySentiment. + * @function analyzeEntitySentiment + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest} request AnalyzeEntitySentimentRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentimentCallback} callback Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse + * @returns {undefined} + * @variation 1 */ - Sentence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.language.v1beta2.Sentence"; - }; - - return Sentence; - })(); - - v1beta2.Entity = (function() { + Object.defineProperty(LanguageService.prototype.analyzeEntitySentiment = function analyzeEntitySentiment(request, callback) { + return this.rpcCall(analyzeEntitySentiment, $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest, $root.google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse, request, callback); + }, "name", { value: "AnalyzeEntitySentiment" }); /** - * Properties of an Entity. - * @memberof google.cloud.language.v1beta2 - * @interface IEntity - * @property {string|null} [name] Entity name - * @property {google.cloud.language.v1beta2.Entity.Type|null} [type] Entity type - * @property {Object.|null} [metadata] Entity metadata - * @property {number|null} [salience] Entity salience - * @property {Array.|null} [mentions] Entity mentions - * @property {google.cloud.language.v1beta2.ISentiment|null} [sentiment] Entity sentiment + * Calls AnalyzeEntitySentiment. + * @function analyzeEntitySentiment + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest} request AnalyzeEntitySentimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new Entity. - * @memberof google.cloud.language.v1beta2 - * @classdesc Represents an Entity. - * @implements IEntity - * @constructor - * @param {google.cloud.language.v1beta2.IEntity=} [properties] Properties to set + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|analyzeSyntax}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnalyzeSyntaxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnalyzeSyntaxResponse} [response] AnalyzeSyntaxResponse */ - function Entity(properties) { - this.metadata = {}; - this.mentions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * Entity name. - * @member {string} name - * @memberof google.cloud.language.v1beta2.Entity + * Calls AnalyzeSyntax. + * @function analyzeSyntax + * @memberof google.cloud.language.v1beta2.LanguageService * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest} request AnalyzeSyntaxRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnalyzeSyntaxCallback} callback Node-style callback called with the error, if any, and AnalyzeSyntaxResponse + * @returns {undefined} + * @variation 1 */ - Entity.prototype.name = ""; + Object.defineProperty(LanguageService.prototype.analyzeSyntax = function analyzeSyntax(request, callback) { + return this.rpcCall(analyzeSyntax, $root.google.cloud.language.v1beta2.AnalyzeSyntaxRequest, $root.google.cloud.language.v1beta2.AnalyzeSyntaxResponse, request, callback); + }, "name", { value: "AnalyzeSyntax" }); /** - * Entity type. - * @member {google.cloud.language.v1beta2.Entity.Type} type - * @memberof google.cloud.language.v1beta2.Entity + * Calls AnalyzeSyntax. + * @function analyzeSyntax + * @memberof google.cloud.language.v1beta2.LanguageService * @instance + * @param {google.cloud.language.v1beta2.IAnalyzeSyntaxRequest} request AnalyzeSyntaxRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Entity.prototype.type = 0; /** - * Entity metadata. - * @member {Object.} metadata - * @memberof google.cloud.language.v1beta2.Entity - * @instance + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|classifyText}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef ClassifyTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.ClassifyTextResponse} [response] ClassifyTextResponse */ - Entity.prototype.metadata = $util.emptyObject; /** - * Entity salience. - * @member {number} salience - * @memberof google.cloud.language.v1beta2.Entity + * Calls ClassifyText. + * @function classifyText + * @memberof google.cloud.language.v1beta2.LanguageService * @instance + * @param {google.cloud.language.v1beta2.IClassifyTextRequest} request ClassifyTextRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.ClassifyTextCallback} callback Node-style callback called with the error, if any, and ClassifyTextResponse + * @returns {undefined} + * @variation 1 */ - Entity.prototype.salience = 0; + Object.defineProperty(LanguageService.prototype.classifyText = function classifyText(request, callback) { + return this.rpcCall(classifyText, $root.google.cloud.language.v1beta2.ClassifyTextRequest, $root.google.cloud.language.v1beta2.ClassifyTextResponse, request, callback); + }, "name", { value: "ClassifyText" }); /** - * Entity mentions. - * @member {Array.} mentions - * @memberof google.cloud.language.v1beta2.Entity + * Calls ClassifyText. + * @function classifyText + * @memberof google.cloud.language.v1beta2.LanguageService * @instance + * @param {google.cloud.language.v1beta2.IClassifyTextRequest} request ClassifyTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Entity.prototype.mentions = $util.emptyArray; /** - * Entity sentiment. - * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} sentiment - * @memberof google.cloud.language.v1beta2.Entity + * Callback as used by {@link google.cloud.language.v1beta2.LanguageService|annotateText}. + * @memberof google.cloud.language.v1beta2.LanguageService + * @typedef AnnotateTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.language.v1beta2.AnnotateTextResponse} [response] AnnotateTextResponse + */ + + /** + * Calls AnnotateText. + * @function annotateText + * @memberof google.cloud.language.v1beta2.LanguageService * @instance + * @param {google.cloud.language.v1beta2.IAnnotateTextRequest} request AnnotateTextRequest message or plain object + * @param {google.cloud.language.v1beta2.LanguageService.AnnotateTextCallback} callback Node-style callback called with the error, if any, and AnnotateTextResponse + * @returns {undefined} + * @variation 1 */ - Entity.prototype.sentiment = null; + Object.defineProperty(LanguageService.prototype.annotateText = function annotateText(request, callback) { + return this.rpcCall(annotateText, $root.google.cloud.language.v1beta2.AnnotateTextRequest, $root.google.cloud.language.v1beta2.AnnotateTextResponse, request, callback); + }, "name", { value: "AnnotateText" }); /** - * Creates a new Entity instance using the specified properties. + * Calls AnnotateText. + * @function annotateText + * @memberof google.cloud.language.v1beta2.LanguageService + * @instance + * @param {google.cloud.language.v1beta2.IAnnotateTextRequest} request AnnotateTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return LanguageService; + })(); + + v1beta2.Document = (function() { + + /** + * Properties of a Document. + * @memberof google.cloud.language.v1beta2 + * @interface IDocument + * @property {google.cloud.language.v1beta2.Document.Type|null} [type] Document type + * @property {string|null} [content] Document content + * @property {string|null} [gcsContentUri] Document gcsContentUri + * @property {string|null} [language] Document language + * @property {string|null} [referenceWebUri] Document referenceWebUri + * @property {google.cloud.language.v1beta2.Document.BoilerplateHandling|null} [boilerplateHandling] Document boilerplateHandling + */ + + /** + * Constructs a new Document. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a Document. + * @implements IDocument + * @constructor + * @param {google.cloud.language.v1beta2.IDocument=} [properties] Properties to set + */ + function Document(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Document type. + * @member {google.cloud.language.v1beta2.Document.Type} type + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.type = 0; + + /** + * Document content. + * @member {string|null|undefined} content + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.content = null; + + /** + * Document gcsContentUri. + * @member {string|null|undefined} gcsContentUri + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.gcsContentUri = null; + + /** + * Document language. + * @member {string} language + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.language = ""; + + /** + * Document referenceWebUri. + * @member {string} referenceWebUri + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.referenceWebUri = ""; + + /** + * Document boilerplateHandling. + * @member {google.cloud.language.v1beta2.Document.BoilerplateHandling} boilerplateHandling + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Document.prototype.boilerplateHandling = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Document source. + * @member {"content"|"gcsContentUri"|undefined} source + * @memberof google.cloud.language.v1beta2.Document + * @instance + */ + Object.defineProperty(Document.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["content", "gcsContentUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Document instance using the specified properties. * @function create - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @static - * @param {google.cloud.language.v1beta2.IEntity=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.Entity} Entity instance + * @param {google.cloud.language.v1beta2.IDocument=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Document} Document instance */ - Entity.create = function create(properties) { - return new Entity(properties); + Document.create = function create(properties) { + return new Document(properties); }; /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.language.v1beta2.Entity.verify|verify} messages. + * Encodes the specified Document message. Does not implicitly {@link google.cloud.language.v1beta2.Document.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @static - * @param {google.cloud.language.v1beta2.IEntity} message Entity message or plain object to encode + * @param {google.cloud.language.v1beta2.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entity.encode = function encode(message, writer) { + Document.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.salience != null && Object.hasOwnProperty.call(message, "salience")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.salience); - if (message.mentions != null && message.mentions.length) - for (var i = 0; i < message.mentions.length; ++i) - $root.google.cloud.language.v1beta2.EntityMention.encode(message.mentions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) - $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.gcsContentUri != null && Object.hasOwnProperty.call(message, "gcsContentUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsContentUri); + if (message.language != null && Object.hasOwnProperty.call(message, "language")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.language); + if (message.referenceWebUri != null && Object.hasOwnProperty.call(message, "referenceWebUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.referenceWebUri); + if (message.boilerplateHandling != null && Object.hasOwnProperty.call(message, "boilerplateHandling")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.boilerplateHandling); return writer; }; /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Entity.verify|verify} messages. + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Document.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @static - * @param {google.cloud.language.v1beta2.IEntity} message Entity message or plain object to encode + * @param {google.cloud.language.v1beta2.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entity.encodeDelimited = function encodeDelimited(message, writer) { + Document.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Entity message from the specified reader or buffer. + * Decodes a Document message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.Entity} Entity + * @returns {google.cloud.language.v1beta2.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entity.decode = function decode(reader, length) { + Document.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Entity(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Document(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.type = reader.int32(); break; } case 2: { - message.type = reader.int32(); + message.content = reader.string(); break; } case 3: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metadata[key] = value; + message.gcsContentUri = reader.string(); break; } case 4: { - message.salience = reader.float(); + message.language = reader.string(); break; } case 5: { - if (!(message.mentions && message.mentions.length)) - message.mentions = []; - message.mentions.push($root.google.cloud.language.v1beta2.EntityMention.decode(reader, reader.uint32())); + message.referenceWebUri = reader.string(); break; } case 6: { - message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + message.boilerplateHandling = reader.int32(); break; } default: @@ -9169,35 +9320,33 @@ }; /** - * Decodes an Entity message from the specified reader or buffer, length delimited. + * Decodes a Document message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.Entity} Entity + * @returns {google.cloud.language.v1beta2.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entity.decodeDelimited = function decodeDelimited(reader) { + Document.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Entity message. + * Verifies a Document message. * @function verify - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entity.verify = function verify(message) { + Document.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; if (message.type != null && message.hasOwnProperty("type")) switch (message.type) { default: @@ -9205,272 +9354,209 @@ case 0: case 1: case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 9: - case 10: - case 11: - case 12: - case 13: break; } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + if (message.content != null && message.hasOwnProperty("content")) { + properties.source = 1; + if (!$util.isString(message.content)) + return "content: string expected"; } - if (message.salience != null && message.hasOwnProperty("salience")) - if (typeof message.salience !== "number") - return "salience: number expected"; - if (message.mentions != null && message.hasOwnProperty("mentions")) { - if (!Array.isArray(message.mentions)) - return "mentions: array expected"; - for (var i = 0; i < message.mentions.length; ++i) { - var error = $root.google.cloud.language.v1beta2.EntityMention.verify(message.mentions[i]); - if (error) - return "mentions." + error; - } - } - if (message.sentiment != null && message.hasOwnProperty("sentiment")) { - var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.sentiment); - if (error) - return "sentiment." + error; + if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.gcsContentUri)) + return "gcsContentUri: string expected"; } + if (message.language != null && message.hasOwnProperty("language")) + if (!$util.isString(message.language)) + return "language: string expected"; + if (message.referenceWebUri != null && message.hasOwnProperty("referenceWebUri")) + if (!$util.isString(message.referenceWebUri)) + return "referenceWebUri: string expected"; + if (message.boilerplateHandling != null && message.hasOwnProperty("boilerplateHandling")) + switch (message.boilerplateHandling) { + default: + return "boilerplateHandling: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * Creates a Document message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.Entity} Entity + * @returns {google.cloud.language.v1beta2.Document} Document */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.Entity) + Document.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Document) return object; - var message = new $root.google.cloud.language.v1beta2.Entity(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.language.v1beta2.Document(); switch (object.type) { - case "UNKNOWN": + case "TYPE_UNSPECIFIED": case 0: message.type = 0; break; - case "PERSON": + case "PLAIN_TEXT": case 1: message.type = 1; break; - case "LOCATION": + case "HTML": case 2: message.type = 2; break; - case "ORGANIZATION": - case 3: - message.type = 3; - break; - case "EVENT": - case 4: - message.type = 4; - break; - case "WORK_OF_ART": - case 5: - message.type = 5; - break; - case "CONSUMER_GOOD": - case 6: - message.type = 6; - break; - case "OTHER": - case 7: - message.type = 7; - break; - case "PHONE_NUMBER": - case 9: - message.type = 9; - break; - case "ADDRESS": - case 10: - message.type = 10; - break; - case "DATE": - case 11: - message.type = 11; + } + if (object.content != null) + message.content = String(object.content); + if (object.gcsContentUri != null) + message.gcsContentUri = String(object.gcsContentUri); + if (object.language != null) + message.language = String(object.language); + if (object.referenceWebUri != null) + message.referenceWebUri = String(object.referenceWebUri); + switch (object.boilerplateHandling) { + case "BOILERPLATE_HANDLING_UNSPECIFIED": + case 0: + message.boilerplateHandling = 0; break; - case "NUMBER": - case 12: - message.type = 12; + case "SKIP_BOILERPLATE": + case 1: + message.boilerplateHandling = 1; break; - case "PRICE": - case 13: - message.type = 13; + case "KEEP_BOILERPLATE": + case 2: + message.boilerplateHandling = 2; break; } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.language.v1beta2.Entity.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - if (object.salience != null) - message.salience = Number(object.salience); - if (object.mentions) { - if (!Array.isArray(object.mentions)) - throw TypeError(".google.cloud.language.v1beta2.Entity.mentions: array expected"); - message.mentions = []; - for (var i = 0; i < object.mentions.length; ++i) { - if (typeof object.mentions[i] !== "object") - throw TypeError(".google.cloud.language.v1beta2.Entity.mentions: object expected"); - message.mentions[i] = $root.google.cloud.language.v1beta2.EntityMention.fromObject(object.mentions[i]); - } - } - if (object.sentiment != null) { - if (typeof object.sentiment !== "object") - throw TypeError(".google.cloud.language.v1beta2.Entity.sentiment: object expected"); - message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.sentiment); - } return message; }; /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. + * Creates a plain object from a Document message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @static - * @param {google.cloud.language.v1beta2.Entity} message Entity + * @param {google.cloud.language.v1beta2.Document} message Document * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entity.toObject = function toObject(message, options) { + Document.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.mentions = []; - if (options.objects || options.defaults) - object.metadata = {}; if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "UNKNOWN" : 0; - object.salience = 0; - object.sentiment = null; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.language = ""; + object.referenceWebUri = ""; + object.boilerplateHandling = options.enums === String ? "BOILERPLATE_HANDLING_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.language.v1beta2.Entity.Type[message.type] : message.type; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + object.type = options.enums === String ? $root.google.cloud.language.v1beta2.Document.Type[message.type] : message.type; + if (message.content != null && message.hasOwnProperty("content")) { + object.content = message.content; + if (options.oneofs) + object.source = "content"; } - if (message.salience != null && message.hasOwnProperty("salience")) - object.salience = options.json && !isFinite(message.salience) ? String(message.salience) : message.salience; - if (message.mentions && message.mentions.length) { - object.mentions = []; - for (var j = 0; j < message.mentions.length; ++j) - object.mentions[j] = $root.google.cloud.language.v1beta2.EntityMention.toObject(message.mentions[j], options); + if (message.gcsContentUri != null && message.hasOwnProperty("gcsContentUri")) { + object.gcsContentUri = message.gcsContentUri; + if (options.oneofs) + object.source = "gcsContentUri"; } - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - object.sentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.sentiment, options); + if (message.language != null && message.hasOwnProperty("language")) + object.language = message.language; + if (message.referenceWebUri != null && message.hasOwnProperty("referenceWebUri")) + object.referenceWebUri = message.referenceWebUri; + if (message.boilerplateHandling != null && message.hasOwnProperty("boilerplateHandling")) + object.boilerplateHandling = options.enums === String ? $root.google.cloud.language.v1beta2.Document.BoilerplateHandling[message.boilerplateHandling] : message.boilerplateHandling; return object; }; /** - * Converts this Entity to JSON. + * Converts this Document to JSON. * @function toJSON - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @instance * @returns {Object.} JSON object */ - Entity.prototype.toJSON = function toJSON() { + Document.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Entity + * Gets the default type url for Document * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.Entity + * @memberof google.cloud.language.v1beta2.Document * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1beta2.Entity"; + return typeUrlPrefix + "/google.cloud.language.v1beta2.Document"; }; /** * Type enum. - * @name google.cloud.language.v1beta2.Entity.Type + * @name google.cloud.language.v1beta2.Document.Type * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} PERSON=1 PERSON value - * @property {number} LOCATION=2 LOCATION value - * @property {number} ORGANIZATION=3 ORGANIZATION value - * @property {number} EVENT=4 EVENT value - * @property {number} WORK_OF_ART=5 WORK_OF_ART value - * @property {number} CONSUMER_GOOD=6 CONSUMER_GOOD value - * @property {number} OTHER=7 OTHER value - * @property {number} PHONE_NUMBER=9 PHONE_NUMBER value - * @property {number} ADDRESS=10 ADDRESS value - * @property {number} DATE=11 DATE value - * @property {number} NUMBER=12 NUMBER value - * @property {number} PRICE=13 PRICE value + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} PLAIN_TEXT=1 PLAIN_TEXT value + * @property {number} HTML=2 HTML value */ - Entity.Type = (function() { + Document.Type = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "PERSON"] = 1; - values[valuesById[2] = "LOCATION"] = 2; - values[valuesById[3] = "ORGANIZATION"] = 3; - values[valuesById[4] = "EVENT"] = 4; - values[valuesById[5] = "WORK_OF_ART"] = 5; - values[valuesById[6] = "CONSUMER_GOOD"] = 6; - values[valuesById[7] = "OTHER"] = 7; - values[valuesById[9] = "PHONE_NUMBER"] = 9; - values[valuesById[10] = "ADDRESS"] = 10; - values[valuesById[11] = "DATE"] = 11; - values[valuesById[12] = "NUMBER"] = 12; - values[valuesById[13] = "PRICE"] = 13; + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PLAIN_TEXT"] = 1; + values[valuesById[2] = "HTML"] = 2; return values; })(); - return Entity; + /** + * BoilerplateHandling enum. + * @name google.cloud.language.v1beta2.Document.BoilerplateHandling + * @enum {number} + * @property {number} BOILERPLATE_HANDLING_UNSPECIFIED=0 BOILERPLATE_HANDLING_UNSPECIFIED value + * @property {number} SKIP_BOILERPLATE=1 SKIP_BOILERPLATE value + * @property {number} KEEP_BOILERPLATE=2 KEEP_BOILERPLATE value + */ + Document.BoilerplateHandling = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BOILERPLATE_HANDLING_UNSPECIFIED"] = 0; + values[valuesById[1] = "SKIP_BOILERPLATE"] = 1; + values[valuesById[2] = "KEEP_BOILERPLATE"] = 2; + return values; + })(); + + return Document; })(); - v1beta2.Token = (function() { + v1beta2.Sentence = (function() { /** - * Properties of a Token. + * Properties of a Sentence. * @memberof google.cloud.language.v1beta2 - * @interface IToken - * @property {google.cloud.language.v1beta2.ITextSpan|null} [text] Token text - * @property {google.cloud.language.v1beta2.IPartOfSpeech|null} [partOfSpeech] Token partOfSpeech - * @property {google.cloud.language.v1beta2.IDependencyEdge|null} [dependencyEdge] Token dependencyEdge - * @property {string|null} [lemma] Token lemma + * @interface ISentence + * @property {google.cloud.language.v1beta2.ITextSpan|null} [text] Sentence text + * @property {google.cloud.language.v1beta2.ISentiment|null} [sentiment] Sentence sentiment */ /** - * Constructs a new Token. + * Constructs a new Sentence. * @memberof google.cloud.language.v1beta2 - * @classdesc Represents a Token. - * @implements IToken + * @classdesc Represents a Sentence. + * @implements ISentence * @constructor - * @param {google.cloud.language.v1beta2.IToken=} [properties] Properties to set + * @param {google.cloud.language.v1beta2.ISentence=} [properties] Properties to set */ - function Token(properties) { + function Sentence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9478,100 +9564,80 @@ } /** - * Token text. + * Sentence text. * @member {google.cloud.language.v1beta2.ITextSpan|null|undefined} text - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @instance */ - Token.prototype.text = null; + Sentence.prototype.text = null; /** - * Token partOfSpeech. - * @member {google.cloud.language.v1beta2.IPartOfSpeech|null|undefined} partOfSpeech - * @memberof google.cloud.language.v1beta2.Token - * @instance - */ - Token.prototype.partOfSpeech = null; - - /** - * Token dependencyEdge. - * @member {google.cloud.language.v1beta2.IDependencyEdge|null|undefined} dependencyEdge - * @memberof google.cloud.language.v1beta2.Token - * @instance - */ - Token.prototype.dependencyEdge = null; - - /** - * Token lemma. - * @member {string} lemma - * @memberof google.cloud.language.v1beta2.Token + * Sentence sentiment. + * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} sentiment + * @memberof google.cloud.language.v1beta2.Sentence * @instance */ - Token.prototype.lemma = ""; + Sentence.prototype.sentiment = null; /** - * Creates a new Token instance using the specified properties. + * Creates a new Sentence instance using the specified properties. * @function create - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @static - * @param {google.cloud.language.v1beta2.IToken=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.Token} Token instance + * @param {google.cloud.language.v1beta2.ISentence=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Sentence} Sentence instance */ - Token.create = function create(properties) { - return new Token(properties); + Sentence.create = function create(properties) { + return new Sentence(properties); }; /** - * Encodes the specified Token message. Does not implicitly {@link google.cloud.language.v1beta2.Token.verify|verify} messages. + * Encodes the specified Sentence message. Does not implicitly {@link google.cloud.language.v1beta2.Sentence.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @static - * @param {google.cloud.language.v1beta2.IToken} message Token message or plain object to encode + * @param {google.cloud.language.v1beta2.ISentence} message Sentence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Token.encode = function encode(message, writer) { + Sentence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.text != null && Object.hasOwnProperty.call(message, "text")) $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.partOfSpeech != null && Object.hasOwnProperty.call(message, "partOfSpeech")) - $root.google.cloud.language.v1beta2.PartOfSpeech.encode(message.partOfSpeech, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dependencyEdge != null && Object.hasOwnProperty.call(message, "dependencyEdge")) - $root.google.cloud.language.v1beta2.DependencyEdge.encode(message.dependencyEdge, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.lemma != null && Object.hasOwnProperty.call(message, "lemma")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.lemma); + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) + $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Token message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Token.verify|verify} messages. + * Encodes the specified Sentence message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Sentence.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @static - * @param {google.cloud.language.v1beta2.IToken} message Token message or plain object to encode + * @param {google.cloud.language.v1beta2.ISentence} message Sentence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Token.encodeDelimited = function encodeDelimited(message, writer) { + Sentence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Token message from the specified reader or buffer. + * Decodes a Sentence message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.Token} Token + * @returns {google.cloud.language.v1beta2.Sentence} Sentence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Token.decode = function decode(reader, length) { + Sentence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Token(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Sentence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -9580,15 +9646,7 @@ break; } case 2: { - message.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.decode(reader, reader.uint32()); - break; - } - case 3: { - message.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.decode(reader, reader.uint32()); - break; - } - case 4: { - message.lemma = reader.string(); + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); break; } default: @@ -9600,30 +9658,30 @@ }; /** - * Decodes a Token message from the specified reader or buffer, length delimited. + * Decodes a Sentence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.Token} Token + * @returns {google.cloud.language.v1beta2.Sentence} Sentence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Token.decodeDelimited = function decodeDelimited(reader) { + Sentence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Token message. + * Verifies a Sentence message. * @function verify - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Token.verify = function verify(message) { + Sentence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.text != null && message.hasOwnProperty("text")) { @@ -9631,111 +9689,90 @@ if (error) return "text." + error; } - if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) { - var error = $root.google.cloud.language.v1beta2.PartOfSpeech.verify(message.partOfSpeech); - if (error) - return "partOfSpeech." + error; - } - if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) { - var error = $root.google.cloud.language.v1beta2.DependencyEdge.verify(message.dependencyEdge); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.sentiment); if (error) - return "dependencyEdge." + error; + return "sentiment." + error; } - if (message.lemma != null && message.hasOwnProperty("lemma")) - if (!$util.isString(message.lemma)) - return "lemma: string expected"; return null; }; /** - * Creates a Token message from a plain object. Also converts values to their respective internal types. + * Creates a Sentence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.Token} Token + * @returns {google.cloud.language.v1beta2.Sentence} Sentence */ - Token.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.Token) + Sentence.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Sentence) return object; - var message = new $root.google.cloud.language.v1beta2.Token(); + var message = new $root.google.cloud.language.v1beta2.Sentence(); if (object.text != null) { if (typeof object.text !== "object") - throw TypeError(".google.cloud.language.v1beta2.Token.text: object expected"); + throw TypeError(".google.cloud.language.v1beta2.Sentence.text: object expected"); message.text = $root.google.cloud.language.v1beta2.TextSpan.fromObject(object.text); } - if (object.partOfSpeech != null) { - if (typeof object.partOfSpeech !== "object") - throw TypeError(".google.cloud.language.v1beta2.Token.partOfSpeech: object expected"); - message.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.fromObject(object.partOfSpeech); - } - if (object.dependencyEdge != null) { - if (typeof object.dependencyEdge !== "object") - throw TypeError(".google.cloud.language.v1beta2.Token.dependencyEdge: object expected"); - message.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.fromObject(object.dependencyEdge); + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.language.v1beta2.Sentence.sentiment: object expected"); + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.sentiment); } - if (object.lemma != null) - message.lemma = String(object.lemma); return message; }; /** - * Creates a plain object from a Token message. Also converts values to other types if specified. + * Creates a plain object from a Sentence message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @static - * @param {google.cloud.language.v1beta2.Token} message Token + * @param {google.cloud.language.v1beta2.Sentence} message Sentence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Token.toObject = function toObject(message, options) { + Sentence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.text = null; - object.partOfSpeech = null; - object.dependencyEdge = null; - object.lemma = ""; + object.sentiment = null; } if (message.text != null && message.hasOwnProperty("text")) object.text = $root.google.cloud.language.v1beta2.TextSpan.toObject(message.text, options); - if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) - object.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.toObject(message.partOfSpeech, options); - if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) - object.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.toObject(message.dependencyEdge, options); - if (message.lemma != null && message.hasOwnProperty("lemma")) - object.lemma = message.lemma; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.sentiment, options); return object; }; /** - * Converts this Token to JSON. + * Converts this Sentence to JSON. * @function toJSON - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @instance * @returns {Object.} JSON object */ - Token.prototype.toJSON = function toJSON() { + Sentence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Token + * Gets the default type url for Sentence * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.Token + * @memberof google.cloud.language.v1beta2.Sentence * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Token.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Sentence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1beta2.Token"; + return typeUrlPrefix + "/google.cloud.language.v1beta2.Sentence"; }; - return Token; + return Sentence; })(); /** @@ -9756,25 +9793,31 @@ return values; })(); - v1beta2.Sentiment = (function() { + v1beta2.Entity = (function() { /** - * Properties of a Sentiment. + * Properties of an Entity. * @memberof google.cloud.language.v1beta2 - * @interface ISentiment - * @property {number|null} [magnitude] Sentiment magnitude - * @property {number|null} [score] Sentiment score + * @interface IEntity + * @property {string|null} [name] Entity name + * @property {google.cloud.language.v1beta2.Entity.Type|null} [type] Entity type + * @property {Object.|null} [metadata] Entity metadata + * @property {number|null} [salience] Entity salience + * @property {Array.|null} [mentions] Entity mentions + * @property {google.cloud.language.v1beta2.ISentiment|null} [sentiment] Entity sentiment */ /** - * Constructs a new Sentiment. + * Constructs a new Entity. * @memberof google.cloud.language.v1beta2 - * @classdesc Represents a Sentiment. - * @implements ISentiment + * @classdesc Represents an Entity. + * @implements IEntity * @constructor - * @param {google.cloud.language.v1beta2.ISentiment=} [properties] Properties to set + * @param {google.cloud.language.v1beta2.IEntity=} [properties] Properties to set */ - function Sentiment(properties) { + function Entity(properties) { + this.metadata = {}; + this.mentions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9782,89 +9825,168 @@ } /** - * Sentiment magnitude. - * @member {number} magnitude - * @memberof google.cloud.language.v1beta2.Sentiment + * Entity name. + * @member {string} name + * @memberof google.cloud.language.v1beta2.Entity * @instance */ - Sentiment.prototype.magnitude = 0; + Entity.prototype.name = ""; /** - * Sentiment score. - * @member {number} score - * @memberof google.cloud.language.v1beta2.Sentiment + * Entity type. + * @member {google.cloud.language.v1beta2.Entity.Type} type + * @memberof google.cloud.language.v1beta2.Entity * @instance */ - Sentiment.prototype.score = 0; + Entity.prototype.type = 0; /** - * Creates a new Sentiment instance using the specified properties. - * @function create - * @memberof google.cloud.language.v1beta2.Sentiment - * @static - * @param {google.cloud.language.v1beta2.ISentiment=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment instance + * Entity metadata. + * @member {Object.} metadata + * @memberof google.cloud.language.v1beta2.Entity + * @instance */ - Sentiment.create = function create(properties) { - return new Sentiment(properties); - }; + Entity.prototype.metadata = $util.emptyObject; /** - * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.language.v1beta2.Sentiment.verify|verify} messages. - * @function encode - * @memberof google.cloud.language.v1beta2.Sentiment - * @static - * @param {google.cloud.language.v1beta2.ISentiment} message Sentiment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Entity salience. + * @member {number} salience + * @memberof google.cloud.language.v1beta2.Entity + * @instance */ - Sentiment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.magnitude); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.score); - return writer; - }; + Entity.prototype.salience = 0; /** - * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Sentiment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.Sentiment - * @static - * @param {google.cloud.language.v1beta2.ISentiment} message Sentiment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Sentiment.encodeDelimited = function encodeDelimited(message, writer) { + * Entity mentions. + * @member {Array.} mentions + * @memberof google.cloud.language.v1beta2.Entity + * @instance + */ + Entity.prototype.mentions = $util.emptyArray; + + /** + * Entity sentiment. + * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} sentiment + * @memberof google.cloud.language.v1beta2.Entity + * @instance + */ + Entity.prototype.sentiment = null; + + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {google.cloud.language.v1beta2.IEntity=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.language.v1beta2.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {google.cloud.language.v1beta2.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.salience != null && Object.hasOwnProperty.call(message, "salience")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.salience); + if (message.mentions != null && message.mentions.length) + for (var i = 0; i < message.mentions.length; ++i) + $root.google.cloud.language.v1beta2.EntityMention.encode(message.mentions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) + $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {google.cloud.language.v1beta2.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Sentiment message from the specified reader or buffer. + * Decodes an Entity message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1beta2.Sentiment + * @memberof google.cloud.language.v1beta2.Entity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment + * @returns {google.cloud.language.v1beta2.Entity} Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Sentiment.decode = function decode(reader, length) { + Entity.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Sentiment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Entity(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } case 2: { - message.magnitude = reader.float(); + message.type = reader.int32(); break; } case 3: { - message.score = reader.float(); + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; + break; + } + case 4: { + message.salience = reader.float(); + break; + } + case 5: { + if (!(message.mentions && message.mentions.length)) + message.mentions = []; + message.mentions.push($root.google.cloud.language.v1beta2.EntityMention.decode(reader, reader.uint32())); + break; + } + case 6: { + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); break; } default: @@ -9876,142 +9998,308 @@ }; /** - * Decodes a Sentiment message from the specified reader or buffer, length delimited. + * Decodes an Entity message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.Sentiment + * @memberof google.cloud.language.v1beta2.Entity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment + * @returns {google.cloud.language.v1beta2.Entity} Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Sentiment.decodeDelimited = function decodeDelimited(reader) { + Entity.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Sentiment message. + * Verifies an Entity message. * @function verify - * @memberof google.cloud.language.v1beta2.Sentiment + * @memberof google.cloud.language.v1beta2.Entity * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Sentiment.verify = function verify(message) { + Entity.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.magnitude != null && message.hasOwnProperty("magnitude")) - if (typeof message.magnitude !== "number") - return "magnitude: number expected"; - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.salience != null && message.hasOwnProperty("salience")) + if (typeof message.salience !== "number") + return "salience: number expected"; + if (message.mentions != null && message.hasOwnProperty("mentions")) { + if (!Array.isArray(message.mentions)) + return "mentions: array expected"; + for (var i = 0; i < message.mentions.length; ++i) { + var error = $root.google.cloud.language.v1beta2.EntityMention.verify(message.mentions[i]); + if (error) + return "mentions." + error; + } + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.sentiment); + if (error) + return "sentiment." + error; + } return null; }; /** - * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. + * Creates an Entity message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1beta2.Sentiment + * @memberof google.cloud.language.v1beta2.Entity * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment + * @returns {google.cloud.language.v1beta2.Entity} Entity */ - Sentiment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.Sentiment) + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Entity) return object; - var message = new $root.google.cloud.language.v1beta2.Sentiment(); - if (object.magnitude != null) - message.magnitude = Number(object.magnitude); - if (object.score != null) - message.score = Number(object.score); - return message; - }; - - /** - * Creates a plain object from a Sentiment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.language.v1beta2.Sentiment - * @static - * @param {google.cloud.language.v1beta2.Sentiment} message Sentiment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Sentiment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.magnitude = 0; - object.score = 0; - } - if (message.magnitude != null && message.hasOwnProperty("magnitude")) - object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - return object; - }; - - /** - * Converts this Sentiment to JSON. - * @function toJSON - * @memberof google.cloud.language.v1beta2.Sentiment - * @instance - * @returns {Object.} JSON object - */ - Sentiment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Sentiment - * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.Sentiment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Sentiment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.language.v1beta2.Sentiment"; - }; - - return Sentiment; - })(); - - v1beta2.PartOfSpeech = (function() { + var message = new $root.google.cloud.language.v1beta2.Entity(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "PERSON": + case 1: + message.type = 1; + break; + case "LOCATION": + case 2: + message.type = 2; + break; + case "ORGANIZATION": + case 3: + message.type = 3; + break; + case "EVENT": + case 4: + message.type = 4; + break; + case "WORK_OF_ART": + case 5: + message.type = 5; + break; + case "CONSUMER_GOOD": + case 6: + message.type = 6; + break; + case "OTHER": + case 7: + message.type = 7; + break; + case "PHONE_NUMBER": + case 9: + message.type = 9; + break; + case "ADDRESS": + case 10: + message.type = 10; + break; + case "DATE": + case 11: + message.type = 11; + break; + case "NUMBER": + case 12: + message.type = 12; + break; + case "PRICE": + case 13: + message.type = 13; + break; + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.language.v1beta2.Entity.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.salience != null) + message.salience = Number(object.salience); + if (object.mentions) { + if (!Array.isArray(object.mentions)) + throw TypeError(".google.cloud.language.v1beta2.Entity.mentions: array expected"); + message.mentions = []; + for (var i = 0; i < object.mentions.length; ++i) { + if (typeof object.mentions[i] !== "object") + throw TypeError(".google.cloud.language.v1beta2.Entity.mentions: object expected"); + message.mentions[i] = $root.google.cloud.language.v1beta2.EntityMention.fromObject(object.mentions[i]); + } + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.language.v1beta2.Entity.sentiment: object expected"); + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.sentiment); + } + return message; + }; /** - * Properties of a PartOfSpeech. + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {google.cloud.language.v1beta2.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mentions = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "UNKNOWN" : 0; + object.salience = 0; + object.sentiment = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.language.v1beta2.Entity.Type[message.type] : message.type; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.salience != null && message.hasOwnProperty("salience")) + object.salience = options.json && !isFinite(message.salience) ? String(message.salience) : message.salience; + if (message.mentions && message.mentions.length) { + object.mentions = []; + for (var j = 0; j < message.mentions.length; ++j) + object.mentions[j] = $root.google.cloud.language.v1beta2.EntityMention.toObject(message.mentions[j], options); + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entity + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.Entity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.Entity"; + }; + + /** + * Type enum. + * @name google.cloud.language.v1beta2.Entity.Type + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} PERSON=1 PERSON value + * @property {number} LOCATION=2 LOCATION value + * @property {number} ORGANIZATION=3 ORGANIZATION value + * @property {number} EVENT=4 EVENT value + * @property {number} WORK_OF_ART=5 WORK_OF_ART value + * @property {number} CONSUMER_GOOD=6 CONSUMER_GOOD value + * @property {number} OTHER=7 OTHER value + * @property {number} PHONE_NUMBER=9 PHONE_NUMBER value + * @property {number} ADDRESS=10 ADDRESS value + * @property {number} DATE=11 DATE value + * @property {number} NUMBER=12 NUMBER value + * @property {number} PRICE=13 PRICE value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "PERSON"] = 1; + values[valuesById[2] = "LOCATION"] = 2; + values[valuesById[3] = "ORGANIZATION"] = 3; + values[valuesById[4] = "EVENT"] = 4; + values[valuesById[5] = "WORK_OF_ART"] = 5; + values[valuesById[6] = "CONSUMER_GOOD"] = 6; + values[valuesById[7] = "OTHER"] = 7; + values[valuesById[9] = "PHONE_NUMBER"] = 9; + values[valuesById[10] = "ADDRESS"] = 10; + values[valuesById[11] = "DATE"] = 11; + values[valuesById[12] = "NUMBER"] = 12; + values[valuesById[13] = "PRICE"] = 13; + return values; + })(); + + return Entity; + })(); + + v1beta2.Token = (function() { + + /** + * Properties of a Token. * @memberof google.cloud.language.v1beta2 - * @interface IPartOfSpeech - * @property {google.cloud.language.v1beta2.PartOfSpeech.Tag|null} [tag] PartOfSpeech tag - * @property {google.cloud.language.v1beta2.PartOfSpeech.Aspect|null} [aspect] PartOfSpeech aspect - * @property {google.cloud.language.v1beta2.PartOfSpeech.Case|null} ["case"] PartOfSpeech case - * @property {google.cloud.language.v1beta2.PartOfSpeech.Form|null} [form] PartOfSpeech form - * @property {google.cloud.language.v1beta2.PartOfSpeech.Gender|null} [gender] PartOfSpeech gender - * @property {google.cloud.language.v1beta2.PartOfSpeech.Mood|null} [mood] PartOfSpeech mood - * @property {google.cloud.language.v1beta2.PartOfSpeech.Number|null} [number] PartOfSpeech number - * @property {google.cloud.language.v1beta2.PartOfSpeech.Person|null} [person] PartOfSpeech person - * @property {google.cloud.language.v1beta2.PartOfSpeech.Proper|null} [proper] PartOfSpeech proper - * @property {google.cloud.language.v1beta2.PartOfSpeech.Reciprocity|null} [reciprocity] PartOfSpeech reciprocity - * @property {google.cloud.language.v1beta2.PartOfSpeech.Tense|null} [tense] PartOfSpeech tense - * @property {google.cloud.language.v1beta2.PartOfSpeech.Voice|null} [voice] PartOfSpeech voice + * @interface IToken + * @property {google.cloud.language.v1beta2.ITextSpan|null} [text] Token text + * @property {google.cloud.language.v1beta2.IPartOfSpeech|null} [partOfSpeech] Token partOfSpeech + * @property {google.cloud.language.v1beta2.IDependencyEdge|null} [dependencyEdge] Token dependencyEdge + * @property {string|null} [lemma] Token lemma */ /** - * Constructs a new PartOfSpeech. + * Constructs a new Token. * @memberof google.cloud.language.v1beta2 - * @classdesc Represents a PartOfSpeech. - * @implements IPartOfSpeech + * @classdesc Represents a Token. + * @implements IToken * @constructor - * @param {google.cloud.language.v1beta2.IPartOfSpeech=} [properties] Properties to set + * @param {google.cloud.language.v1beta2.IToken=} [properties] Properties to set */ - function PartOfSpeech(properties) { + function Token(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10019,229 +10307,117 @@ } /** - * PartOfSpeech tag. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Tag} tag - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * Token text. + * @member {google.cloud.language.v1beta2.ITextSpan|null|undefined} text + * @memberof google.cloud.language.v1beta2.Token * @instance */ - PartOfSpeech.prototype.tag = 0; + Token.prototype.text = null; /** - * PartOfSpeech aspect. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Aspect} aspect - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * Token partOfSpeech. + * @member {google.cloud.language.v1beta2.IPartOfSpeech|null|undefined} partOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @instance */ - PartOfSpeech.prototype.aspect = 0; + Token.prototype.partOfSpeech = null; /** - * PartOfSpeech case. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Case} case - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * Token dependencyEdge. + * @member {google.cloud.language.v1beta2.IDependencyEdge|null|undefined} dependencyEdge + * @memberof google.cloud.language.v1beta2.Token * @instance */ - PartOfSpeech.prototype["case"] = 0; + Token.prototype.dependencyEdge = null; /** - * PartOfSpeech form. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Form} form - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * Token lemma. + * @member {string} lemma + * @memberof google.cloud.language.v1beta2.Token * @instance */ - PartOfSpeech.prototype.form = 0; - - /** - * PartOfSpeech gender. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Gender} gender - * @memberof google.cloud.language.v1beta2.PartOfSpeech - * @instance - */ - PartOfSpeech.prototype.gender = 0; - - /** - * PartOfSpeech mood. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Mood} mood - * @memberof google.cloud.language.v1beta2.PartOfSpeech - * @instance - */ - PartOfSpeech.prototype.mood = 0; - - /** - * PartOfSpeech number. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Number} number - * @memberof google.cloud.language.v1beta2.PartOfSpeech - * @instance - */ - PartOfSpeech.prototype.number = 0; - - /** - * PartOfSpeech person. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Person} person - * @memberof google.cloud.language.v1beta2.PartOfSpeech - * @instance - */ - PartOfSpeech.prototype.person = 0; - - /** - * PartOfSpeech proper. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Proper} proper - * @memberof google.cloud.language.v1beta2.PartOfSpeech - * @instance - */ - PartOfSpeech.prototype.proper = 0; - - /** - * PartOfSpeech reciprocity. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Reciprocity} reciprocity - * @memberof google.cloud.language.v1beta2.PartOfSpeech - * @instance - */ - PartOfSpeech.prototype.reciprocity = 0; - - /** - * PartOfSpeech tense. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Tense} tense - * @memberof google.cloud.language.v1beta2.PartOfSpeech - * @instance - */ - PartOfSpeech.prototype.tense = 0; - - /** - * PartOfSpeech voice. - * @member {google.cloud.language.v1beta2.PartOfSpeech.Voice} voice - * @memberof google.cloud.language.v1beta2.PartOfSpeech - * @instance - */ - PartOfSpeech.prototype.voice = 0; + Token.prototype.lemma = ""; /** - * Creates a new PartOfSpeech instance using the specified properties. + * Creates a new Token instance using the specified properties. * @function create - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @static - * @param {google.cloud.language.v1beta2.IPartOfSpeech=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech instance + * @param {google.cloud.language.v1beta2.IToken=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Token} Token instance */ - PartOfSpeech.create = function create(properties) { - return new PartOfSpeech(properties); + Token.create = function create(properties) { + return new Token(properties); }; /** - * Encodes the specified PartOfSpeech message. Does not implicitly {@link google.cloud.language.v1beta2.PartOfSpeech.verify|verify} messages. + * Encodes the specified Token message. Does not implicitly {@link google.cloud.language.v1beta2.Token.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @static - * @param {google.cloud.language.v1beta2.IPartOfSpeech} message PartOfSpeech message or plain object to encode + * @param {google.cloud.language.v1beta2.IToken} message Token message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartOfSpeech.encode = function encode(message, writer) { + Token.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tag); - if (message.aspect != null && Object.hasOwnProperty.call(message, "aspect")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.aspect); - if (message["case"] != null && Object.hasOwnProperty.call(message, "case")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message["case"]); - if (message.form != null && Object.hasOwnProperty.call(message, "form")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.form); - if (message.gender != null && Object.hasOwnProperty.call(message, "gender")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.gender); - if (message.mood != null && Object.hasOwnProperty.call(message, "mood")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mood); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.number); - if (message.person != null && Object.hasOwnProperty.call(message, "person")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.person); - if (message.proper != null && Object.hasOwnProperty.call(message, "proper")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.proper); - if (message.reciprocity != null && Object.hasOwnProperty.call(message, "reciprocity")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.reciprocity); - if (message.tense != null && Object.hasOwnProperty.call(message, "tense")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.tense); - if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.voice); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.partOfSpeech != null && Object.hasOwnProperty.call(message, "partOfSpeech")) + $root.google.cloud.language.v1beta2.PartOfSpeech.encode(message.partOfSpeech, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dependencyEdge != null && Object.hasOwnProperty.call(message, "dependencyEdge")) + $root.google.cloud.language.v1beta2.DependencyEdge.encode(message.dependencyEdge, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lemma != null && Object.hasOwnProperty.call(message, "lemma")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.lemma); return writer; }; /** - * Encodes the specified PartOfSpeech message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.PartOfSpeech.verify|verify} messages. + * Encodes the specified Token message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Token.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @static - * @param {google.cloud.language.v1beta2.IPartOfSpeech} message PartOfSpeech message or plain object to encode + * @param {google.cloud.language.v1beta2.IToken} message Token message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartOfSpeech.encodeDelimited = function encodeDelimited(message, writer) { + Token.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PartOfSpeech message from the specified reader or buffer. + * Decodes a Token message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech + * @returns {google.cloud.language.v1beta2.Token} Token * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartOfSpeech.decode = function decode(reader, length) { + Token.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.PartOfSpeech(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Token(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.tag = reader.int32(); + message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); break; } case 2: { - message.aspect = reader.int32(); + message.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.decode(reader, reader.uint32()); break; } case 3: { - message["case"] = reader.int32(); + message.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.decode(reader, reader.uint32()); break; } case 4: { - message.form = reader.int32(); - break; - } - case 5: { - message.gender = reader.int32(); - break; - } - case 6: { - message.mood = reader.int32(); - break; - } - case 7: { - message.number = reader.int32(); - break; - } - case 8: { - message.person = reader.int32(); - break; - } - case 9: { - message.proper = reader.int32(); - break; - } - case 10: { - message.reciprocity = reader.int32(); - break; - } - case 11: { - message.tense = reader.int32(); - break; - } - case 12: { - message.voice = reader.int32(); + message.lemma = reader.string(); break; } default: @@ -10253,1032 +10429,253 @@ }; /** - * Decodes a PartOfSpeech message from the specified reader or buffer, length delimited. + * Decodes a Token message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech + * @returns {google.cloud.language.v1beta2.Token} Token * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartOfSpeech.decodeDelimited = function decodeDelimited(reader) { + Token.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PartOfSpeech message. + * Verifies a Token message. * @function verify - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PartOfSpeech.verify = function verify(message) { + Token.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tag != null && message.hasOwnProperty("tag")) - switch (message.tag) { - default: - return "tag: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } - if (message.aspect != null && message.hasOwnProperty("aspect")) - switch (message.aspect) { - default: - return "aspect: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message["case"] != null && message.hasOwnProperty("case")) - switch (message["case"]) { - default: - return "case: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - break; - } - if (message.form != null && message.hasOwnProperty("form")) - switch (message.form) { - default: - return "form: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - break; - } - if (message.gender != null && message.hasOwnProperty("gender")) - switch (message.gender) { - default: - return "gender: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.mood != null && message.hasOwnProperty("mood")) - switch (message.mood) { - default: - return "mood: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.number != null && message.hasOwnProperty("number")) - switch (message.number) { - default: - return "number: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.person != null && message.hasOwnProperty("person")) - switch (message.person) { - default: - return "person: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.proper != null && message.hasOwnProperty("proper")) - switch (message.proper) { - default: - return "proper: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) - switch (message.reciprocity) { - default: - return "reciprocity: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.tense != null && message.hasOwnProperty("tense")) - switch (message.tense) { - default: - return "tense: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.voice != null && message.hasOwnProperty("voice")) - switch (message.voice) { - default: - return "voice: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.language.v1beta2.TextSpan.verify(message.text); + if (error) + return "text." + error; + } + if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) { + var error = $root.google.cloud.language.v1beta2.PartOfSpeech.verify(message.partOfSpeech); + if (error) + return "partOfSpeech." + error; + } + if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) { + var error = $root.google.cloud.language.v1beta2.DependencyEdge.verify(message.dependencyEdge); + if (error) + return "dependencyEdge." + error; + } + if (message.lemma != null && message.hasOwnProperty("lemma")) + if (!$util.isString(message.lemma)) + return "lemma: string expected"; return null; }; /** - * Creates a PartOfSpeech message from a plain object. Also converts values to their respective internal types. + * Creates a Token message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech + * @returns {google.cloud.language.v1beta2.Token} Token */ - PartOfSpeech.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.PartOfSpeech) + Token.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Token) return object; - var message = new $root.google.cloud.language.v1beta2.PartOfSpeech(); - switch (object.tag) { - case "UNKNOWN": - case 0: - message.tag = 0; - break; - case "ADJ": - case 1: - message.tag = 1; - break; - case "ADP": - case 2: - message.tag = 2; - break; - case "ADV": - case 3: - message.tag = 3; - break; - case "CONJ": - case 4: - message.tag = 4; - break; - case "DET": - case 5: - message.tag = 5; - break; - case "NOUN": - case 6: - message.tag = 6; - break; - case "NUM": - case 7: - message.tag = 7; - break; - case "PRON": - case 8: - message.tag = 8; - break; - case "PRT": - case 9: - message.tag = 9; - break; - case "PUNCT": - case 10: - message.tag = 10; - break; - case "VERB": - case 11: - message.tag = 11; - break; - case "X": - case 12: - message.tag = 12; - break; - case "AFFIX": - case 13: - message.tag = 13; - break; + var message = new $root.google.cloud.language.v1beta2.Token(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.language.v1beta2.Token.text: object expected"); + message.text = $root.google.cloud.language.v1beta2.TextSpan.fromObject(object.text); } - switch (object.aspect) { - case "ASPECT_UNKNOWN": - case 0: - message.aspect = 0; - break; - case "PERFECTIVE": - case 1: - message.aspect = 1; - break; - case "IMPERFECTIVE": - case 2: - message.aspect = 2; - break; - case "PROGRESSIVE": - case 3: - message.aspect = 3; - break; + if (object.partOfSpeech != null) { + if (typeof object.partOfSpeech !== "object") + throw TypeError(".google.cloud.language.v1beta2.Token.partOfSpeech: object expected"); + message.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.fromObject(object.partOfSpeech); } - switch (object["case"]) { - case "CASE_UNKNOWN": - case 0: - message["case"] = 0; - break; - case "ACCUSATIVE": - case 1: - message["case"] = 1; - break; - case "ADVERBIAL": - case 2: - message["case"] = 2; - break; - case "COMPLEMENTIVE": - case 3: - message["case"] = 3; - break; - case "DATIVE": - case 4: - message["case"] = 4; - break; - case "GENITIVE": - case 5: - message["case"] = 5; - break; - case "INSTRUMENTAL": - case 6: - message["case"] = 6; - break; - case "LOCATIVE": - case 7: - message["case"] = 7; - break; - case "NOMINATIVE": - case 8: - message["case"] = 8; - break; - case "OBLIQUE": - case 9: - message["case"] = 9; - break; - case "PARTITIVE": - case 10: - message["case"] = 10; - break; - case "PREPOSITIONAL": - case 11: - message["case"] = 11; - break; - case "REFLEXIVE_CASE": - case 12: - message["case"] = 12; - break; - case "RELATIVE_CASE": - case 13: - message["case"] = 13; - break; - case "VOCATIVE": - case 14: - message["case"] = 14; - break; - } - switch (object.form) { - case "FORM_UNKNOWN": - case 0: - message.form = 0; - break; - case "ADNOMIAL": - case 1: - message.form = 1; - break; - case "AUXILIARY": - case 2: - message.form = 2; - break; - case "COMPLEMENTIZER": - case 3: - message.form = 3; - break; - case "FINAL_ENDING": - case 4: - message.form = 4; - break; - case "GERUND": - case 5: - message.form = 5; - break; - case "REALIS": - case 6: - message.form = 6; - break; - case "IRREALIS": - case 7: - message.form = 7; - break; - case "SHORT": - case 8: - message.form = 8; - break; - case "LONG": - case 9: - message.form = 9; - break; - case "ORDER": - case 10: - message.form = 10; - break; - case "SPECIFIC": - case 11: - message.form = 11; - break; - } - switch (object.gender) { - case "GENDER_UNKNOWN": - case 0: - message.gender = 0; - break; - case "FEMININE": - case 1: - message.gender = 1; - break; - case "MASCULINE": - case 2: - message.gender = 2; - break; - case "NEUTER": - case 3: - message.gender = 3; - break; - } - switch (object.mood) { - case "MOOD_UNKNOWN": - case 0: - message.mood = 0; - break; - case "CONDITIONAL_MOOD": - case 1: - message.mood = 1; - break; - case "IMPERATIVE": - case 2: - message.mood = 2; - break; - case "INDICATIVE": - case 3: - message.mood = 3; - break; - case "INTERROGATIVE": - case 4: - message.mood = 4; - break; - case "JUSSIVE": - case 5: - message.mood = 5; - break; - case "SUBJUNCTIVE": - case 6: - message.mood = 6; - break; - } - switch (object.number) { - case "NUMBER_UNKNOWN": - case 0: - message.number = 0; - break; - case "SINGULAR": - case 1: - message.number = 1; - break; - case "PLURAL": - case 2: - message.number = 2; - break; - case "DUAL": - case 3: - message.number = 3; - break; - } - switch (object.person) { - case "PERSON_UNKNOWN": - case 0: - message.person = 0; - break; - case "FIRST": - case 1: - message.person = 1; - break; - case "SECOND": - case 2: - message.person = 2; - break; - case "THIRD": - case 3: - message.person = 3; - break; - case "REFLEXIVE_PERSON": - case 4: - message.person = 4; - break; - } - switch (object.proper) { - case "PROPER_UNKNOWN": - case 0: - message.proper = 0; - break; - case "PROPER": - case 1: - message.proper = 1; - break; - case "NOT_PROPER": - case 2: - message.proper = 2; - break; - } - switch (object.reciprocity) { - case "RECIPROCITY_UNKNOWN": - case 0: - message.reciprocity = 0; - break; - case "RECIPROCAL": - case 1: - message.reciprocity = 1; - break; - case "NON_RECIPROCAL": - case 2: - message.reciprocity = 2; - break; - } - switch (object.tense) { - case "TENSE_UNKNOWN": - case 0: - message.tense = 0; - break; - case "CONDITIONAL_TENSE": - case 1: - message.tense = 1; - break; - case "FUTURE": - case 2: - message.tense = 2; - break; - case "PAST": - case 3: - message.tense = 3; - break; - case "PRESENT": - case 4: - message.tense = 4; - break; - case "IMPERFECT": - case 5: - message.tense = 5; - break; - case "PLUPERFECT": - case 6: - message.tense = 6; - break; - } - switch (object.voice) { - case "VOICE_UNKNOWN": - case 0: - message.voice = 0; - break; - case "ACTIVE": - case 1: - message.voice = 1; - break; - case "CAUSATIVE": - case 2: - message.voice = 2; - break; - case "PASSIVE": - case 3: - message.voice = 3; - break; + if (object.dependencyEdge != null) { + if (typeof object.dependencyEdge !== "object") + throw TypeError(".google.cloud.language.v1beta2.Token.dependencyEdge: object expected"); + message.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.fromObject(object.dependencyEdge); } + if (object.lemma != null) + message.lemma = String(object.lemma); return message; }; /** - * Creates a plain object from a PartOfSpeech message. Also converts values to other types if specified. + * Creates a plain object from a Token message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @static - * @param {google.cloud.language.v1beta2.PartOfSpeech} message PartOfSpeech + * @param {google.cloud.language.v1beta2.Token} message Token * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartOfSpeech.toObject = function toObject(message, options) { + Token.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tag = options.enums === String ? "UNKNOWN" : 0; - object.aspect = options.enums === String ? "ASPECT_UNKNOWN" : 0; - object["case"] = options.enums === String ? "CASE_UNKNOWN" : 0; - object.form = options.enums === String ? "FORM_UNKNOWN" : 0; - object.gender = options.enums === String ? "GENDER_UNKNOWN" : 0; - object.mood = options.enums === String ? "MOOD_UNKNOWN" : 0; - object.number = options.enums === String ? "NUMBER_UNKNOWN" : 0; - object.person = options.enums === String ? "PERSON_UNKNOWN" : 0; - object.proper = options.enums === String ? "PROPER_UNKNOWN" : 0; - object.reciprocity = options.enums === String ? "RECIPROCITY_UNKNOWN" : 0; - object.tense = options.enums === String ? "TENSE_UNKNOWN" : 0; - object.voice = options.enums === String ? "VOICE_UNKNOWN" : 0; + object.text = null; + object.partOfSpeech = null; + object.dependencyEdge = null; + object.lemma = ""; } - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Tag[message.tag] : message.tag; - if (message.aspect != null && message.hasOwnProperty("aspect")) - object.aspect = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Aspect[message.aspect] : message.aspect; - if (message["case"] != null && message.hasOwnProperty("case")) - object["case"] = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Case[message["case"]] : message["case"]; - if (message.form != null && message.hasOwnProperty("form")) - object.form = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Form[message.form] : message.form; - if (message.gender != null && message.hasOwnProperty("gender")) - object.gender = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Gender[message.gender] : message.gender; - if (message.mood != null && message.hasOwnProperty("mood")) - object.mood = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Mood[message.mood] : message.mood; - if (message.number != null && message.hasOwnProperty("number")) - object.number = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Number[message.number] : message.number; - if (message.person != null && message.hasOwnProperty("person")) - object.person = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Person[message.person] : message.person; - if (message.proper != null && message.hasOwnProperty("proper")) - object.proper = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Proper[message.proper] : message.proper; - if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) - object.reciprocity = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity[message.reciprocity] : message.reciprocity; - if (message.tense != null && message.hasOwnProperty("tense")) - object.tense = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Tense[message.tense] : message.tense; - if (message.voice != null && message.hasOwnProperty("voice")) - object.voice = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Voice[message.voice] : message.voice; + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.language.v1beta2.TextSpan.toObject(message.text, options); + if (message.partOfSpeech != null && message.hasOwnProperty("partOfSpeech")) + object.partOfSpeech = $root.google.cloud.language.v1beta2.PartOfSpeech.toObject(message.partOfSpeech, options); + if (message.dependencyEdge != null && message.hasOwnProperty("dependencyEdge")) + object.dependencyEdge = $root.google.cloud.language.v1beta2.DependencyEdge.toObject(message.dependencyEdge, options); + if (message.lemma != null && message.hasOwnProperty("lemma")) + object.lemma = message.lemma; return object; }; /** - * Converts this PartOfSpeech to JSON. + * Converts this Token to JSON. * @function toJSON - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @instance * @returns {Object.} JSON object */ - PartOfSpeech.prototype.toJSON = function toJSON() { + Token.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PartOfSpeech + * Gets the default type url for Token * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @memberof google.cloud.language.v1beta2.Token * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PartOfSpeech.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Token.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1beta2.PartOfSpeech"; + return typeUrlPrefix + "/google.cloud.language.v1beta2.Token"; }; + return Token; + })(); + + v1beta2.Sentiment = (function() { + /** - * Tag enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Tag - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} ADJ=1 ADJ value - * @property {number} ADP=2 ADP value - * @property {number} ADV=3 ADV value - * @property {number} CONJ=4 CONJ value - * @property {number} DET=5 DET value - * @property {number} NOUN=6 NOUN value - * @property {number} NUM=7 NUM value - * @property {number} PRON=8 PRON value - * @property {number} PRT=9 PRT value - * @property {number} PUNCT=10 PUNCT value - * @property {number} VERB=11 VERB value - * @property {number} X=12 X value - * @property {number} AFFIX=13 AFFIX value + * Properties of a Sentiment. + * @memberof google.cloud.language.v1beta2 + * @interface ISentiment + * @property {number|null} [magnitude] Sentiment magnitude + * @property {number|null} [score] Sentiment score */ - PartOfSpeech.Tag = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "ADJ"] = 1; - values[valuesById[2] = "ADP"] = 2; - values[valuesById[3] = "ADV"] = 3; - values[valuesById[4] = "CONJ"] = 4; - values[valuesById[5] = "DET"] = 5; - values[valuesById[6] = "NOUN"] = 6; - values[valuesById[7] = "NUM"] = 7; - values[valuesById[8] = "PRON"] = 8; - values[valuesById[9] = "PRT"] = 9; - values[valuesById[10] = "PUNCT"] = 10; - values[valuesById[11] = "VERB"] = 11; - values[valuesById[12] = "X"] = 12; - values[valuesById[13] = "AFFIX"] = 13; - return values; - })(); /** - * Aspect enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Aspect - * @enum {number} - * @property {number} ASPECT_UNKNOWN=0 ASPECT_UNKNOWN value - * @property {number} PERFECTIVE=1 PERFECTIVE value - * @property {number} IMPERFECTIVE=2 IMPERFECTIVE value - * @property {number} PROGRESSIVE=3 PROGRESSIVE value + * Constructs a new Sentiment. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a Sentiment. + * @implements ISentiment + * @constructor + * @param {google.cloud.language.v1beta2.ISentiment=} [properties] Properties to set */ - PartOfSpeech.Aspect = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ASPECT_UNKNOWN"] = 0; - values[valuesById[1] = "PERFECTIVE"] = 1; - values[valuesById[2] = "IMPERFECTIVE"] = 2; - values[valuesById[3] = "PROGRESSIVE"] = 3; - return values; - })(); + function Sentiment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Case enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Case - * @enum {number} - * @property {number} CASE_UNKNOWN=0 CASE_UNKNOWN value - * @property {number} ACCUSATIVE=1 ACCUSATIVE value - * @property {number} ADVERBIAL=2 ADVERBIAL value - * @property {number} COMPLEMENTIVE=3 COMPLEMENTIVE value - * @property {number} DATIVE=4 DATIVE value - * @property {number} GENITIVE=5 GENITIVE value - * @property {number} INSTRUMENTAL=6 INSTRUMENTAL value - * @property {number} LOCATIVE=7 LOCATIVE value - * @property {number} NOMINATIVE=8 NOMINATIVE value - * @property {number} OBLIQUE=9 OBLIQUE value - * @property {number} PARTITIVE=10 PARTITIVE value - * @property {number} PREPOSITIONAL=11 PREPOSITIONAL value - * @property {number} REFLEXIVE_CASE=12 REFLEXIVE_CASE value - * @property {number} RELATIVE_CASE=13 RELATIVE_CASE value - * @property {number} VOCATIVE=14 VOCATIVE value + * Sentiment magnitude. + * @member {number} magnitude + * @memberof google.cloud.language.v1beta2.Sentiment + * @instance */ - PartOfSpeech.Case = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CASE_UNKNOWN"] = 0; - values[valuesById[1] = "ACCUSATIVE"] = 1; - values[valuesById[2] = "ADVERBIAL"] = 2; - values[valuesById[3] = "COMPLEMENTIVE"] = 3; - values[valuesById[4] = "DATIVE"] = 4; - values[valuesById[5] = "GENITIVE"] = 5; - values[valuesById[6] = "INSTRUMENTAL"] = 6; - values[valuesById[7] = "LOCATIVE"] = 7; - values[valuesById[8] = "NOMINATIVE"] = 8; - values[valuesById[9] = "OBLIQUE"] = 9; - values[valuesById[10] = "PARTITIVE"] = 10; - values[valuesById[11] = "PREPOSITIONAL"] = 11; - values[valuesById[12] = "REFLEXIVE_CASE"] = 12; - values[valuesById[13] = "RELATIVE_CASE"] = 13; - values[valuesById[14] = "VOCATIVE"] = 14; - return values; - })(); + Sentiment.prototype.magnitude = 0; /** - * Form enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Form - * @enum {number} - * @property {number} FORM_UNKNOWN=0 FORM_UNKNOWN value - * @property {number} ADNOMIAL=1 ADNOMIAL value - * @property {number} AUXILIARY=2 AUXILIARY value - * @property {number} COMPLEMENTIZER=3 COMPLEMENTIZER value - * @property {number} FINAL_ENDING=4 FINAL_ENDING value - * @property {number} GERUND=5 GERUND value - * @property {number} REALIS=6 REALIS value - * @property {number} IRREALIS=7 IRREALIS value - * @property {number} SHORT=8 SHORT value - * @property {number} LONG=9 LONG value - * @property {number} ORDER=10 ORDER value - * @property {number} SPECIFIC=11 SPECIFIC value + * Sentiment score. + * @member {number} score + * @memberof google.cloud.language.v1beta2.Sentiment + * @instance */ - PartOfSpeech.Form = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORM_UNKNOWN"] = 0; - values[valuesById[1] = "ADNOMIAL"] = 1; - values[valuesById[2] = "AUXILIARY"] = 2; - values[valuesById[3] = "COMPLEMENTIZER"] = 3; - values[valuesById[4] = "FINAL_ENDING"] = 4; - values[valuesById[5] = "GERUND"] = 5; - values[valuesById[6] = "REALIS"] = 6; - values[valuesById[7] = "IRREALIS"] = 7; - values[valuesById[8] = "SHORT"] = 8; - values[valuesById[9] = "LONG"] = 9; - values[valuesById[10] = "ORDER"] = 10; - values[valuesById[11] = "SPECIFIC"] = 11; - return values; - })(); + Sentiment.prototype.score = 0; /** - * Gender enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Gender - * @enum {number} - * @property {number} GENDER_UNKNOWN=0 GENDER_UNKNOWN value - * @property {number} FEMININE=1 FEMININE value - * @property {number} MASCULINE=2 MASCULINE value - * @property {number} NEUTER=3 NEUTER value + * Creates a new Sentiment instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {google.cloud.language.v1beta2.ISentiment=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment instance */ - PartOfSpeech.Gender = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GENDER_UNKNOWN"] = 0; - values[valuesById[1] = "FEMININE"] = 1; - values[valuesById[2] = "MASCULINE"] = 2; - values[valuesById[3] = "NEUTER"] = 3; - return values; - })(); + Sentiment.create = function create(properties) { + return new Sentiment(properties); + }; /** - * Mood enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Mood - * @enum {number} - * @property {number} MOOD_UNKNOWN=0 MOOD_UNKNOWN value - * @property {number} CONDITIONAL_MOOD=1 CONDITIONAL_MOOD value - * @property {number} IMPERATIVE=2 IMPERATIVE value - * @property {number} INDICATIVE=3 INDICATIVE value - * @property {number} INTERROGATIVE=4 INTERROGATIVE value - * @property {number} JUSSIVE=5 JUSSIVE value - * @property {number} SUBJUNCTIVE=6 SUBJUNCTIVE value + * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.language.v1beta2.Sentiment.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {google.cloud.language.v1beta2.ISentiment} message Sentiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - PartOfSpeech.Mood = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MOOD_UNKNOWN"] = 0; - values[valuesById[1] = "CONDITIONAL_MOOD"] = 1; - values[valuesById[2] = "IMPERATIVE"] = 2; - values[valuesById[3] = "INDICATIVE"] = 3; - values[valuesById[4] = "INTERROGATIVE"] = 4; - values[valuesById[5] = "JUSSIVE"] = 5; - values[valuesById[6] = "SUBJUNCTIVE"] = 6; - return values; - })(); + Sentiment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.magnitude); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.score); + return writer; + }; /** - * Number enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Number - * @enum {number} - * @property {number} NUMBER_UNKNOWN=0 NUMBER_UNKNOWN value - * @property {number} SINGULAR=1 SINGULAR value - * @property {number} PLURAL=2 PLURAL value - * @property {number} DUAL=3 DUAL value - */ - PartOfSpeech.Number = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NUMBER_UNKNOWN"] = 0; - values[valuesById[1] = "SINGULAR"] = 1; - values[valuesById[2] = "PLURAL"] = 2; - values[valuesById[3] = "DUAL"] = 3; - return values; - })(); - - /** - * Person enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Person - * @enum {number} - * @property {number} PERSON_UNKNOWN=0 PERSON_UNKNOWN value - * @property {number} FIRST=1 FIRST value - * @property {number} SECOND=2 SECOND value - * @property {number} THIRD=3 THIRD value - * @property {number} REFLEXIVE_PERSON=4 REFLEXIVE_PERSON value - */ - PartOfSpeech.Person = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PERSON_UNKNOWN"] = 0; - values[valuesById[1] = "FIRST"] = 1; - values[valuesById[2] = "SECOND"] = 2; - values[valuesById[3] = "THIRD"] = 3; - values[valuesById[4] = "REFLEXIVE_PERSON"] = 4; - return values; - })(); - - /** - * Proper enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Proper - * @enum {number} - * @property {number} PROPER_UNKNOWN=0 PROPER_UNKNOWN value - * @property {number} PROPER=1 PROPER value - * @property {number} NOT_PROPER=2 NOT_PROPER value - */ - PartOfSpeech.Proper = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROPER_UNKNOWN"] = 0; - values[valuesById[1] = "PROPER"] = 1; - values[valuesById[2] = "NOT_PROPER"] = 2; - return values; - })(); - - /** - * Reciprocity enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Reciprocity - * @enum {number} - * @property {number} RECIPROCITY_UNKNOWN=0 RECIPROCITY_UNKNOWN value - * @property {number} RECIPROCAL=1 RECIPROCAL value - * @property {number} NON_RECIPROCAL=2 NON_RECIPROCAL value - */ - PartOfSpeech.Reciprocity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RECIPROCITY_UNKNOWN"] = 0; - values[valuesById[1] = "RECIPROCAL"] = 1; - values[valuesById[2] = "NON_RECIPROCAL"] = 2; - return values; - })(); - - /** - * Tense enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Tense - * @enum {number} - * @property {number} TENSE_UNKNOWN=0 TENSE_UNKNOWN value - * @property {number} CONDITIONAL_TENSE=1 CONDITIONAL_TENSE value - * @property {number} FUTURE=2 FUTURE value - * @property {number} PAST=3 PAST value - * @property {number} PRESENT=4 PRESENT value - * @property {number} IMPERFECT=5 IMPERFECT value - * @property {number} PLUPERFECT=6 PLUPERFECT value - */ - PartOfSpeech.Tense = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TENSE_UNKNOWN"] = 0; - values[valuesById[1] = "CONDITIONAL_TENSE"] = 1; - values[valuesById[2] = "FUTURE"] = 2; - values[valuesById[3] = "PAST"] = 3; - values[valuesById[4] = "PRESENT"] = 4; - values[valuesById[5] = "IMPERFECT"] = 5; - values[valuesById[6] = "PLUPERFECT"] = 6; - return values; - })(); - - /** - * Voice enum. - * @name google.cloud.language.v1beta2.PartOfSpeech.Voice - * @enum {number} - * @property {number} VOICE_UNKNOWN=0 VOICE_UNKNOWN value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} CAUSATIVE=2 CAUSATIVE value - * @property {number} PASSIVE=3 PASSIVE value - */ - PartOfSpeech.Voice = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VOICE_UNKNOWN"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "CAUSATIVE"] = 2; - values[valuesById[3] = "PASSIVE"] = 3; - return values; - })(); - - return PartOfSpeech; - })(); - - v1beta2.DependencyEdge = (function() { - - /** - * Properties of a DependencyEdge. - * @memberof google.cloud.language.v1beta2 - * @interface IDependencyEdge - * @property {number|null} [headTokenIndex] DependencyEdge headTokenIndex - * @property {google.cloud.language.v1beta2.DependencyEdge.Label|null} [label] DependencyEdge label - */ - - /** - * Constructs a new DependencyEdge. - * @memberof google.cloud.language.v1beta2 - * @classdesc Represents a DependencyEdge. - * @implements IDependencyEdge - * @constructor - * @param {google.cloud.language.v1beta2.IDependencyEdge=} [properties] Properties to set - */ - function DependencyEdge(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DependencyEdge headTokenIndex. - * @member {number} headTokenIndex - * @memberof google.cloud.language.v1beta2.DependencyEdge - * @instance - */ - DependencyEdge.prototype.headTokenIndex = 0; - - /** - * DependencyEdge label. - * @member {google.cloud.language.v1beta2.DependencyEdge.Label} label - * @memberof google.cloud.language.v1beta2.DependencyEdge - * @instance - */ - DependencyEdge.prototype.label = 0; - - /** - * Creates a new DependencyEdge instance using the specified properties. - * @function create - * @memberof google.cloud.language.v1beta2.DependencyEdge - * @static - * @param {google.cloud.language.v1beta2.IDependencyEdge=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge instance - */ - DependencyEdge.create = function create(properties) { - return new DependencyEdge(properties); - }; - - /** - * Encodes the specified DependencyEdge message. Does not implicitly {@link google.cloud.language.v1beta2.DependencyEdge.verify|verify} messages. - * @function encode - * @memberof google.cloud.language.v1beta2.DependencyEdge - * @static - * @param {google.cloud.language.v1beta2.IDependencyEdge} message DependencyEdge message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DependencyEdge.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.headTokenIndex != null && Object.hasOwnProperty.call(message, "headTokenIndex")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headTokenIndex); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.label); - return writer; - }; - - /** - * Encodes the specified DependencyEdge message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.DependencyEdge.verify|verify} messages. + * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.Sentiment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.DependencyEdge + * @memberof google.cloud.language.v1beta2.Sentiment * @static - * @param {google.cloud.language.v1beta2.IDependencyEdge} message DependencyEdge message or plain object to encode + * @param {google.cloud.language.v1beta2.ISentiment} message Sentiment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DependencyEdge.encodeDelimited = function encodeDelimited(message, writer) { + Sentiment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DependencyEdge message from the specified reader or buffer. + * Decodes a Sentiment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1beta2.DependencyEdge + * @memberof google.cloud.language.v1beta2.Sentiment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge + * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DependencyEdge.decode = function decode(reader, length) { + Sentiment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.DependencyEdge(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.Sentiment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.headTokenIndex = reader.int32(); + case 2: { + message.magnitude = reader.float(); break; } - case 2: { - message.label = reader.int32(); + case 3: { + message.score = reader.float(); break; } default: @@ -11290,321 +10687,1735 @@ }; /** - * Decodes a DependencyEdge message from the specified reader or buffer, length delimited. + * Decodes a Sentiment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.DependencyEdge + * @memberof google.cloud.language.v1beta2.Sentiment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge + * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DependencyEdge.decodeDelimited = function decodeDelimited(reader) { + Sentiment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DependencyEdge message. + * Verifies a Sentiment message. * @function verify - * @memberof google.cloud.language.v1beta2.DependencyEdge + * @memberof google.cloud.language.v1beta2.Sentiment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DependencyEdge.verify = function verify(message) { + Sentiment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) - if (!$util.isInteger(message.headTokenIndex)) - return "headTokenIndex: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - case 23: - case 24: - case 25: - case 26: - case 27: - case 28: - case 29: - case 30: - case 31: - case 32: - case 33: - case 34: - case 35: - case 36: - case 37: - case 38: - case 39: - case 40: - case 41: - case 42: - case 43: - case 44: - case 45: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - case 58: - case 59: - case 60: - case 61: - case 62: - case 63: - case 64: - case 65: - case 66: - case 67: - case 68: - case 69: - case 70: - case 71: - case 72: - case 73: - case 74: - case 75: - case 76: - case 77: - case 78: - case 79: - case 80: - case 81: - case 82: - break; - } + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + if (typeof message.magnitude !== "number") + return "magnitude: number expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; return null; }; /** - * Creates a DependencyEdge message from a plain object. Also converts values to their respective internal types. + * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1beta2.DependencyEdge + * @memberof google.cloud.language.v1beta2.Sentiment * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge + * @returns {google.cloud.language.v1beta2.Sentiment} Sentiment */ - DependencyEdge.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.DependencyEdge) + Sentiment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.Sentiment) return object; - var message = new $root.google.cloud.language.v1beta2.DependencyEdge(); - if (object.headTokenIndex != null) - message.headTokenIndex = object.headTokenIndex | 0; - switch (object.label) { - case "UNKNOWN": - case 0: - message.label = 0; - break; - case "ABBREV": - case 1: - message.label = 1; - break; - case "ACOMP": - case 2: - message.label = 2; - break; - case "ADVCL": - case 3: - message.label = 3; - break; - case "ADVMOD": - case 4: - message.label = 4; - break; - case "AMOD": - case 5: - message.label = 5; - break; - case "APPOS": - case 6: - message.label = 6; - break; - case "ATTR": - case 7: - message.label = 7; - break; - case "AUX": - case 8: - message.label = 8; - break; - case "AUXPASS": - case 9: - message.label = 9; - break; - case "CC": - case 10: - message.label = 10; - break; - case "CCOMP": - case 11: - message.label = 11; - break; - case "CONJ": - case 12: - message.label = 12; - break; - case "CSUBJ": - case 13: - message.label = 13; - break; - case "CSUBJPASS": - case 14: - message.label = 14; - break; - case "DEP": - case 15: - message.label = 15; - break; - case "DET": - case 16: - message.label = 16; - break; - case "DISCOURSE": - case 17: - message.label = 17; - break; - case "DOBJ": - case 18: - message.label = 18; - break; - case "EXPL": - case 19: - message.label = 19; - break; - case "GOESWITH": - case 20: - message.label = 20; - break; - case "IOBJ": - case 21: - message.label = 21; - break; - case "MARK": - case 22: - message.label = 22; - break; - case "MWE": - case 23: - message.label = 23; - break; - case "MWV": - case 24: - message.label = 24; - break; - case "NEG": - case 25: - message.label = 25; - break; - case "NN": - case 26: - message.label = 26; - break; - case "NPADVMOD": - case 27: - message.label = 27; - break; - case "NSUBJ": - case 28: - message.label = 28; - break; - case "NSUBJPASS": - case 29: - message.label = 29; - break; - case "NUM": - case 30: - message.label = 30; - break; - case "NUMBER": - case 31: - message.label = 31; - break; - case "P": - case 32: - message.label = 32; - break; - case "PARATAXIS": - case 33: - message.label = 33; - break; - case "PARTMOD": - case 34: - message.label = 34; - break; - case "PCOMP": - case 35: - message.label = 35; - break; - case "POBJ": - case 36: - message.label = 36; - break; - case "POSS": - case 37: - message.label = 37; - break; - case "POSTNEG": - case 38: - message.label = 38; - break; - case "PRECOMP": - case 39: - message.label = 39; - break; - case "PRECONJ": - case 40: - message.label = 40; - break; - case "PREDET": - case 41: - message.label = 41; - break; - case "PREF": - case 42: - message.label = 42; - break; - case "PREP": - case 43: - message.label = 43; - break; - case "PRONL": - case 44: - message.label = 44; + var message = new $root.google.cloud.language.v1beta2.Sentiment(); + if (object.magnitude != null) + message.magnitude = Number(object.magnitude); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a Sentiment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {google.cloud.language.v1beta2.Sentiment} message Sentiment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sentiment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.magnitude = 0; + object.score = 0; + } + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + return object; + }; + + /** + * Converts this Sentiment to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.Sentiment + * @instance + * @returns {Object.} JSON object + */ + Sentiment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Sentiment + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.Sentiment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sentiment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.Sentiment"; + }; + + return Sentiment; + })(); + + v1beta2.PartOfSpeech = (function() { + + /** + * Properties of a PartOfSpeech. + * @memberof google.cloud.language.v1beta2 + * @interface IPartOfSpeech + * @property {google.cloud.language.v1beta2.PartOfSpeech.Tag|null} [tag] PartOfSpeech tag + * @property {google.cloud.language.v1beta2.PartOfSpeech.Aspect|null} [aspect] PartOfSpeech aspect + * @property {google.cloud.language.v1beta2.PartOfSpeech.Case|null} ["case"] PartOfSpeech case + * @property {google.cloud.language.v1beta2.PartOfSpeech.Form|null} [form] PartOfSpeech form + * @property {google.cloud.language.v1beta2.PartOfSpeech.Gender|null} [gender] PartOfSpeech gender + * @property {google.cloud.language.v1beta2.PartOfSpeech.Mood|null} [mood] PartOfSpeech mood + * @property {google.cloud.language.v1beta2.PartOfSpeech.Number|null} [number] PartOfSpeech number + * @property {google.cloud.language.v1beta2.PartOfSpeech.Person|null} [person] PartOfSpeech person + * @property {google.cloud.language.v1beta2.PartOfSpeech.Proper|null} [proper] PartOfSpeech proper + * @property {google.cloud.language.v1beta2.PartOfSpeech.Reciprocity|null} [reciprocity] PartOfSpeech reciprocity + * @property {google.cloud.language.v1beta2.PartOfSpeech.Tense|null} [tense] PartOfSpeech tense + * @property {google.cloud.language.v1beta2.PartOfSpeech.Voice|null} [voice] PartOfSpeech voice + */ + + /** + * Constructs a new PartOfSpeech. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a PartOfSpeech. + * @implements IPartOfSpeech + * @constructor + * @param {google.cloud.language.v1beta2.IPartOfSpeech=} [properties] Properties to set + */ + function PartOfSpeech(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartOfSpeech tag. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Tag} tag + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.tag = 0; + + /** + * PartOfSpeech aspect. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Aspect} aspect + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.aspect = 0; + + /** + * PartOfSpeech case. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Case} case + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype["case"] = 0; + + /** + * PartOfSpeech form. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Form} form + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.form = 0; + + /** + * PartOfSpeech gender. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Gender} gender + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.gender = 0; + + /** + * PartOfSpeech mood. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Mood} mood + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.mood = 0; + + /** + * PartOfSpeech number. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Number} number + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.number = 0; + + /** + * PartOfSpeech person. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Person} person + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.person = 0; + + /** + * PartOfSpeech proper. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Proper} proper + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.proper = 0; + + /** + * PartOfSpeech reciprocity. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Reciprocity} reciprocity + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.reciprocity = 0; + + /** + * PartOfSpeech tense. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Tense} tense + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.tense = 0; + + /** + * PartOfSpeech voice. + * @member {google.cloud.language.v1beta2.PartOfSpeech.Voice} voice + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + */ + PartOfSpeech.prototype.voice = 0; + + /** + * Creates a new PartOfSpeech instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {google.cloud.language.v1beta2.IPartOfSpeech=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech instance + */ + PartOfSpeech.create = function create(properties) { + return new PartOfSpeech(properties); + }; + + /** + * Encodes the specified PartOfSpeech message. Does not implicitly {@link google.cloud.language.v1beta2.PartOfSpeech.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {google.cloud.language.v1beta2.IPartOfSpeech} message PartOfSpeech message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartOfSpeech.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tag); + if (message.aspect != null && Object.hasOwnProperty.call(message, "aspect")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.aspect); + if (message["case"] != null && Object.hasOwnProperty.call(message, "case")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message["case"]); + if (message.form != null && Object.hasOwnProperty.call(message, "form")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.form); + if (message.gender != null && Object.hasOwnProperty.call(message, "gender")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.gender); + if (message.mood != null && Object.hasOwnProperty.call(message, "mood")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mood); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.number); + if (message.person != null && Object.hasOwnProperty.call(message, "person")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.person); + if (message.proper != null && Object.hasOwnProperty.call(message, "proper")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.proper); + if (message.reciprocity != null && Object.hasOwnProperty.call(message, "reciprocity")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.reciprocity); + if (message.tense != null && Object.hasOwnProperty.call(message, "tense")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.tense); + if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.voice); + return writer; + }; + + /** + * Encodes the specified PartOfSpeech message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.PartOfSpeech.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {google.cloud.language.v1beta2.IPartOfSpeech} message PartOfSpeech message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartOfSpeech.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartOfSpeech.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.PartOfSpeech(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tag = reader.int32(); + break; + } + case 2: { + message.aspect = reader.int32(); + break; + } + case 3: { + message["case"] = reader.int32(); + break; + } + case 4: { + message.form = reader.int32(); + break; + } + case 5: { + message.gender = reader.int32(); + break; + } + case 6: { + message.mood = reader.int32(); + break; + } + case 7: { + message.number = reader.int32(); + break; + } + case 8: { + message.person = reader.int32(); + break; + } + case 9: { + message.proper = reader.int32(); + break; + } + case 10: { + message.reciprocity = reader.int32(); + break; + } + case 11: { + message.tense = reader.int32(); + break; + } + case 12: { + message.voice = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartOfSpeech message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartOfSpeech.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartOfSpeech message. + * @function verify + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartOfSpeech.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + switch (message.tag) { + default: + return "tag: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.aspect != null && message.hasOwnProperty("aspect")) + switch (message.aspect) { + default: + return "aspect: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message["case"] != null && message.hasOwnProperty("case")) + switch (message["case"]) { + default: + return "case: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + break; + } + if (message.form != null && message.hasOwnProperty("form")) + switch (message.form) { + default: + return "form: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + break; + } + if (message.gender != null && message.hasOwnProperty("gender")) + switch (message.gender) { + default: + return "gender: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mood != null && message.hasOwnProperty("mood")) + switch (message.mood) { + default: + return "mood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.number != null && message.hasOwnProperty("number")) + switch (message.number) { + default: + return "number: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.person != null && message.hasOwnProperty("person")) + switch (message.person) { + default: + return "person: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.proper != null && message.hasOwnProperty("proper")) + switch (message.proper) { + default: + return "proper: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + switch (message.reciprocity) { + default: + return "reciprocity: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.tense != null && message.hasOwnProperty("tense")) + switch (message.tense) { + default: + return "tense: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.voice != null && message.hasOwnProperty("voice")) + switch (message.voice) { + default: + return "voice: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a PartOfSpeech message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.PartOfSpeech} PartOfSpeech + */ + PartOfSpeech.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.PartOfSpeech) + return object; + var message = new $root.google.cloud.language.v1beta2.PartOfSpeech(); + switch (object.tag) { + case "UNKNOWN": + case 0: + message.tag = 0; + break; + case "ADJ": + case 1: + message.tag = 1; + break; + case "ADP": + case 2: + message.tag = 2; + break; + case "ADV": + case 3: + message.tag = 3; + break; + case "CONJ": + case 4: + message.tag = 4; + break; + case "DET": + case 5: + message.tag = 5; + break; + case "NOUN": + case 6: + message.tag = 6; + break; + case "NUM": + case 7: + message.tag = 7; + break; + case "PRON": + case 8: + message.tag = 8; + break; + case "PRT": + case 9: + message.tag = 9; + break; + case "PUNCT": + case 10: + message.tag = 10; + break; + case "VERB": + case 11: + message.tag = 11; + break; + case "X": + case 12: + message.tag = 12; + break; + case "AFFIX": + case 13: + message.tag = 13; + break; + } + switch (object.aspect) { + case "ASPECT_UNKNOWN": + case 0: + message.aspect = 0; + break; + case "PERFECTIVE": + case 1: + message.aspect = 1; + break; + case "IMPERFECTIVE": + case 2: + message.aspect = 2; + break; + case "PROGRESSIVE": + case 3: + message.aspect = 3; + break; + } + switch (object["case"]) { + case "CASE_UNKNOWN": + case 0: + message["case"] = 0; + break; + case "ACCUSATIVE": + case 1: + message["case"] = 1; + break; + case "ADVERBIAL": + case 2: + message["case"] = 2; + break; + case "COMPLEMENTIVE": + case 3: + message["case"] = 3; + break; + case "DATIVE": + case 4: + message["case"] = 4; + break; + case "GENITIVE": + case 5: + message["case"] = 5; + break; + case "INSTRUMENTAL": + case 6: + message["case"] = 6; + break; + case "LOCATIVE": + case 7: + message["case"] = 7; + break; + case "NOMINATIVE": + case 8: + message["case"] = 8; + break; + case "OBLIQUE": + case 9: + message["case"] = 9; + break; + case "PARTITIVE": + case 10: + message["case"] = 10; + break; + case "PREPOSITIONAL": + case 11: + message["case"] = 11; + break; + case "REFLEXIVE_CASE": + case 12: + message["case"] = 12; + break; + case "RELATIVE_CASE": + case 13: + message["case"] = 13; + break; + case "VOCATIVE": + case 14: + message["case"] = 14; + break; + } + switch (object.form) { + case "FORM_UNKNOWN": + case 0: + message.form = 0; + break; + case "ADNOMIAL": + case 1: + message.form = 1; + break; + case "AUXILIARY": + case 2: + message.form = 2; + break; + case "COMPLEMENTIZER": + case 3: + message.form = 3; + break; + case "FINAL_ENDING": + case 4: + message.form = 4; + break; + case "GERUND": + case 5: + message.form = 5; + break; + case "REALIS": + case 6: + message.form = 6; + break; + case "IRREALIS": + case 7: + message.form = 7; + break; + case "SHORT": + case 8: + message.form = 8; + break; + case "LONG": + case 9: + message.form = 9; + break; + case "ORDER": + case 10: + message.form = 10; + break; + case "SPECIFIC": + case 11: + message.form = 11; + break; + } + switch (object.gender) { + case "GENDER_UNKNOWN": + case 0: + message.gender = 0; + break; + case "FEMININE": + case 1: + message.gender = 1; + break; + case "MASCULINE": + case 2: + message.gender = 2; + break; + case "NEUTER": + case 3: + message.gender = 3; + break; + } + switch (object.mood) { + case "MOOD_UNKNOWN": + case 0: + message.mood = 0; + break; + case "CONDITIONAL_MOOD": + case 1: + message.mood = 1; + break; + case "IMPERATIVE": + case 2: + message.mood = 2; + break; + case "INDICATIVE": + case 3: + message.mood = 3; + break; + case "INTERROGATIVE": + case 4: + message.mood = 4; + break; + case "JUSSIVE": + case 5: + message.mood = 5; + break; + case "SUBJUNCTIVE": + case 6: + message.mood = 6; + break; + } + switch (object.number) { + case "NUMBER_UNKNOWN": + case 0: + message.number = 0; + break; + case "SINGULAR": + case 1: + message.number = 1; + break; + case "PLURAL": + case 2: + message.number = 2; + break; + case "DUAL": + case 3: + message.number = 3; + break; + } + switch (object.person) { + case "PERSON_UNKNOWN": + case 0: + message.person = 0; + break; + case "FIRST": + case 1: + message.person = 1; + break; + case "SECOND": + case 2: + message.person = 2; + break; + case "THIRD": + case 3: + message.person = 3; + break; + case "REFLEXIVE_PERSON": + case 4: + message.person = 4; + break; + } + switch (object.proper) { + case "PROPER_UNKNOWN": + case 0: + message.proper = 0; + break; + case "PROPER": + case 1: + message.proper = 1; + break; + case "NOT_PROPER": + case 2: + message.proper = 2; + break; + } + switch (object.reciprocity) { + case "RECIPROCITY_UNKNOWN": + case 0: + message.reciprocity = 0; + break; + case "RECIPROCAL": + case 1: + message.reciprocity = 1; + break; + case "NON_RECIPROCAL": + case 2: + message.reciprocity = 2; + break; + } + switch (object.tense) { + case "TENSE_UNKNOWN": + case 0: + message.tense = 0; + break; + case "CONDITIONAL_TENSE": + case 1: + message.tense = 1; + break; + case "FUTURE": + case 2: + message.tense = 2; + break; + case "PAST": + case 3: + message.tense = 3; + break; + case "PRESENT": + case 4: + message.tense = 4; + break; + case "IMPERFECT": + case 5: + message.tense = 5; + break; + case "PLUPERFECT": + case 6: + message.tense = 6; + break; + } + switch (object.voice) { + case "VOICE_UNKNOWN": + case 0: + message.voice = 0; + break; + case "ACTIVE": + case 1: + message.voice = 1; + break; + case "CAUSATIVE": + case 2: + message.voice = 2; + break; + case "PASSIVE": + case 3: + message.voice = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a PartOfSpeech message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {google.cloud.language.v1beta2.PartOfSpeech} message PartOfSpeech + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartOfSpeech.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tag = options.enums === String ? "UNKNOWN" : 0; + object.aspect = options.enums === String ? "ASPECT_UNKNOWN" : 0; + object["case"] = options.enums === String ? "CASE_UNKNOWN" : 0; + object.form = options.enums === String ? "FORM_UNKNOWN" : 0; + object.gender = options.enums === String ? "GENDER_UNKNOWN" : 0; + object.mood = options.enums === String ? "MOOD_UNKNOWN" : 0; + object.number = options.enums === String ? "NUMBER_UNKNOWN" : 0; + object.person = options.enums === String ? "PERSON_UNKNOWN" : 0; + object.proper = options.enums === String ? "PROPER_UNKNOWN" : 0; + object.reciprocity = options.enums === String ? "RECIPROCITY_UNKNOWN" : 0; + object.tense = options.enums === String ? "TENSE_UNKNOWN" : 0; + object.voice = options.enums === String ? "VOICE_UNKNOWN" : 0; + } + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Tag[message.tag] : message.tag; + if (message.aspect != null && message.hasOwnProperty("aspect")) + object.aspect = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Aspect[message.aspect] : message.aspect; + if (message["case"] != null && message.hasOwnProperty("case")) + object["case"] = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Case[message["case"]] : message["case"]; + if (message.form != null && message.hasOwnProperty("form")) + object.form = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Form[message.form] : message.form; + if (message.gender != null && message.hasOwnProperty("gender")) + object.gender = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Gender[message.gender] : message.gender; + if (message.mood != null && message.hasOwnProperty("mood")) + object.mood = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Mood[message.mood] : message.mood; + if (message.number != null && message.hasOwnProperty("number")) + object.number = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Number[message.number] : message.number; + if (message.person != null && message.hasOwnProperty("person")) + object.person = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Person[message.person] : message.person; + if (message.proper != null && message.hasOwnProperty("proper")) + object.proper = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Proper[message.proper] : message.proper; + if (message.reciprocity != null && message.hasOwnProperty("reciprocity")) + object.reciprocity = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity[message.reciprocity] : message.reciprocity; + if (message.tense != null && message.hasOwnProperty("tense")) + object.tense = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Tense[message.tense] : message.tense; + if (message.voice != null && message.hasOwnProperty("voice")) + object.voice = options.enums === String ? $root.google.cloud.language.v1beta2.PartOfSpeech.Voice[message.voice] : message.voice; + return object; + }; + + /** + * Converts this PartOfSpeech to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @instance + * @returns {Object.} JSON object + */ + PartOfSpeech.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartOfSpeech + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.PartOfSpeech + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartOfSpeech.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.PartOfSpeech"; + }; + + /** + * Tag enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Tag + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ADJ=1 ADJ value + * @property {number} ADP=2 ADP value + * @property {number} ADV=3 ADV value + * @property {number} CONJ=4 CONJ value + * @property {number} DET=5 DET value + * @property {number} NOUN=6 NOUN value + * @property {number} NUM=7 NUM value + * @property {number} PRON=8 PRON value + * @property {number} PRT=9 PRT value + * @property {number} PUNCT=10 PUNCT value + * @property {number} VERB=11 VERB value + * @property {number} X=12 X value + * @property {number} AFFIX=13 AFFIX value + */ + PartOfSpeech.Tag = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ADJ"] = 1; + values[valuesById[2] = "ADP"] = 2; + values[valuesById[3] = "ADV"] = 3; + values[valuesById[4] = "CONJ"] = 4; + values[valuesById[5] = "DET"] = 5; + values[valuesById[6] = "NOUN"] = 6; + values[valuesById[7] = "NUM"] = 7; + values[valuesById[8] = "PRON"] = 8; + values[valuesById[9] = "PRT"] = 9; + values[valuesById[10] = "PUNCT"] = 10; + values[valuesById[11] = "VERB"] = 11; + values[valuesById[12] = "X"] = 12; + values[valuesById[13] = "AFFIX"] = 13; + return values; + })(); + + /** + * Aspect enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Aspect + * @enum {number} + * @property {number} ASPECT_UNKNOWN=0 ASPECT_UNKNOWN value + * @property {number} PERFECTIVE=1 PERFECTIVE value + * @property {number} IMPERFECTIVE=2 IMPERFECTIVE value + * @property {number} PROGRESSIVE=3 PROGRESSIVE value + */ + PartOfSpeech.Aspect = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ASPECT_UNKNOWN"] = 0; + values[valuesById[1] = "PERFECTIVE"] = 1; + values[valuesById[2] = "IMPERFECTIVE"] = 2; + values[valuesById[3] = "PROGRESSIVE"] = 3; + return values; + })(); + + /** + * Case enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Case + * @enum {number} + * @property {number} CASE_UNKNOWN=0 CASE_UNKNOWN value + * @property {number} ACCUSATIVE=1 ACCUSATIVE value + * @property {number} ADVERBIAL=2 ADVERBIAL value + * @property {number} COMPLEMENTIVE=3 COMPLEMENTIVE value + * @property {number} DATIVE=4 DATIVE value + * @property {number} GENITIVE=5 GENITIVE value + * @property {number} INSTRUMENTAL=6 INSTRUMENTAL value + * @property {number} LOCATIVE=7 LOCATIVE value + * @property {number} NOMINATIVE=8 NOMINATIVE value + * @property {number} OBLIQUE=9 OBLIQUE value + * @property {number} PARTITIVE=10 PARTITIVE value + * @property {number} PREPOSITIONAL=11 PREPOSITIONAL value + * @property {number} REFLEXIVE_CASE=12 REFLEXIVE_CASE value + * @property {number} RELATIVE_CASE=13 RELATIVE_CASE value + * @property {number} VOCATIVE=14 VOCATIVE value + */ + PartOfSpeech.Case = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CASE_UNKNOWN"] = 0; + values[valuesById[1] = "ACCUSATIVE"] = 1; + values[valuesById[2] = "ADVERBIAL"] = 2; + values[valuesById[3] = "COMPLEMENTIVE"] = 3; + values[valuesById[4] = "DATIVE"] = 4; + values[valuesById[5] = "GENITIVE"] = 5; + values[valuesById[6] = "INSTRUMENTAL"] = 6; + values[valuesById[7] = "LOCATIVE"] = 7; + values[valuesById[8] = "NOMINATIVE"] = 8; + values[valuesById[9] = "OBLIQUE"] = 9; + values[valuesById[10] = "PARTITIVE"] = 10; + values[valuesById[11] = "PREPOSITIONAL"] = 11; + values[valuesById[12] = "REFLEXIVE_CASE"] = 12; + values[valuesById[13] = "RELATIVE_CASE"] = 13; + values[valuesById[14] = "VOCATIVE"] = 14; + return values; + })(); + + /** + * Form enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Form + * @enum {number} + * @property {number} FORM_UNKNOWN=0 FORM_UNKNOWN value + * @property {number} ADNOMIAL=1 ADNOMIAL value + * @property {number} AUXILIARY=2 AUXILIARY value + * @property {number} COMPLEMENTIZER=3 COMPLEMENTIZER value + * @property {number} FINAL_ENDING=4 FINAL_ENDING value + * @property {number} GERUND=5 GERUND value + * @property {number} REALIS=6 REALIS value + * @property {number} IRREALIS=7 IRREALIS value + * @property {number} SHORT=8 SHORT value + * @property {number} LONG=9 LONG value + * @property {number} ORDER=10 ORDER value + * @property {number} SPECIFIC=11 SPECIFIC value + */ + PartOfSpeech.Form = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORM_UNKNOWN"] = 0; + values[valuesById[1] = "ADNOMIAL"] = 1; + values[valuesById[2] = "AUXILIARY"] = 2; + values[valuesById[3] = "COMPLEMENTIZER"] = 3; + values[valuesById[4] = "FINAL_ENDING"] = 4; + values[valuesById[5] = "GERUND"] = 5; + values[valuesById[6] = "REALIS"] = 6; + values[valuesById[7] = "IRREALIS"] = 7; + values[valuesById[8] = "SHORT"] = 8; + values[valuesById[9] = "LONG"] = 9; + values[valuesById[10] = "ORDER"] = 10; + values[valuesById[11] = "SPECIFIC"] = 11; + return values; + })(); + + /** + * Gender enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Gender + * @enum {number} + * @property {number} GENDER_UNKNOWN=0 GENDER_UNKNOWN value + * @property {number} FEMININE=1 FEMININE value + * @property {number} MASCULINE=2 MASCULINE value + * @property {number} NEUTER=3 NEUTER value + */ + PartOfSpeech.Gender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GENDER_UNKNOWN"] = 0; + values[valuesById[1] = "FEMININE"] = 1; + values[valuesById[2] = "MASCULINE"] = 2; + values[valuesById[3] = "NEUTER"] = 3; + return values; + })(); + + /** + * Mood enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Mood + * @enum {number} + * @property {number} MOOD_UNKNOWN=0 MOOD_UNKNOWN value + * @property {number} CONDITIONAL_MOOD=1 CONDITIONAL_MOOD value + * @property {number} IMPERATIVE=2 IMPERATIVE value + * @property {number} INDICATIVE=3 INDICATIVE value + * @property {number} INTERROGATIVE=4 INTERROGATIVE value + * @property {number} JUSSIVE=5 JUSSIVE value + * @property {number} SUBJUNCTIVE=6 SUBJUNCTIVE value + */ + PartOfSpeech.Mood = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MOOD_UNKNOWN"] = 0; + values[valuesById[1] = "CONDITIONAL_MOOD"] = 1; + values[valuesById[2] = "IMPERATIVE"] = 2; + values[valuesById[3] = "INDICATIVE"] = 3; + values[valuesById[4] = "INTERROGATIVE"] = 4; + values[valuesById[5] = "JUSSIVE"] = 5; + values[valuesById[6] = "SUBJUNCTIVE"] = 6; + return values; + })(); + + /** + * Number enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Number + * @enum {number} + * @property {number} NUMBER_UNKNOWN=0 NUMBER_UNKNOWN value + * @property {number} SINGULAR=1 SINGULAR value + * @property {number} PLURAL=2 PLURAL value + * @property {number} DUAL=3 DUAL value + */ + PartOfSpeech.Number = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NUMBER_UNKNOWN"] = 0; + values[valuesById[1] = "SINGULAR"] = 1; + values[valuesById[2] = "PLURAL"] = 2; + values[valuesById[3] = "DUAL"] = 3; + return values; + })(); + + /** + * Person enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Person + * @enum {number} + * @property {number} PERSON_UNKNOWN=0 PERSON_UNKNOWN value + * @property {number} FIRST=1 FIRST value + * @property {number} SECOND=2 SECOND value + * @property {number} THIRD=3 THIRD value + * @property {number} REFLEXIVE_PERSON=4 REFLEXIVE_PERSON value + */ + PartOfSpeech.Person = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PERSON_UNKNOWN"] = 0; + values[valuesById[1] = "FIRST"] = 1; + values[valuesById[2] = "SECOND"] = 2; + values[valuesById[3] = "THIRD"] = 3; + values[valuesById[4] = "REFLEXIVE_PERSON"] = 4; + return values; + })(); + + /** + * Proper enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Proper + * @enum {number} + * @property {number} PROPER_UNKNOWN=0 PROPER_UNKNOWN value + * @property {number} PROPER=1 PROPER value + * @property {number} NOT_PROPER=2 NOT_PROPER value + */ + PartOfSpeech.Proper = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPER_UNKNOWN"] = 0; + values[valuesById[1] = "PROPER"] = 1; + values[valuesById[2] = "NOT_PROPER"] = 2; + return values; + })(); + + /** + * Reciprocity enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Reciprocity + * @enum {number} + * @property {number} RECIPROCITY_UNKNOWN=0 RECIPROCITY_UNKNOWN value + * @property {number} RECIPROCAL=1 RECIPROCAL value + * @property {number} NON_RECIPROCAL=2 NON_RECIPROCAL value + */ + PartOfSpeech.Reciprocity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECIPROCITY_UNKNOWN"] = 0; + values[valuesById[1] = "RECIPROCAL"] = 1; + values[valuesById[2] = "NON_RECIPROCAL"] = 2; + return values; + })(); + + /** + * Tense enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Tense + * @enum {number} + * @property {number} TENSE_UNKNOWN=0 TENSE_UNKNOWN value + * @property {number} CONDITIONAL_TENSE=1 CONDITIONAL_TENSE value + * @property {number} FUTURE=2 FUTURE value + * @property {number} PAST=3 PAST value + * @property {number} PRESENT=4 PRESENT value + * @property {number} IMPERFECT=5 IMPERFECT value + * @property {number} PLUPERFECT=6 PLUPERFECT value + */ + PartOfSpeech.Tense = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TENSE_UNKNOWN"] = 0; + values[valuesById[1] = "CONDITIONAL_TENSE"] = 1; + values[valuesById[2] = "FUTURE"] = 2; + values[valuesById[3] = "PAST"] = 3; + values[valuesById[4] = "PRESENT"] = 4; + values[valuesById[5] = "IMPERFECT"] = 5; + values[valuesById[6] = "PLUPERFECT"] = 6; + return values; + })(); + + /** + * Voice enum. + * @name google.cloud.language.v1beta2.PartOfSpeech.Voice + * @enum {number} + * @property {number} VOICE_UNKNOWN=0 VOICE_UNKNOWN value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} CAUSATIVE=2 CAUSATIVE value + * @property {number} PASSIVE=3 PASSIVE value + */ + PartOfSpeech.Voice = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VOICE_UNKNOWN"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "CAUSATIVE"] = 2; + values[valuesById[3] = "PASSIVE"] = 3; + return values; + })(); + + return PartOfSpeech; + })(); + + v1beta2.DependencyEdge = (function() { + + /** + * Properties of a DependencyEdge. + * @memberof google.cloud.language.v1beta2 + * @interface IDependencyEdge + * @property {number|null} [headTokenIndex] DependencyEdge headTokenIndex + * @property {google.cloud.language.v1beta2.DependencyEdge.Label|null} [label] DependencyEdge label + */ + + /** + * Constructs a new DependencyEdge. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a DependencyEdge. + * @implements IDependencyEdge + * @constructor + * @param {google.cloud.language.v1beta2.IDependencyEdge=} [properties] Properties to set + */ + function DependencyEdge(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DependencyEdge headTokenIndex. + * @member {number} headTokenIndex + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @instance + */ + DependencyEdge.prototype.headTokenIndex = 0; + + /** + * DependencyEdge label. + * @member {google.cloud.language.v1beta2.DependencyEdge.Label} label + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @instance + */ + DependencyEdge.prototype.label = 0; + + /** + * Creates a new DependencyEdge instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {google.cloud.language.v1beta2.IDependencyEdge=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge instance + */ + DependencyEdge.create = function create(properties) { + return new DependencyEdge(properties); + }; + + /** + * Encodes the specified DependencyEdge message. Does not implicitly {@link google.cloud.language.v1beta2.DependencyEdge.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {google.cloud.language.v1beta2.IDependencyEdge} message DependencyEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyEdge.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headTokenIndex != null && Object.hasOwnProperty.call(message, "headTokenIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headTokenIndex); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.label); + return writer; + }; + + /** + * Encodes the specified DependencyEdge message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.DependencyEdge.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {google.cloud.language.v1beta2.IDependencyEdge} message DependencyEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyEdge.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyEdge.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.DependencyEdge(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.headTokenIndex = reader.int32(); + break; + } + case 2: { + message.label = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DependencyEdge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyEdge.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DependencyEdge message. + * @function verify + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DependencyEdge.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + if (!$util.isInteger(message.headTokenIndex)) + return "headTokenIndex: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + break; + } + return null; + }; + + /** + * Creates a DependencyEdge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.DependencyEdge} DependencyEdge + */ + DependencyEdge.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.DependencyEdge) + return object; + var message = new $root.google.cloud.language.v1beta2.DependencyEdge(); + if (object.headTokenIndex != null) + message.headTokenIndex = object.headTokenIndex | 0; + switch (object.label) { + case "UNKNOWN": + case 0: + message.label = 0; + break; + case "ABBREV": + case 1: + message.label = 1; + break; + case "ACOMP": + case 2: + message.label = 2; + break; + case "ADVCL": + case 3: + message.label = 3; + break; + case "ADVMOD": + case 4: + message.label = 4; + break; + case "AMOD": + case 5: + message.label = 5; + break; + case "APPOS": + case 6: + message.label = 6; + break; + case "ATTR": + case 7: + message.label = 7; + break; + case "AUX": + case 8: + message.label = 8; + break; + case "AUXPASS": + case 9: + message.label = 9; + break; + case "CC": + case 10: + message.label = 10; + break; + case "CCOMP": + case 11: + message.label = 11; + break; + case "CONJ": + case 12: + message.label = 12; + break; + case "CSUBJ": + case 13: + message.label = 13; + break; + case "CSUBJPASS": + case 14: + message.label = 14; + break; + case "DEP": + case 15: + message.label = 15; + break; + case "DET": + case 16: + message.label = 16; + break; + case "DISCOURSE": + case 17: + message.label = 17; + break; + case "DOBJ": + case 18: + message.label = 18; + break; + case "EXPL": + case 19: + message.label = 19; + break; + case "GOESWITH": + case 20: + message.label = 20; + break; + case "IOBJ": + case 21: + message.label = 21; + break; + case "MARK": + case 22: + message.label = 22; + break; + case "MWE": + case 23: + message.label = 23; + break; + case "MWV": + case 24: + message.label = 24; + break; + case "NEG": + case 25: + message.label = 25; + break; + case "NN": + case 26: + message.label = 26; + break; + case "NPADVMOD": + case 27: + message.label = 27; + break; + case "NSUBJ": + case 28: + message.label = 28; + break; + case "NSUBJPASS": + case 29: + message.label = 29; + break; + case "NUM": + case 30: + message.label = 30; + break; + case "NUMBER": + case 31: + message.label = 31; + break; + case "P": + case 32: + message.label = 32; + break; + case "PARATAXIS": + case 33: + message.label = 33; + break; + case "PARTMOD": + case 34: + message.label = 34; + break; + case "PCOMP": + case 35: + message.label = 35; + break; + case "POBJ": + case 36: + message.label = 36; + break; + case "POSS": + case 37: + message.label = 37; + break; + case "POSTNEG": + case 38: + message.label = 38; + break; + case "PRECOMP": + case 39: + message.label = 39; + break; + case "PRECONJ": + case 40: + message.label = 40; + break; + case "PREDET": + case 41: + message.label = 41; + break; + case "PREF": + case 42: + message.label = 42; + break; + case "PREP": + case 43: + message.label = 43; + break; + case "PRONL": + case 44: + message.label = 44; break; case "PRT": case 45: @@ -11750,267 +12561,787 @@ case 80: message.label = 80; break; - case "MES": - case 81: - message.label = 81; + case "MES": + case 81: + message.label = 81; + break; + case "NCOMP": + case 82: + message.label = 82; + break; + } + return message; + }; + + /** + * Creates a plain object from a DependencyEdge message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {google.cloud.language.v1beta2.DependencyEdge} message DependencyEdge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DependencyEdge.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headTokenIndex = 0; + object.label = options.enums === String ? "UNKNOWN" : 0; + } + if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) + object.headTokenIndex = message.headTokenIndex; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.cloud.language.v1beta2.DependencyEdge.Label[message.label] : message.label; + return object; + }; + + /** + * Converts this DependencyEdge to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @instance + * @returns {Object.} JSON object + */ + DependencyEdge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DependencyEdge + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.DependencyEdge + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DependencyEdge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.DependencyEdge"; + }; + + /** + * Label enum. + * @name google.cloud.language.v1beta2.DependencyEdge.Label + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ABBREV=1 ABBREV value + * @property {number} ACOMP=2 ACOMP value + * @property {number} ADVCL=3 ADVCL value + * @property {number} ADVMOD=4 ADVMOD value + * @property {number} AMOD=5 AMOD value + * @property {number} APPOS=6 APPOS value + * @property {number} ATTR=7 ATTR value + * @property {number} AUX=8 AUX value + * @property {number} AUXPASS=9 AUXPASS value + * @property {number} CC=10 CC value + * @property {number} CCOMP=11 CCOMP value + * @property {number} CONJ=12 CONJ value + * @property {number} CSUBJ=13 CSUBJ value + * @property {number} CSUBJPASS=14 CSUBJPASS value + * @property {number} DEP=15 DEP value + * @property {number} DET=16 DET value + * @property {number} DISCOURSE=17 DISCOURSE value + * @property {number} DOBJ=18 DOBJ value + * @property {number} EXPL=19 EXPL value + * @property {number} GOESWITH=20 GOESWITH value + * @property {number} IOBJ=21 IOBJ value + * @property {number} MARK=22 MARK value + * @property {number} MWE=23 MWE value + * @property {number} MWV=24 MWV value + * @property {number} NEG=25 NEG value + * @property {number} NN=26 NN value + * @property {number} NPADVMOD=27 NPADVMOD value + * @property {number} NSUBJ=28 NSUBJ value + * @property {number} NSUBJPASS=29 NSUBJPASS value + * @property {number} NUM=30 NUM value + * @property {number} NUMBER=31 NUMBER value + * @property {number} P=32 P value + * @property {number} PARATAXIS=33 PARATAXIS value + * @property {number} PARTMOD=34 PARTMOD value + * @property {number} PCOMP=35 PCOMP value + * @property {number} POBJ=36 POBJ value + * @property {number} POSS=37 POSS value + * @property {number} POSTNEG=38 POSTNEG value + * @property {number} PRECOMP=39 PRECOMP value + * @property {number} PRECONJ=40 PRECONJ value + * @property {number} PREDET=41 PREDET value + * @property {number} PREF=42 PREF value + * @property {number} PREP=43 PREP value + * @property {number} PRONL=44 PRONL value + * @property {number} PRT=45 PRT value + * @property {number} PS=46 PS value + * @property {number} QUANTMOD=47 QUANTMOD value + * @property {number} RCMOD=48 RCMOD value + * @property {number} RCMODREL=49 RCMODREL value + * @property {number} RDROP=50 RDROP value + * @property {number} REF=51 REF value + * @property {number} REMNANT=52 REMNANT value + * @property {number} REPARANDUM=53 REPARANDUM value + * @property {number} ROOT=54 ROOT value + * @property {number} SNUM=55 SNUM value + * @property {number} SUFF=56 SUFF value + * @property {number} TMOD=57 TMOD value + * @property {number} TOPIC=58 TOPIC value + * @property {number} VMOD=59 VMOD value + * @property {number} VOCATIVE=60 VOCATIVE value + * @property {number} XCOMP=61 XCOMP value + * @property {number} SUFFIX=62 SUFFIX value + * @property {number} TITLE=63 TITLE value + * @property {number} ADVPHMOD=64 ADVPHMOD value + * @property {number} AUXCAUS=65 AUXCAUS value + * @property {number} AUXVV=66 AUXVV value + * @property {number} DTMOD=67 DTMOD value + * @property {number} FOREIGN=68 FOREIGN value + * @property {number} KW=69 KW value + * @property {number} LIST=70 LIST value + * @property {number} NOMC=71 NOMC value + * @property {number} NOMCSUBJ=72 NOMCSUBJ value + * @property {number} NOMCSUBJPASS=73 NOMCSUBJPASS value + * @property {number} NUMC=74 NUMC value + * @property {number} COP=75 COP value + * @property {number} DISLOCATED=76 DISLOCATED value + * @property {number} ASP=77 ASP value + * @property {number} GMOD=78 GMOD value + * @property {number} GOBJ=79 GOBJ value + * @property {number} INFMOD=80 INFMOD value + * @property {number} MES=81 MES value + * @property {number} NCOMP=82 NCOMP value + */ + DependencyEdge.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ABBREV"] = 1; + values[valuesById[2] = "ACOMP"] = 2; + values[valuesById[3] = "ADVCL"] = 3; + values[valuesById[4] = "ADVMOD"] = 4; + values[valuesById[5] = "AMOD"] = 5; + values[valuesById[6] = "APPOS"] = 6; + values[valuesById[7] = "ATTR"] = 7; + values[valuesById[8] = "AUX"] = 8; + values[valuesById[9] = "AUXPASS"] = 9; + values[valuesById[10] = "CC"] = 10; + values[valuesById[11] = "CCOMP"] = 11; + values[valuesById[12] = "CONJ"] = 12; + values[valuesById[13] = "CSUBJ"] = 13; + values[valuesById[14] = "CSUBJPASS"] = 14; + values[valuesById[15] = "DEP"] = 15; + values[valuesById[16] = "DET"] = 16; + values[valuesById[17] = "DISCOURSE"] = 17; + values[valuesById[18] = "DOBJ"] = 18; + values[valuesById[19] = "EXPL"] = 19; + values[valuesById[20] = "GOESWITH"] = 20; + values[valuesById[21] = "IOBJ"] = 21; + values[valuesById[22] = "MARK"] = 22; + values[valuesById[23] = "MWE"] = 23; + values[valuesById[24] = "MWV"] = 24; + values[valuesById[25] = "NEG"] = 25; + values[valuesById[26] = "NN"] = 26; + values[valuesById[27] = "NPADVMOD"] = 27; + values[valuesById[28] = "NSUBJ"] = 28; + values[valuesById[29] = "NSUBJPASS"] = 29; + values[valuesById[30] = "NUM"] = 30; + values[valuesById[31] = "NUMBER"] = 31; + values[valuesById[32] = "P"] = 32; + values[valuesById[33] = "PARATAXIS"] = 33; + values[valuesById[34] = "PARTMOD"] = 34; + values[valuesById[35] = "PCOMP"] = 35; + values[valuesById[36] = "POBJ"] = 36; + values[valuesById[37] = "POSS"] = 37; + values[valuesById[38] = "POSTNEG"] = 38; + values[valuesById[39] = "PRECOMP"] = 39; + values[valuesById[40] = "PRECONJ"] = 40; + values[valuesById[41] = "PREDET"] = 41; + values[valuesById[42] = "PREF"] = 42; + values[valuesById[43] = "PREP"] = 43; + values[valuesById[44] = "PRONL"] = 44; + values[valuesById[45] = "PRT"] = 45; + values[valuesById[46] = "PS"] = 46; + values[valuesById[47] = "QUANTMOD"] = 47; + values[valuesById[48] = "RCMOD"] = 48; + values[valuesById[49] = "RCMODREL"] = 49; + values[valuesById[50] = "RDROP"] = 50; + values[valuesById[51] = "REF"] = 51; + values[valuesById[52] = "REMNANT"] = 52; + values[valuesById[53] = "REPARANDUM"] = 53; + values[valuesById[54] = "ROOT"] = 54; + values[valuesById[55] = "SNUM"] = 55; + values[valuesById[56] = "SUFF"] = 56; + values[valuesById[57] = "TMOD"] = 57; + values[valuesById[58] = "TOPIC"] = 58; + values[valuesById[59] = "VMOD"] = 59; + values[valuesById[60] = "VOCATIVE"] = 60; + values[valuesById[61] = "XCOMP"] = 61; + values[valuesById[62] = "SUFFIX"] = 62; + values[valuesById[63] = "TITLE"] = 63; + values[valuesById[64] = "ADVPHMOD"] = 64; + values[valuesById[65] = "AUXCAUS"] = 65; + values[valuesById[66] = "AUXVV"] = 66; + values[valuesById[67] = "DTMOD"] = 67; + values[valuesById[68] = "FOREIGN"] = 68; + values[valuesById[69] = "KW"] = 69; + values[valuesById[70] = "LIST"] = 70; + values[valuesById[71] = "NOMC"] = 71; + values[valuesById[72] = "NOMCSUBJ"] = 72; + values[valuesById[73] = "NOMCSUBJPASS"] = 73; + values[valuesById[74] = "NUMC"] = 74; + values[valuesById[75] = "COP"] = 75; + values[valuesById[76] = "DISLOCATED"] = 76; + values[valuesById[77] = "ASP"] = 77; + values[valuesById[78] = "GMOD"] = 78; + values[valuesById[79] = "GOBJ"] = 79; + values[valuesById[80] = "INFMOD"] = 80; + values[valuesById[81] = "MES"] = 81; + values[valuesById[82] = "NCOMP"] = 82; + return values; + })(); + + return DependencyEdge; + })(); + + v1beta2.EntityMention = (function() { + + /** + * Properties of an EntityMention. + * @memberof google.cloud.language.v1beta2 + * @interface IEntityMention + * @property {google.cloud.language.v1beta2.ITextSpan|null} [text] EntityMention text + * @property {google.cloud.language.v1beta2.EntityMention.Type|null} [type] EntityMention type + * @property {google.cloud.language.v1beta2.ISentiment|null} [sentiment] EntityMention sentiment + */ + + /** + * Constructs a new EntityMention. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents an EntityMention. + * @implements IEntityMention + * @constructor + * @param {google.cloud.language.v1beta2.IEntityMention=} [properties] Properties to set + */ + function EntityMention(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityMention text. + * @member {google.cloud.language.v1beta2.ITextSpan|null|undefined} text + * @memberof google.cloud.language.v1beta2.EntityMention + * @instance + */ + EntityMention.prototype.text = null; + + /** + * EntityMention type. + * @member {google.cloud.language.v1beta2.EntityMention.Type} type + * @memberof google.cloud.language.v1beta2.EntityMention + * @instance + */ + EntityMention.prototype.type = 0; + + /** + * EntityMention sentiment. + * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} sentiment + * @memberof google.cloud.language.v1beta2.EntityMention + * @instance + */ + EntityMention.prototype.sentiment = null; + + /** + * Creates a new EntityMention instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {google.cloud.language.v1beta2.IEntityMention=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention instance + */ + EntityMention.create = function create(properties) { + return new EntityMention(properties); + }; + + /** + * Encodes the specified EntityMention message. Does not implicitly {@link google.cloud.language.v1beta2.EntityMention.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {google.cloud.language.v1beta2.IEntityMention} message EntityMention message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMention.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) + $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EntityMention message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.EntityMention.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {google.cloud.language.v1beta2.IEntityMention} message EntityMention message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMention.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityMention message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMention.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.EntityMention(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityMention message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMention.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityMention message. + * @function verify + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityMention.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.cloud.language.v1beta2.TextSpan.verify(message.text); + if (error) + return "text." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates an EntityMention message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention + */ + EntityMention.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.EntityMention) + return object; + var message = new $root.google.cloud.language.v1beta2.EntityMention(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.language.v1beta2.EntityMention.text: object expected"); + message.text = $root.google.cloud.language.v1beta2.TextSpan.fromObject(object.text); + } + switch (object.type) { + case "TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "PROPER": + case 1: + message.type = 1; break; - case "NCOMP": - case 82: - message.label = 82; + case "COMMON": + case 2: + message.type = 2; break; } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.language.v1beta2.EntityMention.sentiment: object expected"); + message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.sentiment); + } return message; }; /** - * Creates a plain object from a DependencyEdge message. Also converts values to other types if specified. + * Creates a plain object from an EntityMention message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {google.cloud.language.v1beta2.EntityMention} message EntityMention + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityMention.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = null; + object.type = options.enums === String ? "TYPE_UNKNOWN" : 0; + object.sentiment = null; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.cloud.language.v1beta2.TextSpan.toObject(message.text, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.language.v1beta2.EntityMention.Type[message.type] : message.type; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this EntityMention to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.EntityMention + * @instance + * @returns {Object.} JSON object + */ + EntityMention.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityMention + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.EntityMention + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityMention.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.EntityMention"; + }; + + /** + * Type enum. + * @name google.cloud.language.v1beta2.EntityMention.Type + * @enum {number} + * @property {number} TYPE_UNKNOWN=0 TYPE_UNKNOWN value + * @property {number} PROPER=1 PROPER value + * @property {number} COMMON=2 COMMON value + */ + EntityMention.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "PROPER"] = 1; + values[valuesById[2] = "COMMON"] = 2; + return values; + })(); + + return EntityMention; + })(); + + v1beta2.TextSpan = (function() { + + /** + * Properties of a TextSpan. + * @memberof google.cloud.language.v1beta2 + * @interface ITextSpan + * @property {string|null} [content] TextSpan content + * @property {number|null} [beginOffset] TextSpan beginOffset + */ + + /** + * Constructs a new TextSpan. + * @memberof google.cloud.language.v1beta2 + * @classdesc Represents a TextSpan. + * @implements ITextSpan + * @constructor + * @param {google.cloud.language.v1beta2.ITextSpan=} [properties] Properties to set + */ + function TextSpan(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextSpan content. + * @member {string} content + * @memberof google.cloud.language.v1beta2.TextSpan + * @instance + */ + TextSpan.prototype.content = ""; + + /** + * TextSpan beginOffset. + * @member {number} beginOffset + * @memberof google.cloud.language.v1beta2.TextSpan + * @instance + */ + TextSpan.prototype.beginOffset = 0; + + /** + * Creates a new TextSpan instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {google.cloud.language.v1beta2.ITextSpan=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan instance + */ + TextSpan.create = function create(properties) { + return new TextSpan(properties); + }; + + /** + * Encodes the specified TextSpan message. Does not implicitly {@link google.cloud.language.v1beta2.TextSpan.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {google.cloud.language.v1beta2.ITextSpan} message TextSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSpan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.beginOffset != null && Object.hasOwnProperty.call(message, "beginOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.beginOffset); + return writer; + }; + + /** + * Encodes the specified TextSpan message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.TextSpan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {google.cloud.language.v1beta2.ITextSpan} message TextSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextSpan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextSpan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSpan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.TextSpan(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.content = reader.string(); + break; + } + case 2: { + message.beginOffset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextSpan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextSpan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextSpan message. + * @function verify + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextSpan.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + if (!$util.isInteger(message.beginOffset)) + return "beginOffset: integer expected"; + return null; + }; + + /** + * Creates a TextSpan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.TextSpan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan + */ + TextSpan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.TextSpan) + return object; + var message = new $root.google.cloud.language.v1beta2.TextSpan(); + if (object.content != null) + message.content = String(object.content); + if (object.beginOffset != null) + message.beginOffset = object.beginOffset | 0; + return message; + }; + + /** + * Creates a plain object from a TextSpan message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1beta2.DependencyEdge + * @memberof google.cloud.language.v1beta2.TextSpan * @static - * @param {google.cloud.language.v1beta2.DependencyEdge} message DependencyEdge + * @param {google.cloud.language.v1beta2.TextSpan} message TextSpan * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DependencyEdge.toObject = function toObject(message, options) { + TextSpan.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.headTokenIndex = 0; - object.label = options.enums === String ? "UNKNOWN" : 0; + object.content = ""; + object.beginOffset = 0; } - if (message.headTokenIndex != null && message.hasOwnProperty("headTokenIndex")) - object.headTokenIndex = message.headTokenIndex; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.cloud.language.v1beta2.DependencyEdge.Label[message.label] : message.label; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) + object.beginOffset = message.beginOffset; return object; }; /** - * Converts this DependencyEdge to JSON. + * Converts this TextSpan to JSON. * @function toJSON - * @memberof google.cloud.language.v1beta2.DependencyEdge + * @memberof google.cloud.language.v1beta2.TextSpan * @instance * @returns {Object.} JSON object */ - DependencyEdge.prototype.toJSON = function toJSON() { + TextSpan.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DependencyEdge + * Gets the default type url for TextSpan * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.DependencyEdge + * @memberof google.cloud.language.v1beta2.TextSpan * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DependencyEdge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TextSpan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1beta2.DependencyEdge"; + return typeUrlPrefix + "/google.cloud.language.v1beta2.TextSpan"; }; - /** - * Label enum. - * @name google.cloud.language.v1beta2.DependencyEdge.Label - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} ABBREV=1 ABBREV value - * @property {number} ACOMP=2 ACOMP value - * @property {number} ADVCL=3 ADVCL value - * @property {number} ADVMOD=4 ADVMOD value - * @property {number} AMOD=5 AMOD value - * @property {number} APPOS=6 APPOS value - * @property {number} ATTR=7 ATTR value - * @property {number} AUX=8 AUX value - * @property {number} AUXPASS=9 AUXPASS value - * @property {number} CC=10 CC value - * @property {number} CCOMP=11 CCOMP value - * @property {number} CONJ=12 CONJ value - * @property {number} CSUBJ=13 CSUBJ value - * @property {number} CSUBJPASS=14 CSUBJPASS value - * @property {number} DEP=15 DEP value - * @property {number} DET=16 DET value - * @property {number} DISCOURSE=17 DISCOURSE value - * @property {number} DOBJ=18 DOBJ value - * @property {number} EXPL=19 EXPL value - * @property {number} GOESWITH=20 GOESWITH value - * @property {number} IOBJ=21 IOBJ value - * @property {number} MARK=22 MARK value - * @property {number} MWE=23 MWE value - * @property {number} MWV=24 MWV value - * @property {number} NEG=25 NEG value - * @property {number} NN=26 NN value - * @property {number} NPADVMOD=27 NPADVMOD value - * @property {number} NSUBJ=28 NSUBJ value - * @property {number} NSUBJPASS=29 NSUBJPASS value - * @property {number} NUM=30 NUM value - * @property {number} NUMBER=31 NUMBER value - * @property {number} P=32 P value - * @property {number} PARATAXIS=33 PARATAXIS value - * @property {number} PARTMOD=34 PARTMOD value - * @property {number} PCOMP=35 PCOMP value - * @property {number} POBJ=36 POBJ value - * @property {number} POSS=37 POSS value - * @property {number} POSTNEG=38 POSTNEG value - * @property {number} PRECOMP=39 PRECOMP value - * @property {number} PRECONJ=40 PRECONJ value - * @property {number} PREDET=41 PREDET value - * @property {number} PREF=42 PREF value - * @property {number} PREP=43 PREP value - * @property {number} PRONL=44 PRONL value - * @property {number} PRT=45 PRT value - * @property {number} PS=46 PS value - * @property {number} QUANTMOD=47 QUANTMOD value - * @property {number} RCMOD=48 RCMOD value - * @property {number} RCMODREL=49 RCMODREL value - * @property {number} RDROP=50 RDROP value - * @property {number} REF=51 REF value - * @property {number} REMNANT=52 REMNANT value - * @property {number} REPARANDUM=53 REPARANDUM value - * @property {number} ROOT=54 ROOT value - * @property {number} SNUM=55 SNUM value - * @property {number} SUFF=56 SUFF value - * @property {number} TMOD=57 TMOD value - * @property {number} TOPIC=58 TOPIC value - * @property {number} VMOD=59 VMOD value - * @property {number} VOCATIVE=60 VOCATIVE value - * @property {number} XCOMP=61 XCOMP value - * @property {number} SUFFIX=62 SUFFIX value - * @property {number} TITLE=63 TITLE value - * @property {number} ADVPHMOD=64 ADVPHMOD value - * @property {number} AUXCAUS=65 AUXCAUS value - * @property {number} AUXVV=66 AUXVV value - * @property {number} DTMOD=67 DTMOD value - * @property {number} FOREIGN=68 FOREIGN value - * @property {number} KW=69 KW value - * @property {number} LIST=70 LIST value - * @property {number} NOMC=71 NOMC value - * @property {number} NOMCSUBJ=72 NOMCSUBJ value - * @property {number} NOMCSUBJPASS=73 NOMCSUBJPASS value - * @property {number} NUMC=74 NUMC value - * @property {number} COP=75 COP value - * @property {number} DISLOCATED=76 DISLOCATED value - * @property {number} ASP=77 ASP value - * @property {number} GMOD=78 GMOD value - * @property {number} GOBJ=79 GOBJ value - * @property {number} INFMOD=80 INFMOD value - * @property {number} MES=81 MES value - * @property {number} NCOMP=82 NCOMP value - */ - DependencyEdge.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "ABBREV"] = 1; - values[valuesById[2] = "ACOMP"] = 2; - values[valuesById[3] = "ADVCL"] = 3; - values[valuesById[4] = "ADVMOD"] = 4; - values[valuesById[5] = "AMOD"] = 5; - values[valuesById[6] = "APPOS"] = 6; - values[valuesById[7] = "ATTR"] = 7; - values[valuesById[8] = "AUX"] = 8; - values[valuesById[9] = "AUXPASS"] = 9; - values[valuesById[10] = "CC"] = 10; - values[valuesById[11] = "CCOMP"] = 11; - values[valuesById[12] = "CONJ"] = 12; - values[valuesById[13] = "CSUBJ"] = 13; - values[valuesById[14] = "CSUBJPASS"] = 14; - values[valuesById[15] = "DEP"] = 15; - values[valuesById[16] = "DET"] = 16; - values[valuesById[17] = "DISCOURSE"] = 17; - values[valuesById[18] = "DOBJ"] = 18; - values[valuesById[19] = "EXPL"] = 19; - values[valuesById[20] = "GOESWITH"] = 20; - values[valuesById[21] = "IOBJ"] = 21; - values[valuesById[22] = "MARK"] = 22; - values[valuesById[23] = "MWE"] = 23; - values[valuesById[24] = "MWV"] = 24; - values[valuesById[25] = "NEG"] = 25; - values[valuesById[26] = "NN"] = 26; - values[valuesById[27] = "NPADVMOD"] = 27; - values[valuesById[28] = "NSUBJ"] = 28; - values[valuesById[29] = "NSUBJPASS"] = 29; - values[valuesById[30] = "NUM"] = 30; - values[valuesById[31] = "NUMBER"] = 31; - values[valuesById[32] = "P"] = 32; - values[valuesById[33] = "PARATAXIS"] = 33; - values[valuesById[34] = "PARTMOD"] = 34; - values[valuesById[35] = "PCOMP"] = 35; - values[valuesById[36] = "POBJ"] = 36; - values[valuesById[37] = "POSS"] = 37; - values[valuesById[38] = "POSTNEG"] = 38; - values[valuesById[39] = "PRECOMP"] = 39; - values[valuesById[40] = "PRECONJ"] = 40; - values[valuesById[41] = "PREDET"] = 41; - values[valuesById[42] = "PREF"] = 42; - values[valuesById[43] = "PREP"] = 43; - values[valuesById[44] = "PRONL"] = 44; - values[valuesById[45] = "PRT"] = 45; - values[valuesById[46] = "PS"] = 46; - values[valuesById[47] = "QUANTMOD"] = 47; - values[valuesById[48] = "RCMOD"] = 48; - values[valuesById[49] = "RCMODREL"] = 49; - values[valuesById[50] = "RDROP"] = 50; - values[valuesById[51] = "REF"] = 51; - values[valuesById[52] = "REMNANT"] = 52; - values[valuesById[53] = "REPARANDUM"] = 53; - values[valuesById[54] = "ROOT"] = 54; - values[valuesById[55] = "SNUM"] = 55; - values[valuesById[56] = "SUFF"] = 56; - values[valuesById[57] = "TMOD"] = 57; - values[valuesById[58] = "TOPIC"] = 58; - values[valuesById[59] = "VMOD"] = 59; - values[valuesById[60] = "VOCATIVE"] = 60; - values[valuesById[61] = "XCOMP"] = 61; - values[valuesById[62] = "SUFFIX"] = 62; - values[valuesById[63] = "TITLE"] = 63; - values[valuesById[64] = "ADVPHMOD"] = 64; - values[valuesById[65] = "AUXCAUS"] = 65; - values[valuesById[66] = "AUXVV"] = 66; - values[valuesById[67] = "DTMOD"] = 67; - values[valuesById[68] = "FOREIGN"] = 68; - values[valuesById[69] = "KW"] = 69; - values[valuesById[70] = "LIST"] = 70; - values[valuesById[71] = "NOMC"] = 71; - values[valuesById[72] = "NOMCSUBJ"] = 72; - values[valuesById[73] = "NOMCSUBJPASS"] = 73; - values[valuesById[74] = "NUMC"] = 74; - values[valuesById[75] = "COP"] = 75; - values[valuesById[76] = "DISLOCATED"] = 76; - values[valuesById[77] = "ASP"] = 77; - values[valuesById[78] = "GMOD"] = 78; - values[valuesById[79] = "GOBJ"] = 79; - values[valuesById[80] = "INFMOD"] = 80; - values[valuesById[81] = "MES"] = 81; - values[valuesById[82] = "NCOMP"] = 82; - return values; - })(); - - return DependencyEdge; + return TextSpan; })(); - v1beta2.EntityMention = (function() { + v1beta2.ClassificationCategory = (function() { /** - * Properties of an EntityMention. + * Properties of a ClassificationCategory. * @memberof google.cloud.language.v1beta2 - * @interface IEntityMention - * @property {google.cloud.language.v1beta2.ITextSpan|null} [text] EntityMention text - * @property {google.cloud.language.v1beta2.EntityMention.Type|null} [type] EntityMention type - * @property {google.cloud.language.v1beta2.ISentiment|null} [sentiment] EntityMention sentiment + * @interface IClassificationCategory + * @property {string|null} [name] ClassificationCategory name + * @property {number|null} [confidence] ClassificationCategory confidence */ /** - * Constructs a new EntityMention. + * Constructs a new ClassificationCategory. * @memberof google.cloud.language.v1beta2 - * @classdesc Represents an EntityMention. - * @implements IEntityMention + * @classdesc Represents a ClassificationCategory. + * @implements IClassificationCategory * @constructor - * @param {google.cloud.language.v1beta2.IEntityMention=} [properties] Properties to set + * @param {google.cloud.language.v1beta2.IClassificationCategory=} [properties] Properties to set */ - function EntityMention(properties) { + function ClassificationCategory(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12018,103 +13349,89 @@ } /** - * EntityMention text. - * @member {google.cloud.language.v1beta2.ITextSpan|null|undefined} text - * @memberof google.cloud.language.v1beta2.EntityMention - * @instance - */ - EntityMention.prototype.text = null; - - /** - * EntityMention type. - * @member {google.cloud.language.v1beta2.EntityMention.Type} type - * @memberof google.cloud.language.v1beta2.EntityMention + * ClassificationCategory name. + * @member {string} name + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @instance */ - EntityMention.prototype.type = 0; + ClassificationCategory.prototype.name = ""; /** - * EntityMention sentiment. - * @member {google.cloud.language.v1beta2.ISentiment|null|undefined} sentiment - * @memberof google.cloud.language.v1beta2.EntityMention + * ClassificationCategory confidence. + * @member {number} confidence + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @instance */ - EntityMention.prototype.sentiment = null; + ClassificationCategory.prototype.confidence = 0; /** - * Creates a new EntityMention instance using the specified properties. + * Creates a new ClassificationCategory instance using the specified properties. * @function create - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @static - * @param {google.cloud.language.v1beta2.IEntityMention=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention instance + * @param {google.cloud.language.v1beta2.IClassificationCategory=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory instance */ - EntityMention.create = function create(properties) { - return new EntityMention(properties); + ClassificationCategory.create = function create(properties) { + return new ClassificationCategory(properties); }; /** - * Encodes the specified EntityMention message. Does not implicitly {@link google.cloud.language.v1beta2.EntityMention.verify|verify} messages. + * Encodes the specified ClassificationCategory message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationCategory.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @static - * @param {google.cloud.language.v1beta2.IEntityMention} message EntityMention message or plain object to encode + * @param {google.cloud.language.v1beta2.IClassificationCategory} message ClassificationCategory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityMention.encode = function encode(message, writer) { + ClassificationCategory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.language.v1beta2.TextSpan.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) - $root.google.cloud.language.v1beta2.Sentiment.encode(message.sentiment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); return writer; }; /** - * Encodes the specified EntityMention message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.EntityMention.verify|verify} messages. + * Encodes the specified ClassificationCategory message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationCategory.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @static - * @param {google.cloud.language.v1beta2.IEntityMention} message EntityMention message or plain object to encode + * @param {google.cloud.language.v1beta2.IClassificationCategory} message ClassificationCategory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityMention.encodeDelimited = function encodeDelimited(message, writer) { + ClassificationCategory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EntityMention message from the specified reader or buffer. + * Decodes a ClassificationCategory message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention + * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityMention.decode = function decode(reader, length) { + ClassificationCategory.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.EntityMention(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.ClassificationCategory(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.text = $root.google.cloud.language.v1beta2.TextSpan.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.type = reader.int32(); - break; - } - case 3: { - message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.decode(reader, reader.uint32()); + message.confidence = reader.float(); break; } default: @@ -12126,184 +13443,132 @@ }; /** - * Decodes an EntityMention message from the specified reader or buffer, length delimited. + * Decodes a ClassificationCategory message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention + * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityMention.decodeDelimited = function decodeDelimited(reader) { + ClassificationCategory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EntityMention message. + * Verifies a ClassificationCategory message. * @function verify - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EntityMention.verify = function verify(message) { + ClassificationCategory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - var error = $root.google.cloud.language.v1beta2.TextSpan.verify(message.text); - if (error) - return "text." + error; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sentiment != null && message.hasOwnProperty("sentiment")) { - var error = $root.google.cloud.language.v1beta2.Sentiment.verify(message.sentiment); - if (error) - return "sentiment." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates an EntityMention message from a plain object. Also converts values to their respective internal types. + * Creates a ClassificationCategory message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.EntityMention} EntityMention + * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory */ - EntityMention.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.EntityMention) + ClassificationCategory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.ClassificationCategory) return object; - var message = new $root.google.cloud.language.v1beta2.EntityMention(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.language.v1beta2.EntityMention.text: object expected"); - message.text = $root.google.cloud.language.v1beta2.TextSpan.fromObject(object.text); - } - switch (object.type) { - case "TYPE_UNKNOWN": - case 0: - message.type = 0; - break; - case "PROPER": - case 1: - message.type = 1; - break; - case "COMMON": - case 2: - message.type = 2; - break; - } - if (object.sentiment != null) { - if (typeof object.sentiment !== "object") - throw TypeError(".google.cloud.language.v1beta2.EntityMention.sentiment: object expected"); - message.sentiment = $root.google.cloud.language.v1beta2.Sentiment.fromObject(object.sentiment); - } + var message = new $root.google.cloud.language.v1beta2.ClassificationCategory(); + if (object.name != null) + message.name = String(object.name); + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from an EntityMention message. Also converts values to other types if specified. + * Creates a plain object from a ClassificationCategory message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @static - * @param {google.cloud.language.v1beta2.EntityMention} message EntityMention + * @param {google.cloud.language.v1beta2.ClassificationCategory} message ClassificationCategory * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntityMention.toObject = function toObject(message, options) { + ClassificationCategory.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.text = null; - object.type = options.enums === String ? "TYPE_UNKNOWN" : 0; - object.sentiment = null; + object.name = ""; + object.confidence = 0; } - if (message.text != null && message.hasOwnProperty("text")) - object.text = $root.google.cloud.language.v1beta2.TextSpan.toObject(message.text, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.language.v1beta2.EntityMention.Type[message.type] : message.type; - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - object.sentiment = $root.google.cloud.language.v1beta2.Sentiment.toObject(message.sentiment, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; }; /** - * Converts this EntityMention to JSON. + * Converts this ClassificationCategory to JSON. * @function toJSON - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @instance * @returns {Object.} JSON object */ - EntityMention.prototype.toJSON = function toJSON() { + ClassificationCategory.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EntityMention + * Gets the default type url for ClassificationCategory * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.EntityMention + * @memberof google.cloud.language.v1beta2.ClassificationCategory * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EntityMention.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClassificationCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1beta2.EntityMention"; + return typeUrlPrefix + "/google.cloud.language.v1beta2.ClassificationCategory"; }; - /** - * Type enum. - * @name google.cloud.language.v1beta2.EntityMention.Type - * @enum {number} - * @property {number} TYPE_UNKNOWN=0 TYPE_UNKNOWN value - * @property {number} PROPER=1 PROPER value - * @property {number} COMMON=2 COMMON value - */ - EntityMention.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "PROPER"] = 1; - values[valuesById[2] = "COMMON"] = 2; - return values; - })(); - - return EntityMention; + return ClassificationCategory; })(); - v1beta2.TextSpan = (function() { + v1beta2.ClassificationModelOptions = (function() { /** - * Properties of a TextSpan. + * Properties of a ClassificationModelOptions. * @memberof google.cloud.language.v1beta2 - * @interface ITextSpan - * @property {string|null} [content] TextSpan content - * @property {number|null} [beginOffset] TextSpan beginOffset + * @interface IClassificationModelOptions + * @property {google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model|null} [v1Model] ClassificationModelOptions v1Model + * @property {google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model|null} [v2Model] ClassificationModelOptions v2Model */ /** - * Constructs a new TextSpan. + * Constructs a new ClassificationModelOptions. * @memberof google.cloud.language.v1beta2 - * @classdesc Represents a TextSpan. - * @implements ITextSpan + * @classdesc Represents a ClassificationModelOptions. + * @implements IClassificationModelOptions * @constructor - * @param {google.cloud.language.v1beta2.ITextSpan=} [properties] Properties to set + * @param {google.cloud.language.v1beta2.IClassificationModelOptions=} [properties] Properties to set */ - function TextSpan(properties) { + function ClassificationModelOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12311,89 +13576,103 @@ } /** - * TextSpan content. - * @member {string} content - * @memberof google.cloud.language.v1beta2.TextSpan + * ClassificationModelOptions v1Model. + * @member {google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model|null|undefined} v1Model + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @instance */ - TextSpan.prototype.content = ""; + ClassificationModelOptions.prototype.v1Model = null; /** - * TextSpan beginOffset. - * @member {number} beginOffset - * @memberof google.cloud.language.v1beta2.TextSpan + * ClassificationModelOptions v2Model. + * @member {google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model|null|undefined} v2Model + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @instance */ - TextSpan.prototype.beginOffset = 0; + ClassificationModelOptions.prototype.v2Model = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new TextSpan instance using the specified properties. + * ClassificationModelOptions modelType. + * @member {"v1Model"|"v2Model"|undefined} modelType + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions + * @instance + */ + Object.defineProperty(ClassificationModelOptions.prototype, "modelType", { + get: $util.oneOfGetter($oneOfFields = ["v1Model", "v2Model"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ClassificationModelOptions instance using the specified properties. * @function create - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @static - * @param {google.cloud.language.v1beta2.ITextSpan=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan instance + * @param {google.cloud.language.v1beta2.IClassificationModelOptions=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions} ClassificationModelOptions instance */ - TextSpan.create = function create(properties) { - return new TextSpan(properties); + ClassificationModelOptions.create = function create(properties) { + return new ClassificationModelOptions(properties); }; /** - * Encodes the specified TextSpan message. Does not implicitly {@link google.cloud.language.v1beta2.TextSpan.verify|verify} messages. + * Encodes the specified ClassificationModelOptions message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @static - * @param {google.cloud.language.v1beta2.ITextSpan} message TextSpan message or plain object to encode + * @param {google.cloud.language.v1beta2.IClassificationModelOptions} message ClassificationModelOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSpan.encode = function encode(message, writer) { + ClassificationModelOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.beginOffset != null && Object.hasOwnProperty.call(message, "beginOffset")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.beginOffset); + if (message.v1Model != null && Object.hasOwnProperty.call(message, "v1Model")) + $root.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model.encode(message.v1Model, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.v2Model != null && Object.hasOwnProperty.call(message, "v2Model")) + $root.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.encode(message.v2Model, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextSpan message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.TextSpan.verify|verify} messages. + * Encodes the specified ClassificationModelOptions message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @static - * @param {google.cloud.language.v1beta2.ITextSpan} message TextSpan message or plain object to encode + * @param {google.cloud.language.v1beta2.IClassificationModelOptions} message ClassificationModelOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextSpan.encodeDelimited = function encodeDelimited(message, writer) { + ClassificationModelOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextSpan message from the specified reader or buffer. + * Decodes a ClassificationModelOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions} ClassificationModelOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSpan.decode = function decode(reader, length) { + ClassificationModelOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.TextSpan(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.ClassificationModelOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.content = reader.string(); + message.v1Model = $root.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model.decode(reader, reader.uint32()); break; } case 2: { - message.beginOffset = reader.int32(); + message.v2Model = $root.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.decode(reader, reader.uint32()); break; } default: @@ -12405,338 +13684,544 @@ }; /** - * Decodes a TextSpan message from the specified reader or buffer, length delimited. + * Decodes a ClassificationModelOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions} ClassificationModelOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextSpan.decodeDelimited = function decodeDelimited(reader) { + ClassificationModelOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextSpan message. + * Verifies a ClassificationModelOptions message. * @function verify - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextSpan.verify = function verify(message) { + ClassificationModelOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) - if (!$util.isInteger(message.beginOffset)) - return "beginOffset: integer expected"; + var properties = {}; + if (message.v1Model != null && message.hasOwnProperty("v1Model")) { + properties.modelType = 1; + { + var error = $root.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model.verify(message.v1Model); + if (error) + return "v1Model." + error; + } + } + if (message.v2Model != null && message.hasOwnProperty("v2Model")) { + if (properties.modelType === 1) + return "modelType: multiple values"; + properties.modelType = 1; + { + var error = $root.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.verify(message.v2Model); + if (error) + return "v2Model." + error; + } + } return null; }; /** - * Creates a TextSpan message from a plain object. Also converts values to their respective internal types. + * Creates a ClassificationModelOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.TextSpan} TextSpan + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions} ClassificationModelOptions */ - TextSpan.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.TextSpan) + ClassificationModelOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.ClassificationModelOptions) return object; - var message = new $root.google.cloud.language.v1beta2.TextSpan(); - if (object.content != null) - message.content = String(object.content); - if (object.beginOffset != null) - message.beginOffset = object.beginOffset | 0; + var message = new $root.google.cloud.language.v1beta2.ClassificationModelOptions(); + if (object.v1Model != null) { + if (typeof object.v1Model !== "object") + throw TypeError(".google.cloud.language.v1beta2.ClassificationModelOptions.v1Model: object expected"); + message.v1Model = $root.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model.fromObject(object.v1Model); + } + if (object.v2Model != null) { + if (typeof object.v2Model !== "object") + throw TypeError(".google.cloud.language.v1beta2.ClassificationModelOptions.v2Model: object expected"); + message.v2Model = $root.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.fromObject(object.v2Model); + } return message; }; /** - * Creates a plain object from a TextSpan message. Also converts values to other types if specified. + * Creates a plain object from a ClassificationModelOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @static - * @param {google.cloud.language.v1beta2.TextSpan} message TextSpan + * @param {google.cloud.language.v1beta2.ClassificationModelOptions} message ClassificationModelOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextSpan.toObject = function toObject(message, options) { + ClassificationModelOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.content = ""; - object.beginOffset = 0; + if (message.v1Model != null && message.hasOwnProperty("v1Model")) { + object.v1Model = $root.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model.toObject(message.v1Model, options); + if (options.oneofs) + object.modelType = "v1Model"; + } + if (message.v2Model != null && message.hasOwnProperty("v2Model")) { + object.v2Model = $root.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.toObject(message.v2Model, options); + if (options.oneofs) + object.modelType = "v2Model"; } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.beginOffset != null && message.hasOwnProperty("beginOffset")) - object.beginOffset = message.beginOffset; return object; }; /** - * Converts this TextSpan to JSON. + * Converts this ClassificationModelOptions to JSON. * @function toJSON - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @instance * @returns {Object.} JSON object */ - TextSpan.prototype.toJSON = function toJSON() { + ClassificationModelOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TextSpan + * Gets the default type url for ClassificationModelOptions * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.TextSpan + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TextSpan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClassificationModelOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.language.v1beta2.TextSpan"; + return typeUrlPrefix + "/google.cloud.language.v1beta2.ClassificationModelOptions"; }; - return TextSpan; - })(); + ClassificationModelOptions.V1Model = (function() { - v1beta2.ClassificationCategory = (function() { + /** + * Properties of a V1Model. + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions + * @interface IV1Model + */ - /** - * Properties of a ClassificationCategory. - * @memberof google.cloud.language.v1beta2 - * @interface IClassificationCategory - * @property {string|null} [name] ClassificationCategory name - * @property {number|null} [confidence] ClassificationCategory confidence - */ + /** + * Constructs a new V1Model. + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions + * @classdesc Represents a V1Model. + * @implements IV1Model + * @constructor + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model=} [properties] Properties to set + */ + function V1Model(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ClassificationCategory. - * @memberof google.cloud.language.v1beta2 - * @classdesc Represents a ClassificationCategory. - * @implements IClassificationCategory - * @constructor - * @param {google.cloud.language.v1beta2.IClassificationCategory=} [properties] Properties to set - */ - function ClassificationCategory(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new V1Model instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @static + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions.V1Model} V1Model instance + */ + V1Model.create = function create(properties) { + return new V1Model(properties); + }; - /** - * ClassificationCategory name. - * @member {string} name - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @instance - */ - ClassificationCategory.prototype.name = ""; + /** + * Encodes the specified V1Model message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.V1Model.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @static + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model} message V1Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + V1Model.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * ClassificationCategory confidence. - * @member {number} confidence - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @instance - */ - ClassificationCategory.prototype.confidence = 0; + /** + * Encodes the specified V1Model message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.V1Model.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @static + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.IV1Model} message V1Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + V1Model.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new ClassificationCategory instance using the specified properties. - * @function create - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @static - * @param {google.cloud.language.v1beta2.IClassificationCategory=} [properties] Properties to set - * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory instance - */ - ClassificationCategory.create = function create(properties) { - return new ClassificationCategory(properties); - }; + /** + * Decodes a V1Model message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions.V1Model} V1Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + V1Model.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ClassificationCategory message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationCategory.verify|verify} messages. - * @function encode - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @static - * @param {google.cloud.language.v1beta2.IClassificationCategory} message ClassificationCategory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClassificationCategory.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); - return writer; - }; + /** + * Decodes a V1Model message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions.V1Model} V1Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + V1Model.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ClassificationCategory message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationCategory.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @static - * @param {google.cloud.language.v1beta2.IClassificationCategory} message ClassificationCategory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClassificationCategory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a V1Model message. + * @function verify + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + V1Model.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a V1Model message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions.V1Model} V1Model + */ + V1Model.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model) + return object; + return new $root.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model(); + }; + + /** + * Creates a plain object from a V1Model message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @static + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.V1Model} message V1Model + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + V1Model.toObject = function toObject() { + return {}; + }; + + /** + * Converts this V1Model to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @instance + * @returns {Object.} JSON object + */ + V1Model.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for V1Model + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + V1Model.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.ClassificationModelOptions.V1Model"; + }; + + return V1Model; + })(); + + ClassificationModelOptions.V2Model = (function() { + + /** + * Properties of a V2Model. + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions + * @interface IV2Model + * @property {google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion|null} [contentCategoriesVersion] V2Model contentCategoriesVersion + */ + + /** + * Constructs a new V2Model. + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions + * @classdesc Represents a V2Model. + * @implements IV2Model + * @constructor + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model=} [properties] Properties to set + */ + function V2Model(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * V2Model contentCategoriesVersion. + * @member {google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion} contentCategoriesVersion + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @instance + */ + V2Model.prototype.contentCategoriesVersion = 0; + + /** + * Creates a new V2Model instance using the specified properties. + * @function create + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @static + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model=} [properties] Properties to set + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions.V2Model} V2Model instance + */ + V2Model.create = function create(properties) { + return new V2Model(properties); + }; + + /** + * Encodes the specified V2Model message. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.verify|verify} messages. + * @function encode + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @static + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model} message V2Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + V2Model.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contentCategoriesVersion != null && Object.hasOwnProperty.call(message, "contentCategoriesVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.contentCategoriesVersion); + return writer; + }; - /** - * Decodes a ClassificationCategory message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClassificationCategory.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.ClassificationCategory(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + /** + * Encodes the specified V2Model message, length delimited. Does not implicitly {@link google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @static + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.IV2Model} message V2Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + V2Model.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a V2Model message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions.V2Model} V2Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + V2Model.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.contentCategoriesVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - case 2: { - message.confidence = reader.float(); + } + return message; + }; + + /** + * Decodes a V2Model message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions.V2Model} V2Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + V2Model.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a V2Model message. + * @function verify + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + V2Model.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contentCategoriesVersion != null && message.hasOwnProperty("contentCategoriesVersion")) + switch (message.contentCategoriesVersion) { + default: + return "contentCategoriesVersion: enum value expected"; + case 0: + case 1: + case 2: break; } - default: - reader.skipType(tag & 7); + return null; + }; + + /** + * Creates a V2Model message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.language.v1beta2.ClassificationModelOptions.V2Model} V2Model + */ + V2Model.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model) + return object; + var message = new $root.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model(); + switch (object.contentCategoriesVersion) { + case "CONTENT_CATEGORIES_VERSION_UNSPECIFIED": + case 0: + message.contentCategoriesVersion = 0; + break; + case "V1": + case 1: + message.contentCategoriesVersion = 1; + break; + case "V2": + case 2: + message.contentCategoriesVersion = 2; break; } - } - return message; - }; - - /** - * Decodes a ClassificationCategory message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClassificationCategory.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClassificationCategory message. - * @function verify - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClassificationCategory.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - return null; - }; + return message; + }; - /** - * Creates a ClassificationCategory message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.language.v1beta2.ClassificationCategory} ClassificationCategory - */ - ClassificationCategory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.language.v1beta2.ClassificationCategory) + /** + * Creates a plain object from a V2Model message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @static + * @param {google.cloud.language.v1beta2.ClassificationModelOptions.V2Model} message V2Model + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + V2Model.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.contentCategoriesVersion = options.enums === String ? "CONTENT_CATEGORIES_VERSION_UNSPECIFIED" : 0; + if (message.contentCategoriesVersion != null && message.hasOwnProperty("contentCategoriesVersion")) + object.contentCategoriesVersion = options.enums === String ? $root.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion[message.contentCategoriesVersion] : message.contentCategoriesVersion; return object; - var message = new $root.google.cloud.language.v1beta2.ClassificationCategory(); - if (object.name != null) - message.name = String(object.name); - if (object.confidence != null) - message.confidence = Number(object.confidence); - return message; - }; + }; - /** - * Creates a plain object from a ClassificationCategory message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @static - * @param {google.cloud.language.v1beta2.ClassificationCategory} message ClassificationCategory - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClassificationCategory.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.confidence = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - return object; - }; + /** + * Converts this V2Model to JSON. + * @function toJSON + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @instance + * @returns {Object.} JSON object + */ + V2Model.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ClassificationCategory to JSON. - * @function toJSON - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @instance - * @returns {Object.} JSON object - */ - ClassificationCategory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for V2Model + * @function getTypeUrl + * @memberof google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + V2Model.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.language.v1beta2.ClassificationModelOptions.V2Model"; + }; - /** - * Gets the default type url for ClassificationCategory - * @function getTypeUrl - * @memberof google.cloud.language.v1beta2.ClassificationCategory - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClassificationCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.language.v1beta2.ClassificationCategory"; - }; + /** + * ContentCategoriesVersion enum. + * @name google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion + * @enum {number} + * @property {number} CONTENT_CATEGORIES_VERSION_UNSPECIFIED=0 CONTENT_CATEGORIES_VERSION_UNSPECIFIED value + * @property {number} V1=1 V1 value + * @property {number} V2=2 V2 value + */ + V2Model.ContentCategoriesVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_CATEGORIES_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "V1"] = 1; + values[valuesById[2] = "V2"] = 2; + return values; + })(); + + return V2Model; + })(); - return ClassificationCategory; + return ClassificationModelOptions; })(); v1beta2.AnalyzeSentimentRequest = (function() { @@ -14832,6 +16317,7 @@ * @memberof google.cloud.language.v1beta2 * @interface IClassifyTextRequest * @property {google.cloud.language.v1beta2.IDocument|null} [document] ClassifyTextRequest document + * @property {google.cloud.language.v1beta2.IClassificationModelOptions|null} [classificationModelOptions] ClassifyTextRequest classificationModelOptions */ /** @@ -14857,6 +16343,14 @@ */ ClassifyTextRequest.prototype.document = null; + /** + * ClassifyTextRequest classificationModelOptions. + * @member {google.cloud.language.v1beta2.IClassificationModelOptions|null|undefined} classificationModelOptions + * @memberof google.cloud.language.v1beta2.ClassifyTextRequest + * @instance + */ + ClassifyTextRequest.prototype.classificationModelOptions = null; + /** * Creates a new ClassifyTextRequest instance using the specified properties. * @function create @@ -14883,6 +16377,8 @@ writer = $Writer.create(); if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.language.v1beta2.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.classificationModelOptions != null && Object.hasOwnProperty.call(message, "classificationModelOptions")) + $root.google.cloud.language.v1beta2.ClassificationModelOptions.encode(message.classificationModelOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -14921,6 +16417,10 @@ message.document = $root.google.cloud.language.v1beta2.Document.decode(reader, reader.uint32()); break; } + case 3: { + message.classificationModelOptions = $root.google.cloud.language.v1beta2.ClassificationModelOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14961,6 +16461,11 @@ if (error) return "document." + error; } + if (message.classificationModelOptions != null && message.hasOwnProperty("classificationModelOptions")) { + var error = $root.google.cloud.language.v1beta2.ClassificationModelOptions.verify(message.classificationModelOptions); + if (error) + return "classificationModelOptions." + error; + } return null; }; @@ -14981,6 +16486,11 @@ throw TypeError(".google.cloud.language.v1beta2.ClassifyTextRequest.document: object expected"); message.document = $root.google.cloud.language.v1beta2.Document.fromObject(object.document); } + if (object.classificationModelOptions != null) { + if (typeof object.classificationModelOptions !== "object") + throw TypeError(".google.cloud.language.v1beta2.ClassifyTextRequest.classificationModelOptions: object expected"); + message.classificationModelOptions = $root.google.cloud.language.v1beta2.ClassificationModelOptions.fromObject(object.classificationModelOptions); + } return message; }; @@ -14997,10 +16507,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.document = null; + object.classificationModelOptions = null; + } if (message.document != null && message.hasOwnProperty("document")) object.document = $root.google.cloud.language.v1beta2.Document.toObject(message.document, options); + if (message.classificationModelOptions != null && message.hasOwnProperty("classificationModelOptions")) + object.classificationModelOptions = $root.google.cloud.language.v1beta2.ClassificationModelOptions.toObject(message.classificationModelOptions, options); return object; }; @@ -15548,6 +17062,7 @@ * @property {boolean|null} [extractDocumentSentiment] Features extractDocumentSentiment * @property {boolean|null} [extractEntitySentiment] Features extractEntitySentiment * @property {boolean|null} [classifyText] Features classifyText + * @property {google.cloud.language.v1beta2.IClassificationModelOptions|null} [classificationModelOptions] Features classificationModelOptions */ /** @@ -15605,6 +17120,14 @@ */ Features.prototype.classifyText = false; + /** + * Features classificationModelOptions. + * @member {google.cloud.language.v1beta2.IClassificationModelOptions|null|undefined} classificationModelOptions + * @memberof google.cloud.language.v1beta2.AnnotateTextRequest.Features + * @instance + */ + Features.prototype.classificationModelOptions = null; + /** * Creates a new Features instance using the specified properties. * @function create @@ -15639,6 +17162,8 @@ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.extractEntitySentiment); if (message.classifyText != null && Object.hasOwnProperty.call(message, "classifyText")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.classifyText); + if (message.classificationModelOptions != null && Object.hasOwnProperty.call(message, "classificationModelOptions")) + $root.google.cloud.language.v1beta2.ClassificationModelOptions.encode(message.classificationModelOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -15693,6 +17218,10 @@ message.classifyText = reader.bool(); break; } + case 10: { + message.classificationModelOptions = $root.google.cloud.language.v1beta2.ClassificationModelOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15743,6 +17272,11 @@ if (message.classifyText != null && message.hasOwnProperty("classifyText")) if (typeof message.classifyText !== "boolean") return "classifyText: boolean expected"; + if (message.classificationModelOptions != null && message.hasOwnProperty("classificationModelOptions")) { + var error = $root.google.cloud.language.v1beta2.ClassificationModelOptions.verify(message.classificationModelOptions); + if (error) + return "classificationModelOptions." + error; + } return null; }; @@ -15768,6 +17302,11 @@ message.extractEntitySentiment = Boolean(object.extractEntitySentiment); if (object.classifyText != null) message.classifyText = Boolean(object.classifyText); + if (object.classificationModelOptions != null) { + if (typeof object.classificationModelOptions !== "object") + throw TypeError(".google.cloud.language.v1beta2.AnnotateTextRequest.Features.classificationModelOptions: object expected"); + message.classificationModelOptions = $root.google.cloud.language.v1beta2.ClassificationModelOptions.fromObject(object.classificationModelOptions); + } return message; }; @@ -15790,6 +17329,7 @@ object.extractDocumentSentiment = false; object.extractEntitySentiment = false; object.classifyText = false; + object.classificationModelOptions = null; } if (message.extractSyntax != null && message.hasOwnProperty("extractSyntax")) object.extractSyntax = message.extractSyntax; @@ -15801,6 +17341,8 @@ object.extractEntitySentiment = message.extractEntitySentiment; if (message.classifyText != null && message.hasOwnProperty("classifyText")) object.classifyText = message.classifyText; + if (message.classificationModelOptions != null && message.hasOwnProperty("classificationModelOptions")) + object.classificationModelOptions = $root.google.cloud.language.v1beta2.ClassificationModelOptions.toObject(message.classificationModelOptions, options); return object; }; diff --git a/packages/google-cloud-language/protos/protos.json b/packages/google-cloud-language/protos/protos.json index 70a8291cf94..043713bcd1b 100644 --- a/packages/google-cloud-language/protos/protos.json +++ b/packages/google-cloud-language/protos/protos.json @@ -206,6 +206,14 @@ } } }, + "EncodingType": { + "values": { + "NONE": 0, + "UTF8": 1, + "UTF16": 2, + "UTF32": 3 + } + }, "Entity": { "fields": { "name": { @@ -255,14 +263,6 @@ } } }, - "EncodingType": { - "values": { - "NONE": 0, - "UTF8": 1, - "UTF16": 2, - "UTF32": 3 - } - }, "Token": { "fields": { "text": { @@ -629,6 +629,48 @@ } } }, + "ClassificationModelOptions": { + "oneofs": { + "modelType": { + "oneof": [ + "v1Model", + "v2Model" + ] + } + }, + "fields": { + "v1Model": { + "type": "V1Model", + "id": 1 + }, + "v2Model": { + "type": "V2Model", + "id": 2 + } + }, + "nested": { + "V1Model": { + "fields": {} + }, + "V2Model": { + "fields": { + "contentCategoriesVersion": { + "type": "ContentCategoriesVersion", + "id": 1 + } + }, + "nested": { + "ContentCategoriesVersion": { + "values": { + "CONTENT_CATEGORIES_VERSION_UNSPECIFIED": 0, + "V1": 1, + "V2": 2 + } + } + } + } + } + }, "AnalyzeSentimentRequest": { "fields": { "document": { @@ -758,6 +800,10 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "classificationModelOptions": { + "type": "ClassificationModelOptions", + "id": 3 } } }, @@ -813,6 +859,10 @@ "classifyText": { "type": "bool", "id": 6 + }, + "classificationModelOptions": { + "type": "ClassificationModelOptions", + "id": 10 } } } @@ -1028,6 +1078,14 @@ "language": { "type": "string", "id": 4 + }, + "referenceWebUri": { + "type": "string", + "id": 5 + }, + "boilerplateHandling": { + "type": "BoilerplateHandling", + "id": 6 } }, "nested": { @@ -1037,6 +1095,13 @@ "PLAIN_TEXT": 1, "HTML": 2 } + }, + "BoilerplateHandling": { + "values": { + "BOILERPLATE_HANDLING_UNSPECIFIED": 0, + "SKIP_BOILERPLATE": 1, + "KEEP_BOILERPLATE": 2 + } } } }, @@ -1052,6 +1117,14 @@ } } }, + "EncodingType": { + "values": { + "NONE": 0, + "UTF8": 1, + "UTF16": 2, + "UTF32": 3 + } + }, "Entity": { "fields": { "name": { @@ -1121,14 +1194,6 @@ } } }, - "EncodingType": { - "values": { - "NONE": 0, - "UTF8": 1, - "UTF16": 2, - "UTF32": 3 - } - }, "Sentiment": { "fields": { "magnitude": { @@ -1475,6 +1540,48 @@ } } }, + "ClassificationModelOptions": { + "oneofs": { + "modelType": { + "oneof": [ + "v1Model", + "v2Model" + ] + } + }, + "fields": { + "v1Model": { + "type": "V1Model", + "id": 1 + }, + "v2Model": { + "type": "V2Model", + "id": 2 + } + }, + "nested": { + "V1Model": { + "fields": {} + }, + "V2Model": { + "fields": { + "contentCategoriesVersion": { + "type": "ContentCategoriesVersion", + "id": 1 + } + }, + "nested": { + "ContentCategoriesVersion": { + "values": { + "CONTENT_CATEGORIES_VERSION_UNSPECIFIED": 0, + "V1": 1, + "V2": 2 + } + } + } + } + } + }, "AnalyzeSentimentRequest": { "fields": { "document": { @@ -1604,6 +1711,10 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "classificationModelOptions": { + "type": "ClassificationModelOptions", + "id": 3 } } }, @@ -1659,6 +1770,10 @@ "classifyText": { "type": "bool", "id": 6 + }, + "classificationModelOptions": { + "type": "ClassificationModelOptions", + "id": 10 } } } diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js index 5bc14a05ef7..6578ecf4a8c 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js @@ -29,7 +29,7 @@ function main(document) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Input document. + * Required. Input document. */ // const document = {} /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js index b005b23992c..f14643b689a 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js @@ -29,7 +29,7 @@ function main(document) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Input document. + * Required. Input document. */ // const document = {} /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js index cf8c1b63199..3f817360b1d 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js @@ -29,7 +29,7 @@ function main(document) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Input document. + * Required. Input document. */ // const document = {} /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js index 5d32c85b6b6..f820de1de1a 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js @@ -29,7 +29,7 @@ function main(document) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Input document. + * Required. Input document. */ // const document = {} /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js index b17c4a774d4..16819e379b2 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js @@ -29,11 +29,11 @@ function main(document, features) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Input document. + * Required. Input document. */ // const document = {} /** - * The enabled features. + * Required. The enabled features. */ // const features = {} /** diff --git a/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js index befda5943f4..3787a2664d4 100644 --- a/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js +++ b/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js @@ -29,9 +29,14 @@ function main(document) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Input document. + * Required. Input document. */ // const document = {} + /** + * Model options to use for classification. Defaults to v1 options if not + * specified. + */ + // const classificationModelOptions = {} // Imports the Language library const {LanguageServiceClient} = require('@google-cloud/language').v1; diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index 79fdbdeebee..d128f793d0e 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -198,7 +198,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 58, "type": "FULL" } ], @@ -210,6 +210,10 @@ { "name": "document", "type": ".google.cloud.language.v1.Document" + }, + { + "name": "classification_model_options", + "type": ".google.cloud.language.v1.ClassificationModelOptions" } ], "resultType": ".google.cloud.language.v1.ClassifyTextResponse", diff --git a/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js index cbb8e1e70a0..a5838919683 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js +++ b/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js @@ -32,6 +32,11 @@ function main(document) { * Required. Input document. */ // const document = {} + /** + * Model options to use for classification. Defaults to v1 options if not + * specified. + */ + // const classificationModelOptions = {} // Imports the Language library const {LanguageServiceClient} = require('@google-cloud/language').v1beta2; diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index 0a84af81ff7..5273ef9ed45 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -147,7 +147,7 @@ "regionTag": "language_v1beta2_generated_LanguageService_AnalyzeSyntax_async", "title": "LanguageService analyzeSyntax Sample", "origin": "API_DEFINITION", - "description": " Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part-of-speech tags, dependency trees, and other properties.", + "description": " Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.", "canonical": true, "file": "language_service.analyze_syntax.js", "language": "JAVASCRIPT", @@ -198,7 +198,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 58, "type": "FULL" } ], @@ -210,6 +210,10 @@ { "name": "document", "type": ".google.cloud.language.v1beta2.Document" + }, + { + "name": "classification_model_options", + "type": ".google.cloud.language.v1beta2.ClassificationModelOptions" } ], "resultType": ".google.cloud.language.v1beta2.ClassifyTextResponse", diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 04e488f1e98..d0890620d76 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -317,7 +317,7 @@ export class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.language.v1.Document} request.document - * Input document. + * Required. Input document. * @param {google.cloud.language.v1.EncodingType} request.encodingType * The encoding type used by the API to calculate sentence offsets. * @param {object} [options] @@ -408,7 +408,7 @@ export class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.language.v1.Document} request.document - * Input document. + * Required. Input document. * @param {google.cloud.language.v1.EncodingType} request.encodingType * The encoding type used by the API to calculate offsets. * @param {object} [options] @@ -492,13 +492,15 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeEntities(request, options, callback); } /** - * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. + * Finds entities, similar to + * {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} + * in the text and analyzes sentiment associated with each entity and its + * mentions. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.language.v1.Document} request.document - * Input document. + * Required. Input document. * @param {google.cloud.language.v1.EncodingType} request.encodingType * The encoding type used by the API to calculate offsets. * @param {object} [options] @@ -599,7 +601,7 @@ export class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.language.v1.Document} request.document - * Input document. + * Required. Input document. * @param {google.cloud.language.v1.EncodingType} request.encodingType * The encoding type used by the API to calculate offsets. * @param {object} [options] @@ -682,7 +684,10 @@ export class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.language.v1.Document} request.document - * Input document. + * Required. Input document. + * @param {google.cloud.language.v1.ClassificationModelOptions} request.classificationModelOptions + * Model options to use for classification. Defaults to v1 options if not + * specified. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -764,9 +769,9 @@ export class LanguageServiceClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.language.v1.Document} request.document - * Input document. + * Required. Input document. * @param {google.cloud.language.v1.AnnotateTextRequest.Features} request.features - * The enabled features. + * Required. The enabled features. * @param {google.cloud.language.v1.EncodingType} request.encodingType * The encoding type used by the API to calculate offsets. * @param {object} [options] diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index 56e2b76b802..9130aa8e1f3 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -594,7 +594,7 @@ export class LanguageServiceClient { } /** * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part-of-speech tags, dependency trees, and other + * tokenization along with part of speech tags, dependency trees, and other * properties. * * @param {Object} request @@ -690,6 +690,9 @@ export class LanguageServiceClient { * The request object that will be sent. * @param {google.cloud.language.v1beta2.Document} request.document * Required. Input document. + * @param {google.cloud.language.v1beta2.ClassificationModelOptions} request.classificationModelOptions + * Model options to use for classification. Defaults to v1 options if not + * specified. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. From 4f9d95231b458ac37731e64e95712ec6743d1c73 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 10:45:46 -0700 Subject: [PATCH 486/488] chore(main): release 5.1.0 (#692) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 5.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-language/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-language/package.json | 2 +- .../snippet_metadata.google.cloud.language.v1.json | 2 +- ...ippet_metadata.google.cloud.language.v1beta2.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index 8d21b0ceb40..a3d7c1cde0a 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [5.1.0](https://github.com/googleapis/nodejs-language/compare/v5.0.2...v5.1.0) (2022-09-21) + + +### Features + +* Add support for V1 and V2 classification models for the V1Beta2 API ([#697](https://github.com/googleapis/nodejs-language/issues/697)) ([3b87da3](https://github.com/googleapis/nodejs-language/commit/3b87da3a09e4d4fff02e235d3f1f70841906696d)) + + +### Bug Fixes + +* Preserve default values in x-goog-request-params header ([#691](https://github.com/googleapis/nodejs-language/issues/691)) ([b5a177d](https://github.com/googleapis/nodejs-language/commit/b5a177d9c6a82ef012ab18c463c796444a34fe1b)) + ## [5.0.2](https://github.com/googleapis/nodejs-language/compare/v5.0.1...v5.0.2) (2022-09-01) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index f9165e5d05d..8d5f8ebe163 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "5.0.2", + "version": "5.1.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index d128f793d0e..5fb5297d20c 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "5.0.2", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index 5273ef9ed45..98632a9b14c 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "5.0.2", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index ac3b46af053..1db523db50c 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^3.0.0", "mathjs": "^11.0.0", - "@google-cloud/language": "^5.0.2", + "@google-cloud/language": "^5.1.0", "@google-cloud/storage": "^6.0.0", "yargs": "^16.0.0" }, From ab070122b3b0136fb1d328e562073e6b2b0cf177 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 29 Sep 2022 00:48:19 +0000 Subject: [PATCH 487/488] docs: fix docstring formatting (#698) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 477248447 Source-Link: https://github.com/googleapis/googleapis/commit/4689c7380444972caf11fd1b96e7ec1f864b7dfb Source-Link: https://github.com/googleapis/googleapis-gen/commit/c4059786a5cd805a0151d95b477fbc486bcbcedc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQwNTk3ODZhNWNkODA1YTAxNTFkOTViNDc3ZmJjNDg2YmNiY2VkYyJ9 docs: fix docstring formatting Committer: @parthea PiperOrigin-RevId: 476410563 Source-Link: https://github.com/googleapis/googleapis/commit/7f579ee5968051f12c86a2ea50bcdeb1fbd5df94 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ae0240e097a196c070e15deaae66464b42c8e014 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWUwMjQwZTA5N2ExOTZjMDcwZTE1ZGVhYWU2NjQ2NGI0MmM4ZTAxNCJ9 --- .../cloud/language/v1/language_service.proto | 58 ++++++++----------- .../language/v1beta2/language_service.proto | 2 - .../src/v1/language_service_client.ts | 6 +- 3 files changed, 25 insertions(+), 41 deletions(-) diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index 06c68a27935..4dae89745bf 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,8 +34,7 @@ service LanguageService { "https://www.googleapis.com/auth/cloud-platform"; // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) - returns (AnalyzeSentimentResponse) { + rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { option (google.api.http) = { post: "/v1/documents:analyzeSentiment" body: "*" @@ -47,8 +46,7 @@ service LanguageService { // Finds named entities (currently proper names and common nouns) in the text // along with entity types, salience, mentions for each entity, and // other properties. - rpc AnalyzeEntities(AnalyzeEntitiesRequest) - returns (AnalyzeEntitiesResponse) { + rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { option (google.api.http) = { post: "/v1/documents:analyzeEntities" body: "*" @@ -57,12 +55,9 @@ service LanguageService { option (google.api.method_signature) = "document"; } - // Finds entities, similar to - // [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] - // in the text and analyzes sentiment associated with each entity and its - // mentions. - rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) - returns (AnalyzeEntitySentimentResponse) { + // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes + // sentiment associated with each entity and its mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { option (google.api.http) = { post: "/v1/documents:analyzeEntitySentiment" body: "*" @@ -104,8 +99,6 @@ service LanguageService { } } -// ################################################################ # -// // Represents the input to API methods. message Document { // The document types enum. @@ -155,8 +148,8 @@ message Sentence { TextSpan text = 1; // For calls to [AnalyzeSentiment][] or if - // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] - // is set to true, this field will contain the sentiment for the sentence. + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to + // true, this field will contain the sentiment for the sentence. Sentiment sentiment = 2; } @@ -295,9 +288,9 @@ message Entity { repeated EntityMention mentions = 5; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - // is set to true, this field will contain the aggregate sentiment expressed - // for this entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the aggregate sentiment expressed for this + // entity in the provided document. Sentiment sentiment = 6; } @@ -948,9 +941,9 @@ message EntityMention { Type type = 2; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - // is set to true, this field will contain the sentiment expressed for this - // mention of the entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + // true, this field will contain the sentiment expressed for this mention of + // the entity in the provided document. Sentiment sentiment = 3; } @@ -960,9 +953,7 @@ message TextSpan { string content = 1; // The API calculates the beginning offset of the content in the original - // document according to the - // [EncodingType][google.cloud.language.v1.EncodingType] specified in the API - // request. + // document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. int32 begin_offset = 2; } @@ -980,7 +971,9 @@ message ClassificationCategory { // Model options available for classification requests. message ClassificationModelOptions { // Options for the V1 model. - message V1Model {} + message V1Model { + + } // Options for the V2 model. message V2Model { @@ -1030,8 +1023,7 @@ message AnalyzeSentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 2; // The sentiment for all the sentences in the document. @@ -1054,8 +1046,7 @@ message AnalyzeEntitySentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 2; } @@ -1075,8 +1066,7 @@ message AnalyzeEntitiesResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 2; } @@ -1099,8 +1089,7 @@ message AnalyzeSyntaxResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 3; } @@ -1178,8 +1167,7 @@ message AnnotateTextResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field - // for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field for more details. string language = 5; // Categories identified in the input document. diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto index fd51d48652d..3e6a9f8290e 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1beta2/language_service.proto @@ -99,8 +99,6 @@ service LanguageService { } } -// ################################################################ # -// // Represents the input to API methods. message Document { // The document types enum. diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index d0890620d76..22fe5f0ffcc 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -492,10 +492,8 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeEntities(request, options, callback); } /** - * Finds entities, similar to - * {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} - * in the text and analyzes sentiment associated with each entity and its - * mentions. + * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes + * sentiment associated with each entity and its mentions. * * @param {Object} request * The request object that will be sent. From 5e72a1068e2d379f47ba122de5c2e17f4b4219e5 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Tue, 11 Oct 2022 14:00:18 -0700 Subject: [PATCH 488/488] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- packages/google-cloud-language/.mocharc.js | 2 +- packages/google-cloud-language/.prettierrc.js | 2 +- .../google-cloud-language/.repo-metadata.json | 2 +- packages/google-cloud-language/README.md | 33 ++- packages/google-cloud-language/package.json | 4 +- .../google-cloud-language/samples/README.md | 234 ++++++++++++++++-- packages/google-cloud-language/src/index.ts | 2 +- release-please-config.json | 1 + 10 files changed, 246 insertions(+), 41 deletions(-) rename packages/google-cloud-language/{.github => }/.OwlBot.yaml (79%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b55d18d1a6e..6c31c2ce629 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -10,6 +10,7 @@ "packages/google-cloud-bigquery-analyticshub": "0.1.0", "packages/google-cloud-bigquery-datapolicies": "0.1.0", "packages/google-cloud-gkemulticloud": "0.1.2", + "packages/google-cloud-language": "5.1.0", "packages/google-cloud-oslogin": "4.0.2", "packages/google-cloud-redis": "3.1.3", "packages/google-cloud-security-publicca": "0.1.1", diff --git a/packages/google-cloud-language/.github/.OwlBot.yaml b/packages/google-cloud-language/.OwlBot.yaml similarity index 79% rename from packages/google-cloud-language/.github/.OwlBot.yaml rename to packages/google-cloud-language/.OwlBot.yaml index 047cedc2fd1..b31158ec8a9 100644 --- a/packages/google-cloud-language/.github/.OwlBot.yaml +++ b/packages/google-cloud-language/.OwlBot.yaml @@ -11,13 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/language/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/language/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-language/$1 diff --git a/packages/google-cloud-language/.mocharc.js b/packages/google-cloud-language/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-language/.mocharc.js +++ b/packages/google-cloud-language/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/.prettierrc.js b/packages/google-cloud-language/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-language/.prettierrc.js +++ b/packages/google-cloud-language/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-language/.repo-metadata.json b/packages/google-cloud-language/.repo-metadata.json index d8e23638f96..d3bebc8638c 100644 --- a/packages/google-cloud-language/.repo-metadata.json +++ b/packages/google-cloud-language/.repo-metadata.json @@ -11,7 +11,7 @@ "distribution_name": "@google-cloud/language", "name_pretty": "Natural Language", "api_id": "language.googleapis.com", - "repo": "googleapis/nodejs-language", + "repo": "googleapis/google-cloud-node", "api_shortname": "language", "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-language/README.md b/packages/google-cloud-language/README.md index 02128d65cc3..1795ffbc339 100644 --- a/packages/google-cloud-language/README.md +++ b/packages/google-cloud-language/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Natural Language: Node.js Client](https://github.com/googleapis/nodejs-language) +# [Natural Language: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/language.svg)](https://www.npmjs.org/package/@google-cloud/language) @@ -10,17 +10,15 @@ -[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural -language understanding technologies to developers, including sentiment analysis, entity -analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. +Google Cloud Natural Language API client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-language/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/blob/main/CHANGELOG.md). * [Natural Language Node.js Client API Reference][client-docs] * [Natural Language Documentation][product-docs] -* [github.com/googleapis/nodejs-language](https://github.com/googleapis/nodejs-language) +* [github.com/googleapis/google-cloud-node](https://github.com/googleapis/google-cloud-node) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -89,13 +87,24 @@ async function quickstart() { ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | -| Set Endpoint | [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/setEndpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) | +| Language_service.analyze_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js,samples/README.md) | +| Language_service.analyze_entity_sentiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js,samples/README.md) | +| Language_service.analyze_sentiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js,samples/README.md) | +| Language_service.analyze_syntax | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js,samples/README.md) | +| Language_service.annotate_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js,samples/README.md) | +| Language_service.classify_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js,samples/README.md) | +| Language_service.analyze_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js,samples/README.md) | +| Language_service.analyze_entity_sentiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js,samples/README.md) | +| Language_service.analyze_sentiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js,samples/README.md) | +| Language_service.analyze_syntax | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js,samples/README.md) | +| Language_service.annotate_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js,samples/README.md) | +| Language_service.classify_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/test/quickstart.test.js,samples/README.md) | @@ -145,7 +154,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-language/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -157,7 +166,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-language/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest [product-docs]: https://cloud.google.com/natural-language/docs/ diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 8d5f8ebe163..18e11b51ead 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -32,8 +32,8 @@ "scripts": { "docs": "jsdoc -c .jsdoc.js", "lint": "gts check", - "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", - "system-test": "mocha build/system-test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test", "fix": "gts fix", "docs-test": "linkinator docs", diff --git a/packages/google-cloud-language/samples/README.md b/packages/google-cloud-language/samples/README.md index 191187d14cc..fb68ff25032 100644 --- a/packages/google-cloud-language/samples/README.md +++ b/packages/google-cloud-language/samples/README.md @@ -2,26 +2,35 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Natural Language: Node.js Samples](https://github.com/googleapis/nodejs-language) +# [Natural Language: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] -[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural -language understanding technologies to developers, including sentiment analysis, entity -analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. + ## Table of Contents * [Before you begin](#before-you-begin) * [Samples](#samples) - * [Analyze v1](#analyze-v1) + * [Language_service.analyze_entities](#language_service.analyze_entities) + * [Language_service.analyze_entity_sentiment](#language_service.analyze_entity_sentiment) + * [Language_service.analyze_sentiment](#language_service.analyze_sentiment) + * [Language_service.analyze_syntax](#language_service.analyze_syntax) + * [Language_service.annotate_text](#language_service.annotate_text) + * [Language_service.classify_text](#language_service.classify_text) + * [Language_service.analyze_entities](#language_service.analyze_entities) + * [Language_service.analyze_entity_sentiment](#language_service.analyze_entity_sentiment) + * [Language_service.analyze_sentiment](#language_service.analyze_sentiment) + * [Language_service.analyze_syntax](#language_service.analyze_syntax) + * [Language_service.annotate_text](#language_service.annotate_text) + * [Language_service.classify_text](#language_service.classify_text) * [Quickstart](#quickstart) - * [Set Endpoint](#set-endpoint) + * [Quickstart.test](#quickstart.test) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-language#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -33,16 +42,203 @@ Before running the samples, make sure you've followed the steps outlined in -### Analyze v1 +### Language_service.analyze_entities + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1/language_service.analyze_entities.js` + + +----- + + + + +### Language_service.analyze_entity_sentiment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1/language_service.analyze_entity_sentiment.js` + + +----- + + + + +### Language_service.analyze_sentiment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1/language_service.analyze_sentiment.js` + + +----- + + + + +### Language_service.analyze_syntax + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1/language_service.analyze_syntax.js` + + +----- + + + + +### Language_service.annotate_text + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1/language_service.annotate_text.js` + + +----- + + + + +### Language_service.classify_text + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1/language_service.classify_text.js` + + +----- + + + + +### Language_service.analyze_entities + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entities.js` + + +----- + + + + +### Language_service.analyze_entity_sentiment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_entity_sentiment.js` + + +----- + + + + +### Language_service.analyze_sentiment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_sentiment.js` + + +----- + + + + +### Language_service.analyze_syntax + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1beta2/language_service.analyze_syntax.js` + + +----- + + + + +### Language_service.annotate_text + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-language/samples/generated/v1beta2/language_service.annotate_text.js` + + +----- + + + + +### Language_service.classify_text -View the [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/analyze.v1.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js,samples/README.md) __Usage:__ -`node samples/analyze.v1.js` +`node packages/google-cloud-language/samples/generated/v1beta2/language_service.classify_text.js` ----- @@ -52,14 +248,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node packages/google-cloud-language/samples/quickstart.js` ----- @@ -67,16 +263,16 @@ __Usage:__ -### Set Endpoint +### Quickstart.test -View the [source code](https://github.com/googleapis/nodejs-language/blob/main/samples/setEndpoint.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-language/samples/test/quickstart.test.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/setEndpoint.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-language/samples/test/quickstart.test.js,samples/README.md) __Usage:__ -`node samples/setEndpoint.js` +`node packages/google-cloud-language/samples/test/quickstart.test.js` @@ -84,5 +280,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/natural-language/docs/ diff --git a/packages/google-cloud-language/src/index.ts b/packages/google-cloud-language/src/index.ts index 2c3a55d420a..d41f5db2732 100644 --- a/packages/google-cloud-language/src/index.ts +++ b/packages/google-cloud-language/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index 38d86ff6180..6e44f27d6f2 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -10,6 +10,7 @@ "packages/google-cloud-bigquery-analyticshub": {}, "packages/google-cloud-bigquery-datapolicies": {}, "packages/google-cloud-gkemulticloud": {}, + "packages/google-cloud-language": {}, "packages/google-cloud-oslogin": {}, "packages/google-cloud-redis": {}, "packages/google-cloud-security-publicca": {},